 |
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Wed Jul 22, 2009 2:50 pm
[Complete] [3.09] Feature Request: Add an event OnZoneEnter |
I think it would be useful to be able to have some of my own code run whenever my zone changes. I can, of course, do this check myself inside the OnRoomEnter event every time it fires, but it seems like this would be nice as a general event.
|
|
Last edited by ReedN on Tue Jul 28, 2009 4:03 am; edited 1 time in total |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Jul 22, 2009 8:26 pm |
I'll add that to the to-do list. It's a good idea.
|
|
|
|
 |
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Mon Jul 27, 2009 3:52 am |
As a suggestion for the arguments of the event, I'd suggest %1 = old zone and %2 = new zone.
|
|
|
|
 |
Moo Apprentice
Joined: 10 Apr 2009 Posts: 145
|
Posted: Mon Jul 27, 2009 7:22 am |
Good idea.. Especially as the old zone scripts seem to be deprecated/not working at all...
|
|
|
|
 |
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Mon Jul 27, 2009 2:24 pm |
There is a different mechanism in use now for the zone scripts. I'm not sure it has made its way into the regular documentation yet. I went searching through some of Zugg's posts for explanations when I wanted to do zone scripting for the new versions of Cmud.
|
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Jul 27, 2009 4:45 pm |
Zone scripts are not yet automatically converted. It's on the to-do list. You can to create them manually in the current version using the same class folder mechanism as Room scripts, but give the class the key of "ZoneXXX" where XXX is the zone number.
|
|
|
|
 |
Moo Apprentice
Joined: 10 Apr 2009 Posts: 145
|
Posted: Mon Jul 27, 2009 7:34 pm |
Aha, thanks
Maybe the old-style zone scripts tab could have a little message about this, or just saying that the boxes don't do anything.. |
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Jul 27, 2009 8:20 pm |
The next version has a new command in the Zone menu for editing zone scripts and will also convert the old zone scripts. I was just saying that the current 3.09 version did not do this.
Edited: Actually, I take that back. The current 3.09 (and 3.08) versions *did* convert any existing Zone Scripts into the proper ZoneXXX class scripts. The problem is that the Zone Scripts area in the Map Properties window doesn't do anything with these new scripts, so you need to manually open the Settings Editor and go within the Map Object to find the ZoneXXX classes.
The new version will add a Zone/Scripts command that will open the settings editor automatically to the correct current zone class, and will remove the non-functional Zone Scripts tab (and Map Script tab) from the Map Properties window. |
|
|
|
 |
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Tue Jul 28, 2009 2:00 am |
The new event works like a charm in 3.10, thanks!
|
|
|
|
 |
|
|
|