@deflector Sorry, I forgot how the code for respawning worked. Having had a look at it, I would change the code in the HandlerCollision()
if(ObjGet(idx,O_CLASS)==CLASS_HURT && mode!=0) // hurt objects
{
PlayerHurt(5);
if(PlayerGet(P_LIFE)==0)
{
death = ObjGet(idx,O_DEATH);
PlayerSet(P_DEATH, death);
if(death==1) ///////////////if spiders have O_DEATH=1
{
spawnx = ObjGet(idx,O_RESPAWNX);
spawny = ObjGet(idx,O_RESPAWNY);
if(spawnx!=0) PlayerSet(P_XSAFE,spawnx);
if(spawny!=0) PlayerSet(P_YSAFE,spawny);
}
}
return;
}
With this modification, any CLASS_HURT object with O_DEATH = 1 will make Dizzy respawn at the co-ordinates you set in the map editor. You don't even have to use a custom PlayerRespawn function.
By the way, I'm working on my own game tonight. It's been a WIP for years, but I haven't looked at it for ages. :geek: