03-03-2011, 21:18
(This post was last modified: 03-05-2011, 23:07 by Tomsen1410.)
Ok, im working on a new Mod. Jumpers vs Paladins.
My Problem: When you are on the Paladin Team, a random Player have to be choosed to be the Paladin Boss. But this doesnt works ... -,-
Heres the Random Function Code:
But it doesnt works![Sad Sad](https://www.itsmods.com/forum/images/smilies/sad.gif)
Everyone spawns as a Paladin or a Jumper
BUT NOONE IS THE BOSSPALADIN!!!
I ve tried everything. Pls help. I really dont get it.
My Problem: When you are on the Paladin Team, a random Player have to be choosed to be the Paladin Boss. But this doesnt works ... -,-
Heres the Random Function Code:
Code:
doPaladin()
{//weapon stuff}
doJumper()
{//weapon stuff}
SelectBossPaladin()
{
level endon ( "game_ended" );
level.BPaladin = randomInt(level.players.size[team.axis]);
}
doBossPaladin()
{
//weapon stuff... bla bla bla
}
...
//ON PLAYER SPAWN:
if(self.team == "allies")
{
self thread doJumper();
}
else if(self.team == "axis")
{
self thread doPaladin();
}
else if(level.players[level.BPaladin] && self.team == "axis")
{
self thread doBossPaladin();
}
//BTW:l level.BPaladin is the variable with the random number
But it doesnt works
![Sad Sad](https://www.itsmods.com/forum/images/smilies/sad.gif)
Everyone spawns as a Paladin or a Jumper
BUT NOONE IS THE BOSSPALADIN!!!
I ve tried everything. Pls help. I really dont get it.