[No] Footsteps?

Moderator: GZDoom Developers

Footsteps?

Postby 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 allExpand view
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
Bio Hazard
Lord of the Lord of Nitpicking.
 
Joined: 15 Aug 2003
Location: ferret ~/C/ZDL $

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

Have you seen this thread?
User avatar
David Ferstat
Oh dear, I think you'll find reality is on the blink again.
 
Joined: 16 Jul 2003
Location: Perth, Western Australia

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

obviously i have cause ive posted in it :P

but i did forget about it :)
User avatar
Bio Hazard
Lord of the Lord of Nitpicking.
 
Joined: 15 Aug 2003
Location: ferret ~/C/ZDL $

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

Hey I forgot about this. NEED INPUT
User avatar
Cutmanmike
Is it hot in here or is it just ZScript
 
Joined: 06 Oct 2003
Location: United Kingdom
Discord: https://discord.gg/Whts7Bj
Operating System: Windows Vista/7/2008 64-bit


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest