# 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
-------------------
That's my wallrun cog for the mod I'm making. SetPhysicsFlags(player, 0xd0) turns on WoW, clearphysicsflags(player, 0x90) turns it off. I know the thingthrust int is kinda low, but that's just for testing purposes.
I talked with Hell Raiser of TDiR, he has yet to find anything wrong with it, yet I can't get it to work for the life of me. Can somebody please offer some advice? Point out a flaw? Something they think is keeping the cog from working?
#
# 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
-------------------
That's my wallrun cog for the mod I'm making. SetPhysicsFlags(player, 0xd0) turns on WoW, clearphysicsflags(player, 0x90) turns it off. I know the thingthrust int is kinda low, but that's just for testing purposes.
I talked with Hell Raiser of TDiR, he has yet to find anything wrong with it, yet I can't get it to work for the life of me. Can somebody please offer some advice? Point out a flaw? Something they think is keeping the cog from working?
"I hate ravers. Raving Fruit Boy wears stupidass jewelry so he'll be the coolest kid at the Nitrous Oxide tent." --Cliff Yablonski