Jump to content

Recommended Posts

Posted (edited)

I need help with this script, I'm trying to make it so if the player is carrying the weight equivlent of full heavy armor, he cannot swim effectively. but for some reason, I get slower swimming speed no matter what the player's encumberance is.

begin AAAweightswimming

long enc
long maxenc
long swiftswim
long pcref

if ( player->geteffect sEffectSwiftSwim == 0 )
	set swiftswim to 1
endif

if ( player->geteffect sEffectSwiftSwim == 1 )
	set swiftswim to 0
endif


if ( swiftswim )
	Setx pcref to xGetRef, "Player"
	XSetRef pcref
	setx enc to xgetencumb
	set maxenc to ( player->getstrength )

	if ( enc <= maxenc )
		player->setswimspeed 0
	endif

	if ( enc > maxenc )
		player->setswimspeed -90
	endif
endif


end
Edited by bioshards
Posted

No idea then. I prefer good old vanilla scripting. That has enough issues without adding more lol

 

Why don't you just check for the armour then negate that from swim speed?

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...