⌂ YolkfolkThe Dizzy Fansite
Community discussion

Coding Help

Started by deflector on 25 January 2023 • 4,497 views

64 posts
#91342

@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:  

👍 2
#91346
@noggin-the-nog I even forgot about these additional O_USER properties) a very helpful way to solve my problem. So, many thanks, it works well. One step closer to the game release. And looking forward to see your new game :yes:
👍 0
#91382

Do we have Dizzy's scuba tiles for eating food? (aqualung dressed tiles)

👍 0
#91391
@deflector I think you can find those in the Spellbound Dizzy remake.
👍 1