How to Make the Player Swim Like Modern FPS

From EDukeWiki
Revision as of 05:54, 14 August 2008 by The Commander (talk | contribs) (New page: This code was original posted by James AKA JBlade on AMC. <pre> ifinwater ifp prunning { getinput[THISACTOR].extbits TEMP2 ifvarand TEMP2 1 { getplayer[THISACTOR].horiz TEMP subv...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This code was original posted by James AKA JBlade on AMC.

ifinwater
ifp prunning
	{
	getinput[THISACTOR].extbits TEMP2
	ifvarand TEMP2 1
		{
		getplayer[THISACTOR].horiz TEMP
		subvar TEMP 100 // 100 horiz equals straight ahead, so take away 100 and make 0 'straight ahead' for this
		mulvar TEMP -20
		setplayer[THISACTOR].poszv TEMP
		}
	}

If you think you move up/down too fast simply change the -20 to a slightly lower value.

Thanks to James for the code.