Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[VX] Dual setoff condition Event |RESOLVED]

I'd like to create an Event that has 2 different reactions..

1/ Do action A when stepped onto (show exclamation point : "Hey!! There's something under this 'shroom !!")
2/ Do action B when  action button is pressed (teleport to the Faery court)

Both of these actions must be executed while atop the event, so it must be eiter "under" or "same level" and "traversable".

A dual page Event (page 1 => action A when stepped onto + set internal swich) (page 2 when previous insternal switch => action B when botton pressed), because the page 1 won't turn back to active state if I leace the Event without pressing the action key and triggering it.

Any idea ???
 
Do you want the first reaction to always happen, regardless of whether or not the second occurs? If so, make the event "on hero touch" and "below hero" and then make the first page so as that:

Code:
>Show Picture: Exclamation Point.jpg
>Show Message: "Hey!! There's something under this shroom"
>Change Switch: Exclamation Over, On.

The second page of the above event, which requires the "Exclamation Over" switch to be on, should be "below hero" and "on hero press". It should simply read:

Code:
>Teleport: Fairy Village

The final part is the most important part. You need to surround the above event with "below hero", "on hero touch" events that only contain one line of code:

Code:
>Change Switch: Exclamation Over, Off.

This will cause the teleporting event to turn off once you walk away from it, thus meaning that when you return to the shroom it will yet again say "Hey, there is something here etc." before allowing you to teleport at the press of a button. Equally, it allows the player to stand on the shroom for as long as they like before pressing the button to teleport - they don't need to be forced into waiting around or forced into hitting the button within a time limit.

Hope this helps.
 

Emtch

Member

This is really easy. Just make it a "touch" event, set the message thing, then put a conditional branch so the player will have to press the enter key, making them teleport.
Only one page needed, really quick to make.

EDIT: Beaten, but I didn't post the exact same method, so I'll not remove this message.
 
Emtch":3ujkzhb3 said:
This is really easy. Just make it a "touch" event, set the message thing, then put a conditional branch so the player will have to press the enter key, making them teleport.
Only one page needed, really quick to make.

EDIT: Beaten, but I didn't post the exact same method, so I'll not remove this message.

Your method won't work, either. The fork condition will pass-by if the player doesn't press the button quick enough (and since human fingers aren't as fast as the processor, they're not going to). To get around that you'd have to add a wait command, which also wouldn't be ideal because the player then cannot freely walk away from the event if they don't want to teleport.
 
It won't work. I agree with you... especialy since there won't always be a message. Just the emote.
As for the "surround it" solution. I already througth about it, but discarded it, since it will overload the map with events that arn't that important. Inelegant...

Anything else ??
 
I'll be honest, I can't think of a more "elegant" way of doing it. I really don't see how it matters, though, since the player doesn't get to see how the event works. (Then again, I'm a bit of a function > form person when it comes to coding/eventing...)
 
How bout' making two events, one for the touch and one for the action button.
the second one with the button would have a command to set his own location to be equal to the other one. Yes, you'll have two events but I don't think that matters.
so to layout the first one would be
Player Touch trigger,
Text Message: blablabla
second event would be
Autorun
set event location: this event (X,Y)
control self switch A on
======second page======
trigger=Action Button
Transfer Player
 
Sorry about the 'inelegant'. But from a programmer point of view, the solution seemms somewht redoundant; something we are always trying to avoid.

As for the 2 event... I thougt about it, but didn't imagine the to place both of them on the same tile. I'll have and try it tomerrow mortning (it's very late now in Europe...)
 
OK... it worked nicely, providing you turn ON the Ghost/Phantom flag (don't know the exact word since I'm working on a french version of VX) before moving the Event.

Thanks ...
 
Guess what ??  :smile: It shall be a little more complicate than that...

The problem is now on the save/load part. Because when you save your game, it saves the internal switchs of the events, but reset them at their starting place. And so, when reloading the game, I found the teleport event at the xrong place and willing tou move again  :cry:
 
I'VE GOT IT !!!!

For those who car, here is how it is done (thanks to Muffins for the 'move the event' idea).

1/ Create 2 events: the Exclamation event and the Teleport Event.
2/ place the Exclamation event at the right place
3/ place the Teleport event in a place unreachable by foot (to avoid triggering it while not at the right place)
3/ set the Teleport event trigger on 'when button pressed', and make it check your movement mode (you must be on Foot) and then teleport the party
4/ set the Exclamation trigger to "event touched", and make it show the exclamation point, and move the Teleport event to the same place as itself.

If necessary, you'll have to change the test on the movement mode...
 
I am sorry if I offensed you with the 'inelegant' term. Although my solution is more economic in term of ressources and redoundance (and therefore maintainance), I won't call it 'elegant' either. But this is the best I could find for the moment.
Please forgive me.
 
I'm not offended, I just don't see why you needed to overcomplicate it like that when you said yourself you'd already thought of the idea I put forward. Still, if it works then that is what matters.
 
Fustel":3e88q8cr said:
I'VE GOT IT !!!!

For those who car, here is how it is done (thanks to Muffins for the 'move the event' idea).

1/ Create 2 events: the Exclamation event and the Teleport Event.
2/ place the Exclamation event at the right place
3/ place the Teleport event in a place unreachable by foot (to avoid triggering it while not at the right place)
3/ set the Teleport event trigger on 'when button pressed', and make it check your movement mode (you must be on Foot) and then teleport the party
4/ set the Exclamation trigger to "event touched", and make it show the exclamation point, and move the Teleport event to the same place as itself.

If necessary, you'll have to change the test on the movement mode...

No you guys are making something really simple very difficult.  You can do this all in one event.  All you have to do is add a page with the new event page button.

Page 1 should look like this:
http://img.photobucket.com/albums/v216/ ... creens.png[/img]

Page 2 like so:

http://img.photobucket.com/albums/v216/ ... reens2.png[/img]

Works fine.
 
Works fine, but the Exclation only pops up the first time you step on the 'shroom. I'd like to make it pop EVERY TIME!!!
And a 'Control Switches: [0001] = OFF' in page 2 won't do any good, because the party isn't required to be teleported by pressing the action button.
I really nned both processes running parrallell at the same spot.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top