I have two trigger_multiple's with the key/value of setthreadtake_weaps and the other setthread give_weaps. I use a edited shortcut to test my map so it goes stright into the map from the desktop and changes game type to team death match. The script and triggers work exactly the way i want them to however when i start the game up properly so my friends can join they do not work at all. What have i done wrong?
//---------------------------T A K E-----W E A P O N S---------------------------------------------
take_weaps:
if ($player.dmteam == "axis")
{
$player takeall
}
if ($player.dmteam == "allies")
{
$player takeall
}
end
//---------------------------G I V E-----W E A P O N S---------------------------------------------
give_weaps:
if ($player.dmteam == "axis")
{
$player item weapons/p38.tik
}
if ($player.dmteam == "allies")
{
$player item weapons/colt45.tik
}
end
$player refers to all players and since all players can be both axis and allies the script won't work you will have to go through each player one at a time for it to work .
$player takeall // works for all players
for(local.i=1;local.i<=$player.size;local.i++)
{
if ($player[local.i].dmteam == "axis")
{
$player[local.i] give weapons/p38.tik
}
if ($player[local.i].dmteam == "allies")
{
$player[local.i] give weapons/colt45.tik
}
}
but the players allready get those weapons when they spawn so you have to change that if you want to see if it works .
you miss understand what i mean.... because there is a script getting rid of the weapons when they run through one trigger, they don't have them weapons at all. Like i said, the script works as i want it to, when i run through the first trigger i loose my guns, when i run through the other i gain a pistol. The problem is, when on the map playing others online, the script doesn't come into effect, as if the triggers are not that to begin with... So i'm guessing that ive used code for single player only...
I understand just look at what I wrote about going through each player either that or if you want to give a weapon to just one player who triggers a trigger then use
local.player = parm.other // parm.other is last player to trigger a trigger since this thread is triggered then it is the player who triggered this trigger but it won't stay as this player if another trigger is triggered so save who triggered this trigger by assigning the player to local.player in this thread
if (local.player.dmteam == "axis")
{
local.player give weapons/p38.tik
}
if (local.player.dmteam == "allies")
{
local.player give weapons/colt45.tik
}