Re: writing/reading to external file?
Status: Alpha
Brought to you by:
cwalther
|
From: Christian W. <cwa...@gm...> - 2010-11-14 15:08:52
|
shadowphile wrote: > Hotspots are majorly tedious to build. > I came up with the idea to put one global hotspot on a node, using > mousedown > and up events to grab the upper right and lower left corners, then > build a > hotspot string around those values. > That part works fine. Great, something like this (for editing handles, not hotspots) is actually planned to eventually be part of Pipmak, but no work has been done on it yet. > I can't figure out how to get my string though. No way to cut and > paste it > from anywhere. Can't save to a file. Hmm. If you're using Pipmak 0.2.7, I can't think of any useful way. Displaying the string on the terminal or in the command line or inspector window and retyping it outside of Pipmak is probably the easiest thing you can do. If you're compiling from source, you can use pipmak.copytermtostdout() to enable redirection of pipmak.print() output to standard output, from where you can copy it. A roundabout way that's probably impractical would be to store the string in the "state" table, then save your game, and examine the saved game file - either in a hex editor (or text editor that doesn't mind binary parts) or by deserializing it in an external Lua interpreter using Pipmak's functions from <http://pipmak.svn.sourceforge.net/viewvc/pipmak/trunk/pipmak/extras/serialize.lua >. -Christian |