How to Make the Player Swim Like Modern FPS: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
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...
 
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
This code was original posted by James AKA JBlade on AMC.
This code was originaly posted by James AKA JBlade on AMC.
Find the APLAYER actor line in GAME.CON and add the folling code just under it.


<pre>
<pre>
gamevar TEMP 0 0 // Unless you have this defined somewhere else you will need it
gamevar TEMP2 0 0 // Unless you have this defined somewhere else you will need it
ifinwater
ifinwater
ifp prunning
ifp prunning
Line 18: Line 22:
If you think you move up/down too fast simply change the -20 to a slightly lower value.
If you think you move up/down too fast simply change the -20 to a slightly lower value.


Thanks to James for the code.
Thanks to James for this code.


[[Category: Tutorials]]
[[Category: Tutorials]]

Latest revision as of 08:29, 27 October 2008

This code was originaly posted by James AKA JBlade on AMC. Find the APLAYER actor line in GAME.CON and add the folling code just under it.

gamevar TEMP 0 0 // Unless you have this defined somewhere else you will need it
gamevar TEMP2 0 0 // Unless you have this defined somewhere else you will need it

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 this code.