Game Development Community

Player death on terrain touch

by Johnathon · in Torque Game Engine · 04/05/2008 (1:17 pm) · 1 replies

I know this can be done, but I was curious if it could be done through TS or if I had to make modifications to the C++ code. I would rather do it all through TS, as I have no clue when it comes to C++.

if anyone could point me in the general direction i would appreciate it! My game is a single player only game with no AI so I only need to worry about the player making contact with the ground, it's all suspended in the air similar to marble blast.

I thought about creating a huge trigger underneather the floating environment and if the player fell into it just kill him/her, but it seemed like a hacky approach to me. What do you think?

Thanks in advance!
Johnathon

#1
04/05/2008 (2:35 pm)
If you aren't relying on terrain below the player, you could place a waterblock there and change
liquidType = "OceanWater";
to
liquidType = "HotLava";
That will accomplish what you are looking to do.
You may....(haven't tried this) make a fully transperant texture and texture the water with it to use over your terrain if you want the terrain showing.
Otherwise, you would have to write a function to kill the player when colliding with terrain in the onCollision datablock of player.cs (don't know if that can be done tho)