Ok, this is for the new version of the Iron Jedi. I used this exact cog in JK and it worked fine but in MotS it causes a problem. I checked all the bins to make sure they were all right and they were. The cog is supposed to make you invisible, and it does. The problem is that, when I have this Force power available, I'm invincible. If I choose it as one of my multiplayer powers, I'm invincible. If I play a single player mission and type iamagod for all Force powers, I instantly become invincible. Why is it? Does this power just make you superior or what? Anytime you have this power available you are invincible? Why? Here's the cog...
------------------
Ohh Crap! - Darien Fawkes (The Invisible Man)
Code:
# Jedi Knight Cog Script
#
# FORCE_QUICKSILVER.COG
#
# Modified by LordXT to render user invisible.
#
# FORCEPOWER Script - Quicksilver
# Light Side Power
# Bin 29
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
thing player local
flex mana local
flex cost=7.0 local
int rank local
int effectHandle=-1 local
sound persuasionSound=ForcePersuas01.WAV local
template qs_tpl=+quicksilver local
message startup
message activated
message timer
message pulse
message newplayer
message killed
message selected
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
call stop_power;
Return;
# ........................................................................................
activated:
if(!IsInvActivated(player, 29))
{
mana = GetInv(player, 14);
if(mana >= cost)
{
Sleep(2.0);
SetInvActivated(player, 29, 1);
PlayMode(player, 24);
// Play activation sound
PlaySoundThing(persuasionSound, player, 1.0, -1, -1, 0x80);
// Create the sphere
SendTrigger(-1, 1777, player, randVec, 0, 0);
rank = GetInv(player, 29);
// Set player invisible to AI
SetActorFlags(player, 0x80);
effectHandle = newColorEffect(0, 1, 1, 0, 0, 0, 0, 0, 0, 1.0);
EnableIRMode(1.0, 1);
SetThingCurGeoMode(player, 0);
jkSetFlags(player, 0x0);
SetTimer(0.1);
SetPulse(0.1);
}
}
else
if(IsInvActivated(player, 29))
call stop_power;
// Create the Quicksilver
SendTrigger(-1, 1778, player, randVec, 0, 0);
Return;
# ........................................................................................
timer:
// Check to see if we've been killed or turned off the Force power
if(GetThingHealth(player) < 1) Return;
if(!IsInvActivated(player, 29)) Return;
mana = GetInv(player, 14);
if(mana >= cost)
{
if(GetInv(player, 65) != 1)
ChangeInv(player, 14, -cost);
SetTimer(1.0);
}
else
{
rank = GetInv(player, 29);
DamageThing(player, 0.5 * rank, 0x8, GetSourceRef());
SetTimer(1);
SetPulse(1);
}
Return;
# ........................................................................................
pulse:
if(GetThingHealth(player) < 1) call stop_power;
AddDynamicTint(player, 0, 0, 1000.0);
Return;
# ........................................................................................
selected:
jkPrintUNIString(player, 29);
Return;
# ........................................................................................
killed:
if(GetSenderRef() != player) Return;
newplayer:
call stop_power;
Return;
# ........................................................................................
stop_power:
SetPulse(0);
KillTimerEx(1);
SetInvActivated(player, 29, 0);
ClearActorFlags(player, 0x80);
freeColorEffect(effectHandle);
effectHandle = -1;
DisableIRMode();
SetThingCurGeoMode(player, GetThingGeoMode(player));
jkClearFlags(player, 0x0);
Return;
end------------------
Ohh Crap! - Darien Fawkes (The Invisible Man)
Ohh Crap! - Darien Fawkes (The Invisible Man)