ID:178187
![]() Jun 11 2002, 10:22 am
|
|
In that demo, how would you make it if you fell off a cliff of like, 10 tiles high you take damage?
|
first make the ground turf and then an invis turf named Damageturf.. place the damage turf above the ground turf... like this,
example: Damageturf - d ground - g dddddddddddddddddddddddddddd gggggggggggggggggggggggggggg then add this code, turf/Damageturf Enter(O) usr <<"You hit the ground!" usr <<"Ouch.. You take some damage!" //Damage code here. Deathcheck() mob/proc/Deathcheck() if(src.Health == 0) world <<"[src] Has died!" src.Move(locate(1,1,1)) else ..() |
Well, you see, that's not what he wants. He wanted it so that when you fall 10 spaces, you take damage. Not every time you fall.
|
Maybe he does this.. make a cliff.. and Put the damage turf 10 SPACES UNDER THE CLIFF.. AND only put it there. so you only take damage when uf all off.
|
I probably haven't checked out that demo, but it should be the same for pretty much any sidescroller.
When the tile below you is not dense, then when you Enter() it, perhaps a counter can increase by one (a mob var) until they reach the ground. If it is > 9, then do the damage.
- Malver