GetZone()
Displaying 1-4 of 4 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
jrhee

Hi. I'm working on a player movement script, but am having problems getting zones to work. I see that there is a GetZone() function, but it only returns the numerical ID of the zone. Is there any way to get the name of a zone's associated function? Or any way to execute the function using input from GetZone()?

Posted on 2006-06-24 17:06:06

Overkill

Not at the moment. In my hacked custom build for Snowball I added a function called GetZoneScript().

Oh at a glance, It seems there were already builtins for zone name and event.
string zone.name;
string zone.event;
However, they're not arrays. ...What? So they're probably not usable ;_;

Posted on 2006-06-24 17:24:08 (last edited on 2006-06-24 17:44:04)

Gayo

Although this isn't in now, it's something that we'd all like to have, so whenever the next build comes out (lol?) there's hope that this will be in it.

Posted on 2006-06-24 23:15:27

Overkill

Just fixed this, in revision 59. Might be a while before an official release will be made though.

Example of Usage:

int z = GetZone(x, y);
Log("Calling " + zone.event[z] + "(); from zone (#" + str(z) + " - " + zone.name[z] + ").");
CallFunction(zone.event[z]);

Posted on 2006-06-25 00:41:37


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.