the cog is so simple it should work. but if i add it to the template of the bryar (or a new template) JK gets stuck in limbo, allthough JK is definatly dead and black and gone, the resolution is the same as JK... but i am definatly in windows... its.. wierd.. but i cant see the desktop because JK is in the way... any ideas why?
------------------
I am Darth PJB!
well, go on, run away!
i have a plastic lightsaber and a jedi cape.. am i a nerd?
If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
Code:
# Jedi Knight Cog Script
#
# POW_BRYAR.COG
#
# POWERUP Script - Bryar Pistol pickup
#
# [YB & CYW]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
thing powerup local
thing player local
int bin=2 local
int ammobin=11 local
sound pickupsnd=thrmlpu2.wav local
sound respawnsnd=Activate01.wav local
int bin_contents=0 local
int autopickup=0 local
int autoselect_weapon=-1 local
message activated
message taken
message respawn
end
# ========================================================================================
code
activated:
player = GetSourceRef();
powerup = GetSenderRef();
if((GetInv(player, bin) == 0) || (GetInv(player, ammobin) < GetInvMax(player, ammobin)))
{
print("you bought a bryar pistol for 15 credits");
TakeItem(powerup, player);
}
Return;
# ........................................................................................
taken:
player = GetSourceRef();
powerup = GetSenderRef();
// Do effects.
PlaySoundThing(pickupsnd, powerup, 1.0, -1, -1, 0);
AddDynamicTint(player, 0.0, 0.0, 0.2);
if(GetInv(player, bin) == 0)
{
// Pickup gun and ammo.
// Print("Bryar Pistol");
jkPrintUNIString(player, bin);
ChangeInv(player, bin, 1.0);
// store the old bin contents
bin_contents = GetInv(player, ammobin);
ChangeInv(player, ammobin, 10.0);
// Check for Auto Pickup
autopickup = GetAutoPickup();
if(autopickup & 1)
{
if(!((autopickup & 4) && (GetWeaponPriority(player, GetCurWeapon(player), 0) >= GetWeaponPriority(player, bin, 0))))
{
if(!((autopickup & 8) && (GetCurWeapon(player) == 10)))
{
SelectWeapon(player, bin);
Return;
}
}
}
// Check for Auto Reload
if(GetAutoReload() & 1)
{
if(!bin_contents)
{
if(!((GetAutoReload() & 2) && (GetCurWeapon(player) == 10)))
{
// Try to autoselect and see if the best weapon is an energy cell weapon
autoselect_weapon = AutoSelectWeapon(player, 2);
if((autoselect_weapon == 2) || (autoselect_weapon == 3))
SelectWeapon(player, autoselect_weapon);
}
}
}
}
else
if(GetInv(player, ammobin) < GetInvMax(player, ammobin))
{
// Pickup ammo only.
// Print("Energy Cells");
jkPrintUNIString(player, ammobin);
// store the old bin contents
bin_contents = GetInv(player, ammobin);
ChangeInv(player, ammobin, 10.0);
// Check for Auto Reload
if(GetAutoReload() & 1)
{
if(!bin_contents)
{
if(!((GetAutoReload() & 2) && (GetCurWeapon(player) == 10)))
{
// Try to autoselect and see if the best weapon is an energy cell weapon
autoselect_weapon = AutoSelectWeapon(player, 2);
if((autoselect_weapon == 2) || (autoselect_weapon == 3))
SelectWeapon(player, autoselect_weapon);
}
}
}
}
Return;
# ........................................................................................
respawn:
powerup = GetSenderRef();
PlaySoundThing(respawnsnd, powerup, 0.6, 5.0, 10.0, 0);
Return;
end------------------
I am Darth PJB!
well, go on, run away!
i have a plastic lightsaber and a jedi cape.. am i a nerd?
If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
I am Darth PJB!
well, go on, run away!
i have a plastic lightsaber and a jedi cape.. am i a nerd?
If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
well, go on, run away!
i have a plastic lightsaber and a jedi cape.. am i a nerd?
If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?

![http://forums.massassi.net/html/frown.gif [http://forums.massassi.net/html/frown.gif]](http://forums.massassi.net/html/frown.gif)