Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Need a little help with a tricky thing, Pushing a block or something on a spot should... activate... something
BannedDuplicateA...
post Feb 15 2011, 01:45 PM
Post #1



Group Icon

Group: Banned
Posts: 0
Type: None
RM Skill: Undisclosed




Hiya! woot.gif

I have a little problem aboute a special event that i would like to add in my game but it doesn't seem possible (by the look of it)


The thing is....

that i want to make it possible to be able to PUSH another event into another event and that will trigger a swich or something... eh.. (Like for example in The Legend of Zelda you push blocks onto swiches on the ground)

I made a block that i set as movement (moves away from hero) when i press it, and what i want is that when this block reaches a sertain spot(another event) a swich or an integer will react.

I hope you understand what i mean, i just want to know if this is possible or not becouse is seems rather hard to make a thing like this happen tongue.gif

(would have been easier if it was the hero, then i chould just use event respont "Collision" or "Hero's Touch" but this time it's not the player that touches the event respond tongue.gif)
Go to the top of the page
 
+Quote Post
   
Knot
post Feb 15 2011, 01:57 PM
Post #2


Level 25
Group Icon

Group: Revolutionary
Posts: 555
Type: Artist
RM Skill: Skilled




What you can do is setup two variables that you place after the move event to check the rock's x and y coordinates and saves them. You then use a conditional branch to check if it's in the right place to contact the switch. It would be something like this (I dont have XP up so Im not sure of the proper wording):

Set Move Route: Move Away from Player.
Wait for Move's Completion.
Set Variable Rock X
Set Variable Rock Y
Conditional Branch - Rock X = 3?
If Yes Conditional Branch - Rock Y = 9?
If Yes blah blah blah blah


__________________________
Unclickable!


QUOTE (X-M-O)
Oh no! I've been quoted again! D=



Other cool stuffs to check out! Even if they arn't mine...





Go to the top of the page
 
+Quote Post
   
BannedDuplicateA...
post Feb 16 2011, 02:06 PM
Post #3



Group Icon

Group: Banned
Posts: 0
Type: None
RM Skill: Undisclosed




QUOTE (Knot @ Feb 15 2011, 01:57 PM) *
What you can do is setup two variables that you place after the move event to check the rock's x and y coordinates and saves them. You then use a conditional branch to check if it's in the right place to contact the switch. It would be something like this (I dont have XP up so Im not sure of the proper wording):

Set Move Route: Move Away from Player.
Wait for Move's Completion.
Set Variable Rock X
Set Variable Rock Y
Conditional Branch - Rock X = 3?
If Yes Conditional Branch - Rock Y = 9?
If Yes blah blah blah blah



That would work if the game chould read which way i'm pushing the block. If i push it up or down that would be "Variable Y + or -" or if i push it right or left that would be "Variable X + or -" but the game can't read that, it can just read "move away from hero" it doesn't read which direction the block is pushed therefore i cannot set the Y or X variables.

This is tricky huh.gif

(Kinda ironik, i'm gona set up a riddle in the game and you solve the riddle by pushing the blocks onto their right place. But making this works is a bit of a riddle in itselfe, hehe.) confused.gif
Go to the top of the page
 
+Quote Post
   
Knot
post Feb 16 2011, 02:21 PM
Post #4


Level 25
Group Icon

Group: Revolutionary
Posts: 555
Type: Artist
RM Skill: Skilled




I'm a little confused O.o
As long as you put the Set Variable after the Move Route it will save the variable as the new position of the block not the old one and therefore it can check to new position compared to the location of the switch.


__________________________
Unclickable!


QUOTE (X-M-O)
Oh no! I've been quoted again! D=



Other cool stuffs to check out! Even if they arn't mine...





Go to the top of the page
 
+Quote Post
   
brewmeister
post Feb 16 2011, 02:27 PM
Post #5


Paste above Main
Group Icon

Group: Revolutionary
Posts: 408
Type: Scripter
RM Skill: Skilled




Control Variables: [0001:Rock_X] = This event's Map X
Control Variables: [0002:Rock_Y] = This event's Map Y

In the Control Variables dialog, for the "Operand", set Character -> This Event -> Map X

You set, and check the variables after the event moves to see it's new position, and only perform an action if it's on the right spot.

Check out this demo... http://hbgames.org/user_files/decanos_boulder_event.exe

This post has been edited by brewmeister: Feb 16 2011, 02:31 PM


__________________________
Go to the top of the page
 
+Quote Post
   
BannedDuplicateA...
post Feb 16 2011, 03:21 PM
Post #6



Group Icon

Group: Banned
Posts: 0
Type: None
RM Skill: Undisclosed




QUOTE (brewmeister @ Feb 16 2011, 02:27 PM) *
Control Variables: [0001:Rock_X] = This event's Map X
Control Variables: [0002:Rock_Y] = This event's Map Y

In the Control Variables dialog, for the "Operand", set Character -> This Event -> Map X

You set, and check the variables after the event moves to see it's new position, and only perform an action if it's on the right spot.

Check out this demo... http://hbgames.org/user_files/decanos_boulder_event.exe



I finaly understand now! Thanks a lot for the help! happy.gif

Now for the trick of making an event occur when "three" rocks are placed on the map somewhere. hehehe sweat.gif
(Yes that's the riddle in the game, i am using 3 blocks that you need to push in it's right place in order to move on smile.gif

This post has been edited by Twillightblade: Feb 16 2011, 03:21 PM
Go to the top of the page
 
+Quote Post
   
SilentResident
post Feb 16 2011, 03:40 PM
Post #7


PZE Team Member
Group Icon

Group: Revolutionary
Posts: 669
Type: Developer
RM Skill: Skilled




QUOTE (Twillightblade @ Feb 17 2011, 01:21 AM) *
QUOTE (brewmeister @ Feb 16 2011, 02:27 PM) *
Control Variables: [0001:Rock_X] = This event's Map X
Control Variables: [0002:Rock_Y] = This event's Map Y

In the Control Variables dialog, for the "Operand", set Character -> This Event -> Map X

You set, and check the variables after the event moves to see it's new position, and only perform an action if it's on the right spot.

Check out this demo... http://hbgames.org/user_files/decanos_boulder_event.exe



I finaly understand now! Thanks a lot for the help! happy.gif

Now for the trick of making an event occur when "three" rocks are placed on the map somewhere. hehehe sweat.gif
(Yes that's the riddle in the game, i am using 3 blocks that you need to push in it's right place in order to move on smile.gif



Hehe, nice. I guess, that, in the case you want the riddle to stay solved permanently after the player leaves the room, just use a switch that keeps the riddle solved and the results/rewards of it in place. A "solved" status so the adventurers no longer have to repeat it again, especially if the reward of the riddle is not re-obtainable, and thus, setting the riddle pointless to repeat again later. (especially for treasures). biggrin.gif


__________________________
Create, Share and Play your own Zelda 2D games with the Updated Project Zelda Engine!
The official website here: zeldaengine.net
Download it here: www.rpgrevolution.com
Download it here: www.rmrk.net
Download it here: www.rmxpunlimited.net
Download it here: www.creationasylum.net
Download it here: www.zfgc.com
Go to the top of the page
 
+Quote Post
   
BannedDuplicateA...
post Feb 16 2011, 03:47 PM
Post #8



Group Icon

Group: Banned
Posts: 0
Type: None
RM Skill: Undisclosed




Ah yes, thanks for that smile.gif

I finaly know how to make the whole thing work. So thanks guys for helping me make my game a bit better with some extra/special effects in it happy.gif
Go to the top of the page
 
+Quote Post
   
Ovan35
post Feb 20 2011, 08:29 PM
Post #9


Level 4
Group Icon

Group: Member
Posts: 51
Type: Developer
RM Skill: Intermediate




QUOTE (Twillightblade @ Feb 16 2011, 06:47 PM) *
Ah yes, thanks for that smile.gif

I finaly know how to make the whole thing work. So thanks guys for helping me make my game a bit better with some extra/special effects in it happy.gif

Ok man I wish I had gotten here sooner .But there is one more way for anyone else wanting to do this.

You make a event put it on parallel process in the event command you put in a conditional branch
1.put in a small script (by clicking on the 4th tab and clicking script)
2.Put in
$game_map.events[5].x == $game_map.events[7].x
Instead of 5 and 7 put in whatever the event number is for your box and the event number for your floor switch

3.Now put in whatever you want to happen when the box is over the switch

and that's all to it.This method does really save on the amount of variables you use up.Anyway good luck on any future projects.


__________________________
Go to the top of the page
 
+Quote Post
   
Tsukihime
post Feb 22 2011, 09:51 AM
Post #10


Level 25
Group Icon

Group: Revolutionary
Posts: 561
Type: None
RM Skill: Undisclosed
Rev Points: 25




Explicitly grabbing the event's locations. Definitely a nice and direct way to do it, seeing how the particular scenario is only concerned with whether one event is at a particular location or not.


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 24th May 2013 - 01:12 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker