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.

Lava/bottomless pit/water

I'm trying to make it so when you step on the lava/bottomless pit/water tiles that you fall, I think I have the idea by using terrain tags and a common event, but I don't know how to link them.
 
Set an event to player touch.
When you touch it, use a complex set move route:
Player:
Direction Fix ON
Through ON
One Step Forward (so they step out over the pit, which the game thinks is solid)
Move Down
Set Opacity: 100
Move Down
Set Opacity: 50
Set Opacity: 0
Play SE: (some kind of sound that signifies you've fallen and gotten bruised)
Move Up
Move Up
One Step Backward (we're resetting the player position)
Set Opacity 255
Set Opacity 0
Set Opacity 255
Set Opacity 0
Set opacity 255
Set Opacity 0
Set Opacity 255 (a flash effect)
Through OFF
Direction Fix OFF
(end move route)
Wait 5 frames (so that if the player dies, it's at about the time they are falling. May need to adjust this number.)
Change Health: Entire Party: -100 (or whatever)
 
There, the problem is that you need a lot of events-- one per square that the player might walk on. That can lead to a lot of lag, in turn.

To do it with terrain tags, you'll need to do the following:

1) Set the terrain tags in the Tileset tab. Pretty straightforward.

2) Have one Parallel Process event on the map. Have it set a variable equal to the player's terrain tag, and check it-- when they're on the bad terrain, do whatever flashy SFX/Game Over/Transfer Player you want to do.
 
Unka Josh":bv1gv312 said:
There, the problem is that you need a lot of events-- one per square that the player might walk on. That can lead to a lot of lag, in turn.

To do it with terrain tags, you'll need to do the following:

1) Set the terrain tags in the Tileset tab. Pretty straightforward.

2) Have one Parallel Process event on the map. Have it set a variable equal to the player's terrain tag, and check it-- when they're on the bad terrain, do whatever flashy SFX/Game Over/Transfer Player you want to do.


Thanks!
 
Hey, no problem. Let me know if you need screenshots of a demo or something-- I think I've got some kicking around somewhere.

Yes, I could use a picture of the parrel process and varible thing, I don't get how it would help.


theory":zz4f1pwx said:
Set an event to player touch.
When you touch it, use a complex set move route:
Player:
Direction Fix ON
Through ON
One Step Forward (so they step out over the pit, which the game thinks is solid)
Move Down
Set Opacity: 100
Move Down
Set Opacity: 50
Set Opacity: 0
Play SE: (some kind of sound that signifies you've fallen and gotten bruised)
Move Up
Move Up
One Step Backward (we're resetting the player position)
Set Opacity 255
Set Opacity 0
Set Opacity 255
Set Opacity 0
Set opacity 255
Set Opacity 0
Set Opacity 255 (a flash effect)
Through OFF
Direction Fix OFF
(end move route)
Wait 5 frames (so that if the player dies, it's at about the time they are falling. May need to adjust this number.)
Change Health: Entire Party: -100 (or whatever)

Thanks, That's the kind of animation/Sound effect/HP reduction I needed, It would've taken me a while to figure that out.
 
After testing that, you don't need the first Step Forward. You do need the step back, though. Also might want to change speed to 5 before the Move Down part. Don't forget to change it back. And add a wait 1 frame between each flash, or it doesn't show up.
 
W31WGamer":2ve06m45 said:
Hey, no problem. Let me know if you need screenshots of a demo or something-- I think I've got some kicking around somewhere.

Yes, I could use a picture of the parrel process and variable thing, I don't get how it would help.

Okay, I'm first assuming that you've got a handle on how to set terrain tags. It's pretty simple, fortunately. (Well, as long as you're using XP. For some reason, Enterbrain decided to remove Terrain Tags from VX, perhaps out of a desire to force more people to learn Ruby.)

Once you have a terrain tag set, you'll need an event like this.

LavaCheck.png


It could be a common event, but I'm keeping it simpler here by just making it an event that you'd need one copy of per map that has, say, lava. (I'm also going with a very, very simple version of the hot lava-- animation, does damage, that's it.)

As you can see, it's pretty straightforward. The Wait after damage is inflicted is to give players a chance to get off the lava before the whole party is incinerated-- otherwise, it'd inflict damage about 20 times per second, which is a little rough on players with lowly human reflexes.

The second wait is an anti-lag feature. It's not perfect, but it seems to help, at least on my machine.

Was that clear? Do you need more detail on how to set Terrain Tags?
 

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