View Full Version : Event Help
boginziliac
2005-02-13, 08:02 PM
How do you stop and event after you make it like i tried to erase it so when you go back to the same place it wont happen again but if you leave the area transition and go back in then go to the event its still there ?
Just ending events so they only happen once then they do or say somthing else
BlueCube
2005-02-13, 09:33 PM
Everytime this question comes up, I throw out the old treasure chest example. You only want it activated once, and every other time you try it, it'll say "Empty". In that case, it's easy - it's simply a two-page event.
=============================
I'll do this in pseudocode.
Page 1 (activated on button press, graphic is a closed treasure chest, no preconditions):
<> Message "You got 300 Gold!"
<> Add 300 Gold to stash
<> Turn switch [xxxx:Treasure0001 Opened] ON
<>
Page 2 (activated on button press, graphic is an open treasure chest, precondition of Switch [xxxx:Treasure0001 Opened] is ON.)
<> Message "Empty!"
<>
===============================
Very, very simple. The switch ensures that the event will not run the first page again.
If you already knew all about switches/preconditions, I'm going to guess that you used a local switch (RMXP only) incorrectly. Doing them in the following order is incorrect:
<> Teleport to Map 2
<> Turn Local Switch A to ON
<>
Because that will actually set map 2's "Local Switch A" to ON and not for the current map.
---
If none of this applies, I'm going to guess that it's an error involving your switches. Make sure you're setting the correct switch at the end of the event, and also make sure the precondition switch is correct. Also check to make sure that no other events are messing around with that switch - overlapping switches are tough to detect sometimes.
Lenny
2005-02-14, 02:47 AM
Wow...that's a weird way of doing things...
Though then again...my ways are always weird...
I end up with a switch for every treasure chest (Aiiee! Crazy :p) and just have conditional branches for every treasure chest:
If Switch 001: Treasure chest TopLeft Map 1 is OFF
then you can open the treasure chest, which in turn switches the switch (001) on.
If it is ON, then you can't open the treasure chest...
----------
Which Rpg Maker you using boginziliac?
BlueCube
2005-02-14, 02:01 PM
That's what I do, only I do it on two pages instead of one. Not sure which is faster to the engine, it would take several thousand openings to determine that.. but I'm guessing another page would be faster, as it checks the highest page first anyway, and doesn't have to calculate the branch result. Complete speculation on my part, though, so who knows for sure.
Lenny
2005-02-14, 03:04 PM
I'd say that you'd know better than me...
It's boginziliac's choice. Either hundreds of switches, or lots of multipages...
vBulletin® v3.8.2, Copyright ©2000-2025, Jelsoft Enterprises Ltd.