altitude spawn

Gurtag

Member
hey guys, not sure if i asked about it back then soo.. can altitude be set on spawn, lets say i want char to spawn on a platform on the bigining of stage, is that posible?
 
Sorry for late reply, I was busy on other project and needed some breaks.

Anyways back to topic, the reason I set respawn coords in the level directly instead of setting coords on where player dies is to prevent respawning on traps. Imagine getting killed by a spike then when you respawn, you respawn on that same spike. If you could walk away after respawning with temporary invincibility state, it could be fine but oftenly the spike is one of spikes in trap hole. IOW you can't get out to safety after respawning.
TLDR, although respawning on specific respawn coords would force player to walk/move/jump through same paths again, IMO it is better than getting stuck on holes.
 
Sorry for late reply, I was busy on other project and needed some breaks.

Anyways back to topic, the reason I set respawn coords in the level directly instead of setting coords on where player dies is to prevent respawning on traps. Imagine getting killed by a spike then when you respawn, you respawn on that same spike. If you could walk away after respawning with temporary invincibility state, it could be fine but oftenly the spike is one of spikes in trap hole. IOW you can't get out to safety after respawning.
TLDR, although respawning on specific respawn coords would force player to walk/move/jump through same paths again, IMO it is better than getting stuck on holes.
hey man no problem i apreciate a lot all your help, there is no problem with traps and the like i dont use them. i have some 2d big levels that would b better if you dont have to walk them over again .. i was thinking in using the same logic i have been using just like you craft it but updateing the level globalvar respawn coords by spawning an dumy entity upon death with say script like an updated checkpoint, it just that geting current coord of this dumy entity and apply them as globalbar is beyond my null knoledge, have been studing script libraries but did not find any examples so far.. i know it works as i used the method with an arbitrary value and got updated, the player respawned to that coords, i just need to grab the death coord values and apply them as globalvar, that is my rasoning what you think?
 
Ah, I see.

If your player character had DEATH animation, you could use this script to record last coords on death:
C:
anim    death
@script
  if(frame==1){
    void self = getlocalvar("self");
    int x = getentityproperty(self, "x");
    int y = getentityproperty(self, "y");

    setglobalvar("xR", x);
    setglobalvar("yR", y));
  }
@end_script
...
 
Ah, I see.

If your player character had DEATH animation, you could use this script to record last coords on death:
C:
anim    death
@script
  if(frame==1){
    void self = getlocalvar("self");
    int x = getentityproperty(self, "x");
    int y = getentityproperty(self, "y");

    setglobalvar("xR", x);
    setglobalvar("yR", y));
  }
@end_script
...
thank you very much man that did the trick....
 
Back
Top Bottom