entity.script
Displaying 1-4 of 4 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
pthaloearth

From my understanding of entity.script it should hold the currently used movescript of its respective entity as stated in the docs. I've also read however that is holds no such data but rather what function an entity should call when activated. So which is it?

I was attempting to log entity.script and it crashed the engine.

Is comes up once the code hits fileWriteString(file,entity.script[i]). It does the same when I do a log(entity.script[i]).

Another question while I'm at it. Is there a way to access and save the EntitySetWanderRect rect bounds? (or an in progress movescript is entity.script doesn't hold that information or won't allow it to be saved?)

I'm looking to be able to save these things to allow (non map set entities) to be properly reloaded from data saved in a file so the movement occurs in the same way as if they had not interrupted the game by saving quiting and then reloading the data.

Posted on 2007-07-11 21:41:28 (last edited on 2008-01-17 20:21:26)

pthaloearth

anybody?

Posted on 2007-07-30 20:42:27

pthaloearth

figured I should mention this here as well as in the doc board since the documentation is wrong with entity.script.

entity.script is the entities "onActivate" setting from MapEd

if unset and you attempt to read it'll crash verge. I haven't messed around with writing to it.

Posted on 2008-01-17 20:14:20 (last edited on 2008-01-17 20:15:12)

pthaloearth

just to close the other question about EntitySetWanderRect I ended up writing a function to save the cords into a file and then used that data to reload the wander rect upon loading a saved game. Works great in this instance

I did the same for entityMove but it's somewhat flawed in that it saves the entire movement script rather than the remainder. Still trying to figure out how to get that information.

Posted on 2008-01-17 20:19:54 (last edited on 2008-01-17 20:20:56)


Displaying 1-4 of 4 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.