LucasForums

LucasForums (http://www.lucasforums.com/index.php)
-   Jedi Knight / MotS (http://www.lucasforums.com/forumdisplay.php?f=38)
-   -   Help with a cog (http://www.lucasforums.com/showthread.php?t=50754)

XxWinnaRxX 05-05-2002 07:32 PM

Help with a cog
 
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]
#
# (C) 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.


All times are GMT -4. The time now is 03:04 PM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
LFNetwork, LLC ©2002-2011 - All rights reserved.