Footsteps?

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Footsteps?

by Cutmanmike » Sun Mar 13, 2005 5:13 am

Hey I forgot about this. NEED INPUT

by Bio Hazard » Sat Mar 12, 2005 10:25 pm

obviously i have cause ive posted in it :P

but i did forget about it :)

by David Ferstat » Sat Mar 12, 2005 8:37 pm

Have you seen this thread?

Footsteps?

by Bio Hazard » Sat Mar 12, 2005 6:46 pm

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++;
}

Top