Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Sign in to follow this  
rgangsta

[VX]Can be XP too.

Question

So. I'm making a puzzle. The actor needs to push bolders around and the final bolder has to be pushed on a switch. Is there a way I can make the switch "pressure sensitive" for the bolder and player? Because when the player steps on the switch, a door opens, but if he gets off, the door shuts automatically. So he needs to put the bolder on the switch so the door stays open. Basically, I want an event to interact with another event. If you play Tomb Raider/Prince of Persia, you'll understand. Take a look. If there's no solution, I'm requesting a script for pressure with events.

 

The red circle is the destination and the blue circle is the bolder to be pushed

2rmavkn.jpg

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I have no clue for VX (I don't use it), but, for RMXP you do the following (note, this does not include animation for the switch getting pushed down):

 

Make a parallel process event that is set to through with the following for your switch:

@>Control Variables: [<Event X>] = [<Rock Event>]'s Map X
@>Control Variables: [<Event Y>] = [<Rock Event>]'s Map Y
@>Control Variables: [<Player X>] = Player's Map X
@>Control Variables: [<Player Y>] = Player's Map Y
@>Conditional Branch: Variable [<Event X>] == <X coordinate>
  @>Conditional Branch: Variable [<Event Y>] == <Y coordinate>
  @>Control Switches: [<Switch>] = On
  @>
  Else
  @>Conditional Branch: Variable [<Player X>] == <X coordinate>
	 @>Conditional Branch: Variable [<Player Y>] == <Y coordinate>
		@>Control Switches: [<Switch>] = On
		@>
		Branch End
	 @>
	 Branch End
  @>
  Branch End
  @>
  Else
  @>Conditional Branch: Variable [<Player X>] == <X coordinate>
  @>Conditional Branch: Variable [<Player Y>] == <Y coordinate>
	 @>Control Switches: [<Switch>] = On
	 @>
	 Else
	 @>Conditional Branch: Variable [<Event X>] == <X coordinate>
		@>Conditional Branch: Variable [<Event Y>] == <Y coordinate>
		   @>Control Switches: [<Switch>] = On
		   @>
		   Branch End
		@>
		Branch End
	 @>
	 Branch End
  @>
  Branch End
  @>
Branch End
@>

 

On a second page in the event, show the event pushed down with the switch ID you used above set to "On" then put the following in the second page (make sure it is also set to through):

 

@>Control Variables: [<Event X>] = [<Rock Event>]'s Map X
@>Control Variables: [<Event Y>] = [<Rock Event>]'s Map Y
@>Control Variables: [<Player X>] = Player's Map X
@>Control Variables: [<Player Y>] = Player's Map Y
@>Conditional Branch: Variable [<Player X>] != <X coordinate>
  @>Conditional Branch: Variable [<Event X>] != <X coordinate>
  @>Control Switches: [<Switch>] = Off
  @>
  Else
  @>Conditional Branch: Variable [<Event Y>] != <Y coordinate>
	 @>Control Switches: [<Switch>] = Off
	 @>
	 Branch End
  @>
  Branch End
  @>
  Else
  @>Conditional Branch: Variable [<Player Y>] != <Y coordinate>
  @>Conditional Branch: Variable [<Event X>] != <X coordinate>
	 @>Control Switches: [<Switch>] = Off
	 @>
	 Else
	 @>Conditional Branch: Variable [<Event Y>] != <Y coordinate>
		@>Control Switches: [<Switch>] = Off
		@>
		Branch End
	 @>
	 Branch End
  @>
  Branch End
  @>
  Branch End
@>

Share this post


Link to post
Share on other sites
  • 0

I believe this might work. Thank you! I'm gonna go try it out. Pretty complicated, though.

 

.:EDIT:.

Nevermind. I can't make "Event's X/Y" variables.

lol I clicked switches button instead of variables.

:P

 

IT WORKS!!!!!!!!!!!!!

THANK YOU SOOOOOO MUCH!!!!!!!!!!

 

Now I'm working on spikes >:D

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...