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

Can I loop a conditional for X amount of time?

Question

I have a jumping puzzle where certain platforms are safe for one second and dangerous for one second. So I have an event that looks like this...

lava+event.png

If player steps on X=15, Y=9 during those 20 frames (1 second) He will get kicked back to the start of the puzzle. That's what I want to happen at least. But the conditional only checks once, it doesn't continuously check for the full 20 frames. How can I make it do that?

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

This is the best solution I could come up with. I guess it works fine, just kind of tedious to put in all those variables for each event.lava+event+fix.png

Share this post


Link to post
Share on other sites
  • 0

it would be pretty simple, from looking at you event i am guessing its some sort of steam shoot,

first set your event to parallel process, in the event get it to wait 20 frames, then after the 20 frames do what you do to make the steam appear using move route commands and changing opacity ect,

put a condition checking if the player is at the same location of the event, if they are set the process of them getting kicked back,

if not just let it continue, a parallel process event is a self looping event so there's no need to put in a loop,

i am guessing you changing self switches to control the animations, like i said do the animation with move route commands, you can change opacity and stop animation triggers ect there, making it so you can build it all in one event page.

 

also for info purposes, as i hate using up lots of variables to do simple stuff, you can check a players location to an events in the conditional branch script section like so:

$game_player.x == $game_map.events[iD].x

$game_player.y == $game_map.events[iD].y

you can also stick them both together into 1 check like so:

$game_player.x == $game_map.events[iD].x && $game_player.y == $game_map.events[iD].y

just replace id with the id of the event, if the id is the same as the event executing it you can put "@event_id", that gets the id of the running event, making it a simple copy and paste event :)

 

also if you want change the range check of the values you can use the following operands:

 

value <= value2 # value is lower or equal to value2

value < value2 # value is lower than value2

value >= value2 # value is greater or equal to value2

value > value2 # value is greater than value2

Edited by diagostimo

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...