Footsteps?

Moderator: GZDoom Developers

User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $

Footsteps?

Post by Bio Hazard »

Footsteps cant be too difficult, i dont know why we dont have it yet...

here is an idea of how to go about it (since i dont know the actual function/variable names treat this as pseudocode)

Code: Select all

while(command.+forward){ /* as long as the player is running/walking */
	/* if you have moved far enough to trigger a footstep */
	if(movedist==cvars.footstepfreq){
		movedist=0; /* restart the counter */
		/* get the current sector, wee need to use it a lot */
		long temp_sectorid = getsctridfrm_crds(getactorx(player),getactory(player));
		/* if the player is touching the floor */
		if(getactorz(players.playernumber())==getsctrheight(temp_sectorid,SECTOR_FLOOR)){
			/* get the sound name out of the terrain lump and play it on the footstep channel */
			playsound(SND_CHAN_FOOTSTEPS,SND_VOL_FOOTSTEPS,getsndinfoentry(getterrianinfo(TERRAIN_FOOTSTEP,getsctrflatname(temp_sectorid))));
		}
	}
	moveactor(player.playernumber(),x,y,z);
	movedist++;
}
User avatar
David Ferstat
Posts: 1113
Joined: Wed Jul 16, 2003 8:53 am
Location: Perth, Western Australia

Post by David Ferstat »

Have you seen this thread?
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $

Post by Bio Hazard »

obviously i have cause ive posted in it :P

but i did forget about it :)
User avatar
Cutmanmike
Posts: 11280
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Post by Cutmanmike »

Hey I forgot about this. NEED INPUT

Return to “Closed Feature Suggestions [GZDoom]”