Chaos Project

RPG Maker => Event Systems => Event System Requests => Topic started by: Sin86 on January 16, 2011, 11:16:24 am

Title: [RESOLVED]Need some help with this
Post by: Sin86 on January 16, 2011, 11:16:24 am
Ok, I really like the idea of pushing switches as shown here.

http://forum.chaos-project.com/index.php/topic,1522.0.html

However I want to make it where I can push a block onto a switch tile in order to activate it like how it's being said in this topic here.

http://forum.chaos-project.com/index.php/topic,460.msg6372.html#msg6372

Problem is I can't understand it well. I tried making the rock and switch be event touches but the switch only activates when I step on it, not the block. I tried using a conditional branch and setting a switch command on the switch and putting that same command on the block but when I push the block, that switch is activated and it still won't press the switch unless I get on it. All I want is to have it where ONLY the block activates it. Having it where no matter where I step on it, it won't activate unless the block is on there.
Title: Re: Need some help with this
Post by: Valdred on January 16, 2011, 11:32:55 am
Run a conditional branch to check if the block's coordinates correspond to the ones of the trigger. Tell me if you need further help
Title: Re: Need some help with this
Post by: Sin86 on January 16, 2011, 11:35:24 am
Although I know how to run a conditional branch, how do I check(and modify) coordinates onto one?


Actually, I'm going to need an entire step by step walkthrough for this and what command to click on, what numbers to input etc. Basically everything.
Title: Re: Need some help with this
Post by: Valdred on January 16, 2011, 02:14:30 pm
Here's a video I made for you

Takes too long to upload. Create four variables: Trigger_x, trigger_y, block_x and block_y. Assign corresponding coordinates using the "Character" option in "Control variables."
You then check if these are equal using var == var in conditional branch. Alternatively you can use the script option in conditional branch, with this code:
($game_map.events[id1].x == $game_map.events[id2].x) and ($game_map.events[id1].y == $game_map.events[id2].y)

Exchange id1 and id2 with proper IDs of the two events.
Title: Re: Need some help with this
Post by: Sin86 on January 16, 2011, 02:35:57 pm
So as an example, my block is ID 12 and my switch is at ID 9. To get this to work? Do I do it like this?

This is in the script that you posted. Trigger x(12), trigger y(9), block x(12), block y(9)

Or is that incorrect?
Title: Re: Need some help with this
Post by: Valdred on January 16, 2011, 02:37:36 pm
[] instead of ()

Just hold ctrl while pressing the keys and you'll get 'em
Title: Re: Need some help with this
Post by: Sin86 on January 16, 2011, 02:42:46 pm
Here is what I did.

($game_map.events[12].x == $game_map.events[9].x) and ($game_map.events[12].y == $game_map.events[9].y)


Block is ID event 12, switch is event ID 9 but when I push the block(12) onto switch(9). Nothing happens.


Never mind, I finally got it. I had to make the switch a parallel process and then use ID 1 in the syntax as the block and ID 2 as the switch on both x and y respectivly. It works, no demo needed. Thank you so much!


Sorry, one more thing. After it successfully presses the switch, is there any way you can make it sit on the switch after leaving the map and coming back to it and it still sits there unless you move it again?
Title: Re: Need some help with this
Post by: The Niche on January 16, 2011, 06:10:33 pm
Turn on a switch/self switch.
Title: Re: Need some help with this
Post by: Sin86 on January 16, 2011, 07:16:58 pm
Tried that and it still went back to its original spot.
Title: Re: Need some help with this
Post by: stripe103 on January 17, 2011, 01:15:38 am
In the first event page that the switch tile event use, you need it to check if you have already been there(using a switch which is set to true when you go out through the door that opens when you push the switch event) and then have it move the block to the switch events position.