OK, I'm using this cog to replace weap_fists.cog and it controls player moves. Only problem is, I can't get any print messages to show up under 'activated' or 'fire'. Any ideas?
------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance
-Tazz
Code:
# Jedi Knight Cog Script
#
# XB_TRICKS.COG - (was WEAP_SABER.COG)
#
# [YB & CYW] - Heavily modified for X-Boarder MOD by Tazz
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
# (C) 2001 Tazz
#
# NOTES:
#
# *still need to add the HUD support and test what I have
# *need to fix sounds
#
symbols
message startup
message activated
message deactivated
message selected
message deselected
message newplayer
message autoselect
message fire
# ........................................................................................
sound tail_grab_snd=tailgrab.wav local
sound nose_grab_snd=nosegrab.wav local
sound back_flip_snd=backflip.wav local
sound front_flip=frontflip.wav local
sound biff_snd=biff.wav local
sound mount_snd=mount.wav local
model povModel=fistv.3do local
model externalMesh=fistg.3do local
thing player local
vector thrust local
int mode local
end
# ========================================================================================
code
startup:
// Go to external (ALWAYS)
if ((GetCurrentCamera() == 0) && (GetPrimaryFocus(0) == player))
CycleCamera();
Print("Start External");
return;
# ........................................................................................
selected:
jkSetPOVModel(player, povModel);
SetArmedMode(player, 0);
jkSetWeaponMesh(player, externalMesh);
jkSetWaggle(player, '0 0 0', 0);
//Play board mounting animation??
//PlayMode(player, 42);
SetMountWait(player, 0);
SetCurWeapon(player, 1);
// Go to external (ALWAYS)
if ((GetCurrentCamera() == 0) && (GetPrimaryFocus(0) == player))
CycleCamera();
Print("Selected");
return;
# ........................................................................................
deselected:
SetMountWait(player, 0);
jkSetWaggle(player, '0.0 0.0 0.0', 0);
return;
# ........................................................................................
activated:
Print("Activated");
mode = GetSenderRef();
jkSetWaggle(player, '0.0 0.0 0.0', 0);
if (mode > 1)
return;
Print("MODE OK");
ActivateWeapon(player, 0.1, mode);
Print("ActivateWeapon[player, 0.1, mode]");
return;
# ........................................................................................
deactivated:
mode = GetSenderRef();
jkSetWaggle(player, '10.0 7.0 0.0', 350);
DeactivateWeapon(player, mode);
return;
# ........................................................................................
fire:
Print("Fire");
mode = GetSenderRef();
if (mode == 0)
{
thrust = GetThingThrust(player);
// MELANCHOLY
if (VectorX(thrust) > 0)
{
PlayMode(player, 15);
//PlaySoundThing(tail_grab_snd, player, 1.0, -1.0, -1.0, 0x80); //Tail Grab sound
Print("MELANCHOLY");
}
else
// STALEFISH
if (VectorX(thrust) < 0)
{
PlayMode(player, 38);
//PlaySoundThing(tail_grab_snd, player, 1.0, -1.0, -1.0, 0x80); //Tail Grab sound
Print("STALEFISH");
}
else
// INDY
if (IsThingCrouching(player) > 0)
{
PlayMode(player, 17);
//PlaySoundThing(tail_grab_snd, player, 1.0, -1.0, -1.0, 0x80); //Tail Grab sound
Print("INDY");
}
else
// SUPERMAN
{
PlayMode(player, 8);
//PlaySoundThing(tail_grab_snd, player, 1.0, -1.0, -1.0, 0x80); //Tail Grab sound
Print("SUPERMAN");
}
}
// mode == 1
else
{
thrust = GetThingThrust(player);
// MELANCHOLY 360
if (VectorX(thrust) > 0)
{
PlayMode(player, 16);
//PlaySoundThing(tail_grab_snd, player, 1.0, -1.0, -1.0, 0x80); //Tail Grab sound
}
else
// STALEFISH 360
if (VectorX(thrust) < 0)
{
PlayMode(player, 19);
//PlaySoundThing(tail_grab_snd, player, 1.0, -1.0, -1.0, 0x80); //Tail Grab sound
}
else
// INDY 360
if (IsThingCrouching(player) > 0)
{
PlayMode(player, 35);
//PlaySoundThing(tail_grab_snd, player, 1.0, -1.0, -1.0, 0x80); //Tail Grab sound
}
else
// TAILGRAB
{
PlayMode(player, 18);
//PlaySoundThing(tail_grab_snd, player, 1.0, -1.0, -1.0, 0x80); //Tail Grab sound
}
}
return;
# ........................................................................................
newplayer:
// Go to external (ALWAYS)
if ((GetCurrentCamera() == 0) && (GetPrimaryFocus(0) == player))
CycleCamera();
Print("Newplayer");
return;
# ........................................................................................
autoselect:
// Return the saber when out of everthing except the fists
// If the player has the weapon
if(GetInv(player, 10) != 0.0)
{
ReturnEx(1100.0);
Print("autoselected");
}
else
{
ReturnEx(-1.0);
}
Return;
end------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance
-Tazz
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance
Tazz
Tazz
![http://forums.massassi.net/html/wink.gif [http://forums.massassi.net/html/wink.gif]](http://forums.massassi.net/html/wink.gif)