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
> Boulder to Switch, Using boulders to unlock doors.
nijal
post Aug 16 2011, 01:19 PM
Post #1


Level 2
Group Icon

Group: Member
Posts: 27
Type: Writer
RM Skill: Skilled




I've spent 2 days trying to figure out how to solve this problem and I still can't solve it.
Basically the equation is: Move away event (boulder) + Switch = unlocked door. There are 5 boulders and 5 switches.
My attempts would include:
1. Having all the switches on parallel
>Control Variables Screen X and Y
That caused the switches to activate without even pushing the boulder on top of each one; all I had to do was push a boulder past each one.
2. Having them on Same as character
This lead to them acting pretty oddly because if I don't shove the boulder really hard, the switch wouldn't activate and the graphic for the switch would be above the boulder.

I'm currently using Switches instead of Variables because the Variable numbers go past 10 when a switch is activated.

And then I just went through random attempts hoping to solve the problem. May someone please tell me how to solve this problem, thank you.


__________________________
Go to the top of the page
 
+Quote Post
   
Alt_Jack
post Aug 16 2011, 01:29 PM
Post #2


Level 19
Group Icon

Group: Revolutionary
Posts: 377
Type: Event Designer
RM Skill: Skilled
Rev Points: 40




QUOTE (nijal @ Aug 16 2011, 02:19 PM) *
I've spent 2 days trying to figure out how to solve this problem and I still can't solve it.
Basically the equation is: Move away event (boulder) + Switch = unlocked door. There are 5 boulders and 5 switches.
My attempts would include:
1. Having all the switches on parallel
>Control Variables Screen X and Y


There's your problem. It's the map, not the screen. The screen changes because you're walking around, but map tiles are static. Try:

parallel process
control variables- event 1 's X map Co. = variable event 1's X
repeat for each boulder, covering both X and Y map axis.

condition branch if event 1's X = 5 (for example)
-condition branch if event 1's Y = 7
turn switch on.

If you want a better idea of how it works, download my demo and check out the comments for the lake event and the jumping event. Both use XY coordinates to death. You have to establish where stuff is on the map.
The nice thing about the demo is that it updates the player's XY in real-time so if you hit F9 and check the variables it's assigned to, they'll tell you exactly where you are on the map. Move, they change.
For kicks, assign 2 different variables to the screen's XY and see the difference between the two.

This post has been edited by Alt_Jack: Aug 16 2011, 01:37 PM


__________________________

the Alternate Jacks event demo
As well as all of my images in one place, free for use.
Most of my images will be there, since this site takes too long to approve stuff and VX.net has no bulk uploader.
Go to the top of the page
 
+Quote Post
   
nijal
post Aug 16 2011, 01:47 PM
Post #3


Level 2
Group Icon

Group: Member
Posts: 27
Type: Writer
RM Skill: Skilled




So each switch event would be left at Parallel Process and each boulder event would stay as either Event Touch or Player Touch?
The thing is, I used Map X and Y before for all but it was a similar result. Also, I don't know what you exactly mean by the numbers for each Variable. The big thing I see is that, the switches work fine if they're on Same as Character but on Parallel they all activate if the boulder object is moving on their axis. Sorry to ask so many questions even thought you mentioned for me to check out your demo, it's just for this problem I want to express my "oh yeah" while being guided instead of copying directly from you.

This post has been edited by nijal: Aug 16 2011, 02:01 PM


__________________________
Go to the top of the page
 
+Quote Post
   
nijal
post Aug 16 2011, 02:49 PM
Post #4


Level 2
Group Icon

Group: Member
Posts: 27
Type: Writer
RM Skill: Skilled




I took a look at your demo and I you only did a part about jumping.


__________________________
Go to the top of the page
 
+Quote Post
   
Alt_Jack
post Aug 16 2011, 05:08 PM
Post #5


Level 19
Group Icon

Group: Revolutionary
Posts: 377
Type: Event Designer
RM Skill: Skilled
Rev Points: 40




QUOTE (nijal @ Aug 16 2011, 01:47 PM) *
So each switch event would be left at Parallel Process and each boulder event would stay as either Event Touch or Player Touch?

Sorta. I should probably establish this first: there's 5 switches and 5 boulders, and you have to push the boulders onto the switches, right?
You'll need something to keep track of where everything is. "Same as character" just puts them on the same "level" , which allows you to push or move something. "Below chars" is walk over it, ect
Let's say your switch is on tile 5,7 and you have to push the boulder onto it.
Create a parallel process event (PPr), and put it somewhere that the character can't get to it (lights/lamps are great for this) so they don't mess it up. Then make another one, same fashion.
If you have 5 boulders (B1-5), you'll need 5 switches and 10 variables, 2 for each of their X/Y map Co.
We'll just do one:

