Jump to content

Home

Help with a cog


XxWinnaRxX

Recommended Posts

I've posted this at Massassi, but nobody seems to care about JK much anymore. It takes two or three forums to get the same effect as one.

 

Anyway, I'm making a really spiffy JK mod. Force Well handles wall runs. This cog will not work. Hell Raiser of the TDiR team couldn't figure out why it wouldn't work either, I hope it's something totally easy to fix.

 

-------------------------------

 

# Jedi Knight Cog Script

#

# FORCE_WELL.COG

#

# JEDI RANK Script

# Bin 20

#

# The rank of a Jedi determines his mana regeneration rate.

#

# [YB]

#

# © 1997 LucasArts Entertainment Co. All Rights Reserved

 

 

symbols

 

thing player local

 

int limit

 

message startup

message pulse

 

end

 

# ========================================================================================

 

code

 

startup:

player = GetLocalPlayerThing();

Sleep(1.0);

SetPulse(0.001);

Limit = 0.5;

pthrust = getthingthrust(player);

 

Return;

 

# ........................................................................................

 

pulse:

// don't do anything if the player is currently dead

if(GetThingHealth(player) < 1) Return;

 

if(vectorX(pthrust) > limit || vectorY(pthrust) > limit || vectorZ(pthrust) > limit)

{

setphysicsflags(player, 0xD0);

}

else

if(vectorX(pthrust) < limit || vectory(pthrust) < limit || vectorz(pthrust) < limit)

{

Clearphysicsflags(player, 0x90);

}

 

Return;

 

end

 

 

-----------------------

 

SetPhysicsFlags(player, 0xd0) = Walking on walls on.

Clearphysicsflags(player, 0x90) = walking on walls off.

 

I know that the limit int is a little too low, but that's for testing, provided I ever get the thing to work. -_-

 

Help is greatly appreciated.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...