Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Collision with not events? (or something)

Hey guys well i made a cool puzzle/challenge where the screen fills up with lava then drains, when it's up you have to be standing on a little island of rock, when it's down you run to the next one. Well the way i did this was with HEAPS of events, (like 300) but i realised that it would almost definitely lag on a slower computer, making that challenge nigh impossible. I was wondering if there were any way i could make an event occur if the player touched normal ground, but then several seconds later when the lava was down again you could run across it.

Thanks in advance ^^

EDIT: Also, a second problem, well i was wondering if there was any way to make an event trigger when it collides with the player. I tried using player touch trigger but it doesn't work if the player doesn't move when they touch =p. Any help?
 
and now here's a kicker... for ya...

I know there is an script on here that references TIME.... now time basically could measure the event every three seconds...

So you could set up the event and copy it for all the tiles with say, three different graphics, (no lava, starting to warm up, and lava in the area)

And then on the time script, simply set that the specific event happens every few seconds... (twenty times per minute) and then the switch of that event goes to the next switch in the next second, and so on and so forth...

It'd basically be a run down of
0. 3
  1. 1
  2. 2
  3. 3
  4. 1
  5. 2
  6. 3
  7. 1
  8. 2
  9. 3
  10. 1
  11. 2
  12. 3

and so on and so forth, until you've created the event script for the entire minute... well, at least until :59, because at 60, it resets, and goes back to zero.

On the event, if the specific switch is on, you could then set damages and such for the event, (i'd assume)

Now, I'm fairly new at it, but was working with it to see about having time be used to open and close a cave door on one of my maps, that only happens once a day for about 5 minutes, like at 'sunset'. One of the time scripts was really cool about that, allowing for the specific timing and even setting map hue due to time of day, so that nighttime could actually have a blueish tint to it, and early morning would make your actor have a shadow to his left, and afternoon to his right, and noon, no shadow.

All fun stuff, good luck on this room though, and when you get it done, I'd LOVE to see a demo of it...
 
You can always use variables and define a certain space. Basically you set the player coordinates to a couple variables and then have something like

If (playerx >= 3 and playerx <= 6) and (playery >= 3 and playery <= 6)

That defines a square. You can have it hurt the player there, or do it the other way around:

While the lava is up,

If (playerx >= 3 and playerx <= 6) and (playery >= 3 and playery <= 6)
---
Else
Hurt player

That makes it so that if you're standing on the little square of land while the lava is up, nothing happens, else you get hurt/die/etc. You can use switches to tell whether the lava is up or not.
 
*stands in awe....* No way, it can't be THAT simple...

so what, would each tile then be an animated tile? and then when the tile is on a certain frame of the animation, that specific terrain tag takes effect?
 
can't you have the lava as panorama? (you'll need 3 pictures)
it's better than 300 events, I guess. then, all your lava is actualy 'empty tile', so if you give the empty tile a terain tag, you can use the Eduardo's idea.
 
For the second problem, I had already tried using event collision, it does the exact same thing as player touch... I figured it out on my own, i just do a parallel process for the platform, I do constant checks of player x and platform x, if they're the same then you lose ^^

For the first problem, EDUARDO ME LUFFS U!!!!11!!one!! Works great ^^. Thanks for help guys, problems are resolved.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top