1st parallel process event
control variables set variable 1 to B1's map X
control variables set variable 2 to B1's map Y
(repeat that for all 5 boulders. Since it's parallel process, it works in real-time and updates the variables based on B's current condition)

2nd parallel process event
condition branch if variable 1 =5
->condition branch is variable 2 = 7
-->turn switch B1 ON

the first one takes the X/Y and assigns it to a variable, and updates it as it changes. The 2nd one checks to see if the variables match the numbers, and when they do, turns a switch on. Keep in mind that all of this checks the position of only one boulder, but you only need the 2 events to run it the entire setup, neither of which should be accessible to the player (it's a precaution).

Assuming each boulder is an event on it's own you'll have: 7 events, 2 parallel process events, 5 switches and 10 variables.

On that note, I'm pretty sure there was a boulder moving event somewhere around here.
QUOTE
I took a look at your demo and you only did a part about jumping.

The lake is on the map (I think it's called woods) with the house, near a bridge and just south of the river at the top. There's also magic tree in the middle of it with 2 very long PPr events. When you walk up to the edge, it asks you if you want to fish or swim. There's a giant explanation about it if you check the comments for the event. The demo's meant for the advanced crowd, so having someone sit there and say some quick bit about it isn't sufficient. You also won't learn anything from one little textbox.
Anyways, the part you need to look at is the part about the 4 corners of the lake. Why? The corners are meant to be excluded, so when you step on them, nothing happens. Why should you care? Because it shows how matching an object's location to variables can cause things to happen (or not).
It's all just a matter of matching variables. The priority setting is irrelevant, and I'm pretty sure the only reason you were having this problem is because you used the PPr's for the switches themselves, which won't work. PPr typically just run things behind the scenes; you shouldn't let the player interact with or even touch them.

This post has been edited by Alt_Jack: Aug 16 2011, 05:17 PM


__________________________

the Alternate Jacks event demo
As well as all of my images in one place, free for use.
Most of my images will be there, since this site takes too long to approve stuff and VX.net has no bulk uploader.
Go to the top of the page
 
+Quote Post
   
nijal
post Aug 17 2011, 09:57 AM
Post #6


Level 2
Group Icon

Group: Member
Posts: 27
Type: Writer
RM Skill: Skilled




What you suggested works!

OH MY GOSH IT WORKS!
ALL CAPS PRAISE!

However, what I did differently is that I used 2 Variables: 0017 for Map X and 0018 for Map Y. For all 5 different boulders.
Everything else was set and what you suggested was also included.
Each switch event when coordinates (Constant) are matched would turn on a Switch: S1-S5.
Those switch events were set as: Below Character and Parallel Process.
The boulders however, are set as: Same as Character and Event Touch.

Thanks for your help.

Also to ask; whenever I Transfer to the location of the area with the boulders, the boulders' positions reset. In your opinion, do you think I should fix this or just leave it alone to just leave as path obstacles?


__________________________
Go to the top of the page
 
+Quote Post
   
Alt_Jack
post Aug 17 2011, 11:52 AM
Post #7


Level 19
Group Icon

Group: Revolutionary
Posts: 377
Type: Event Designer
RM Skill: Skilled
Rev Points: 40




QUOTE (nijal @ Aug 17 2011, 10:57 AM) *
What you suggested works!

Dam straight. thumbsup.gif
QUOTE
Also to ask; whenever I Transfer to the location of the area with the boulders, the boulders' positions reset. In your opinion, do you think I should fix this or just leave it alone to just leave as path obstacles?

Aye, it just reloads the map as if it's a new one (which explains why there aren't any changes), unless you make a PPr the moves them to a location when a switch is on. You can test this by turning the switch on in the F9 menu, but they'll only go to the locations you set for them.
Some games leave map changes (ex: in X-men legends 2, the walls that me n' Rogue demolished by punching guys through them remain broken when you backtrack) but others don't (ex: f----ing Zelda. Link, you're useless dry.gif )
It's really up to you. I made a puzzle like this where you have to push/pull crates and when you go back to it one of the characters asks who moved them back.


__________________________

the Alternate Jacks event demo
As well as all of my images in one place, free for use.
Most of my images will be there, since this site takes too long to approve stuff and VX.net has no bulk uploader.
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: 19th May 2013 - 03:51 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker