[RPG MAKER 2003] EVENT TO EVENT
Posts
Pages:
1
Need your help...
How can i touch my event to another event??
like moving a box to a switch on the floor to unlock the door or like a
box man game..
How can i touch my event to another event??
like moving a box to a switch on the floor to unlock the door or like a
box man game..
To expand on Milennin's answer, make a parallel process event on the map which sets two variables, one to the box's X coordinate and one to the Y coordinate. Then have a conditional branch that checks whether these variables are equal to the coordinates of the spot you have the floor switch on and inside both of these branches do all your door unlocking stuff. Make an else for each branch and in each one relock the door (so that if the box moves off of the spot it won't stay open)
You can also make it inside the rock itself. This is actually better, as then you can use ThisEvent X/Y and effectively reuse much of the code. With an external system, you have to write redundant code for each rock touching each switch.
there is nothing wrong with it, no. did i imply that somehow?
but there is definitely a more simple way to do this, as outlined by all posts in this thread.
but there is definitely a more simple way to do this, as outlined by all posts in this thread.
Simpleness depends on exactly what needs to be done.
If you can make assumptions like there will only be one switch but many stones, or many switches but only one stone, or stone cannot move once put on a switch, then yes, there are simplifications which can be done by using some of the mentioned methods.
However, for the general case of many stones which can all go to many switches, which don't get stuck once put on a switch, it will probably be hard to do it simpler than in the suggested tutorial.
When you have multiple switches and stones, the problem with having the checks in the stones themselves is that you'll first have to check if the stone is on one of the switches. This takes 2 branches for each switch out there (cuz 2 coordinates). Also, you need an additional switch to tell which stone is on which switch to know which switch to turn off if you move it off the switch the stone was standing on (sorry for all the confusing switches). This can be avoided if you always check the current and next coordinates of where the stone is going, but this also adds further complexity to the event, with additional branches which must be reconfigured every time you want to re-use this kind of puzzle.
There are a few alternative ways to do this, but I can't think of any which are as simple to use/reuse for a general case of many stones to many switches which don't get locked when put on a switch.
If you can make assumptions like there will only be one switch but many stones, or many switches but only one stone, or stone cannot move once put on a switch, then yes, there are simplifications which can be done by using some of the mentioned methods.
However, for the general case of many stones which can all go to many switches, which don't get stuck once put on a switch, it will probably be hard to do it simpler than in the suggested tutorial.
When you have multiple switches and stones, the problem with having the checks in the stones themselves is that you'll first have to check if the stone is on one of the switches. This takes 2 branches for each switch out there (cuz 2 coordinates). Also, you need an additional switch to tell which stone is on which switch to know which switch to turn off if you move it off the switch the stone was standing on (sorry for all the confusing switches). This can be avoided if you always check the current and next coordinates of where the stone is going, but this also adds further complexity to the event, with additional branches which must be reconfigured every time you want to re-use this kind of puzzle.
There are a few alternative ways to do this, but I can't think of any which are as simple to use/reuse for a general case of many stones to many switches which don't get locked when put on a switch.
As long as the stone event IDs are sequential, you could simplify it using a loop for checking through them. Just use variable pointers for the coordinates instead of static values and it should be a bit cleaner.
right. it depends on what needs to be done. since the OP didn't specify we can't know for sure.
i don't disagree that your method is generally better, but in most cases someone just needs to move 1 box to 1 switch for 1 puzzle. for beginners it's helpful to learn the simplistic way of using 2 var coord's. advanced users probably already know that method and wouldn't ask the question at all.
if a game makes heavy use and re-use of push-event-on-switch mechanics, then your method is best. i had never thought of that way, or saw the tutorial until now, and i will try it out next time i need that mechanic.
i don't disagree that your method is generally better, but in most cases someone just needs to move 1 box to 1 switch for 1 puzzle. for beginners it's helpful to learn the simplistic way of using 2 var coord's. advanced users probably already know that method and wouldn't ask the question at all.
if a game makes heavy use and re-use of push-event-on-switch mechanics, then your method is best. i had never thought of that way, or saw the tutorial until now, and i will try it out next time i need that mechanic.
Pages:
1
















