Ok i had two cogging questions...
1: is it possible to randomly select an MP players and make him an assassination target? if so what would the coding be like to isolate him/her from the rest of the MP players?
2: ive been working on a bank cog for MOTS MP and from what i can tell through my cogging abilities <which are pretty low
>it should work perfectly but it doesn't anyways heres the code:
# Jedi Knight Cog Script
# Bank.cog
# !!!!!DEBUG VERSION!!!!!
# By: JK2k_Avenger
# This Cog is Not supported by LucasArts Entertainment Co
symbols
surface Deposit
surface Withdrawl
Int Player Local
Int Inuse=0 Local
Int CashPlayerHas=0 Local
Int CashInBank=0 Local
Int CashToTakeOut=0 Local
Int Cashbin=40
sound ActivateSND
sound DeactivateSND
flex debugpause
Message Activated
end
# ========================================================================================
code
# ========================================================================================
Activated:
Print("A Surface Has Been Activated");
Sleep(debugpause);
If(Inuse == 1)
{
Return;
}
Inuse=1;
Print("MOTS has made it past Inuse");
Sleep(debugpause);
if(GetSenderRef() == Deposit) {
Print("Deposit switch pressed");
Sleep(debugpause);
SetWallCel(Deposit, 1);
Print("Wall Cell Changed");
Sleep(debugpause);
PlaySoundPos(ActivateSND, SurfaceCenter(GetSenderRef()), 1, -1, -1, 0);
Print("ActivateSND Played");
Sleep(debugpause);
CashPlayerHas=GetInv(player, Cashbin);
Print("checked to see how much money the player has");
Sleep(debugpause);
CashInBank=CashInBank+CashPlayerHas
JkStringClear();
JkStringConcatFormattedInt(CashPlayerHas, "Deposited %d credits. ");
JkStringConcatFormattedInt(CashInBank, "You now have %d credits in the bank");
JkStringOutPut(player, -1);
Sleep(debugpause);
Print("Added money to CashInBank");
Sleep(debugpause);
CashPlayerHas=0
Print("removed all money from player");
Sleep(debugpause);
SetWallCel(Deposit, 0);
Print("reset Wall Cell");
Sleep(debugpause);
PlaySoundPos(DeactivateSND, SurfaceCenter(GetSenderRef()), 1, -1, -1, 0);
Print("DeactivateSND Played);
}
if(GetSenderRef() == Withdrawl) {
Print("Withdrawl switch pressed");
Sleep(debugpause);
SetWallCel(Withdrawl, 1);
Print("Wall Cell Changed");
Sleep(debugpause);
PlaySoundPos(ActivateSND, SurfaceCenter(GetSenderRef()), 1, -1, -1, 0);
Print("ActivadeSND Played");
Sleep(debugpause);
CashPlayerHas=GetInv(player, Cashbin);
Print("checked to see how much money the player has");
Sleep(debugpause);
CashToTakeOut=1000-CashPlayerHas
Print("checked to see how much money the player can take out");
Sleep(debugpause);
CashPlayerHas=CashPlayerHas+CashToTakeOut
Print("Gives player the money from the bank");
Sleep(debugpause);
CashInBank=CashInBank-CashToTakeOut
Print("Removed Money From Bank");
Sleep(debugpause);
JkStringClear();
JkStringConcatFormattedInt(CashToTakeOut, "Withdrew %d credits");
JkStringConcatFormattedInt(CashInBank, "You now have %d credits in the bank");
JkStringOutPut(player, -1);
SetWallCel(Withdrawl, 0);
Print("Reset Wall Cell");
Sleep(debugpause);
PlaySoundPos(DeactivateSND, SurfaceCenter(GetSenderRef()), 1, -1, -1, 0);
Print("DeactivateSND Played");
Sleep(debugpause);
}
Inuse=0;
Return;
# =========================================================================================
end
This cog is in the debug mode (for me debug is using a print statement after every line of code) it wont even get to the first print statement so i have no idea whats wrong with this
------------------
Join JK2k on the zone! go to http://www.jk2k.8k.com
1: is it possible to randomly select an MP players and make him an assassination target? if so what would the coding be like to isolate him/her from the rest of the MP players?
2: ive been working on a bank cog for MOTS MP and from what i can tell through my cogging abilities <which are pretty low
![http://forums.massassi.net/html/frown.gif [http://forums.massassi.net/html/frown.gif]](http://forums.massassi.net/html/frown.gif)
# Jedi Knight Cog Script
# Bank.cog
# !!!!!DEBUG VERSION!!!!!
# By: JK2k_Avenger
# This Cog is Not supported by LucasArts Entertainment Co
symbols
surface Deposit
surface Withdrawl
Int Player Local
Int Inuse=0 Local
Int CashPlayerHas=0 Local
Int CashInBank=0 Local
Int CashToTakeOut=0 Local
Int Cashbin=40
sound ActivateSND
sound DeactivateSND
flex debugpause
Message Activated
end
# ========================================================================================
code
# ========================================================================================
Activated:
Print("A Surface Has Been Activated");
Sleep(debugpause);
If(Inuse == 1)
{
Return;
}
Inuse=1;
Print("MOTS has made it past Inuse");
Sleep(debugpause);
if(GetSenderRef() == Deposit) {
Print("Deposit switch pressed");
Sleep(debugpause);
SetWallCel(Deposit, 1);
Print("Wall Cell Changed");
Sleep(debugpause);
PlaySoundPos(ActivateSND, SurfaceCenter(GetSenderRef()), 1, -1, -1, 0);
Print("ActivateSND Played");
Sleep(debugpause);
CashPlayerHas=GetInv(player, Cashbin);
Print("checked to see how much money the player has");
Sleep(debugpause);
CashInBank=CashInBank+CashPlayerHas
JkStringClear();
JkStringConcatFormattedInt(CashPlayerHas, "Deposited %d credits. ");
JkStringConcatFormattedInt(CashInBank, "You now have %d credits in the bank");
JkStringOutPut(player, -1);
Sleep(debugpause);
Print("Added money to CashInBank");
Sleep(debugpause);
CashPlayerHas=0
Print("removed all money from player");
Sleep(debugpause);
SetWallCel(Deposit, 0);
Print("reset Wall Cell");
Sleep(debugpause);
PlaySoundPos(DeactivateSND, SurfaceCenter(GetSenderRef()), 1, -1, -1, 0);
Print("DeactivateSND Played);
}
if(GetSenderRef() == Withdrawl) {
Print("Withdrawl switch pressed");
Sleep(debugpause);
SetWallCel(Withdrawl, 1);
Print("Wall Cell Changed");
Sleep(debugpause);
PlaySoundPos(ActivateSND, SurfaceCenter(GetSenderRef()), 1, -1, -1, 0);
Print("ActivadeSND Played");
Sleep(debugpause);
CashPlayerHas=GetInv(player, Cashbin);
Print("checked to see how much money the player has");
Sleep(debugpause);
CashToTakeOut=1000-CashPlayerHas
Print("checked to see how much money the player can take out");
Sleep(debugpause);
CashPlayerHas=CashPlayerHas+CashToTakeOut
Print("Gives player the money from the bank");
Sleep(debugpause);
CashInBank=CashInBank-CashToTakeOut
Print("Removed Money From Bank");
Sleep(debugpause);
JkStringClear();
JkStringConcatFormattedInt(CashToTakeOut, "Withdrew %d credits");
JkStringConcatFormattedInt(CashInBank, "You now have %d credits in the bank");
JkStringOutPut(player, -1);
SetWallCel(Withdrawl, 0);
Print("Reset Wall Cell");
Sleep(debugpause);
PlaySoundPos(DeactivateSND, SurfaceCenter(GetSenderRef()), 1, -1, -1, 0);
Print("DeactivateSND Played");
Sleep(debugpause);
}
Inuse=0;
Return;
# =========================================================================================
end
This cog is in the debug mode (for me debug is using a print statement after every line of code) it wont even get to the first print statement so i have no idea whats wrong with this
------------------
Join JK2k on the zone! go to http://www.jk2k.8k.com
Join JK2k on the zone! go to http://www.jk2k.8k.com