Page 1 of 1

Check for last player....

Posted: Fri Jun 01, 2007 6:48 pm
by Ophisâ„¢
Before i start, I cant script. Period.

but...

I've been trying to work out how to make a script that, if there is less then 2 players inside an area, (a trigger_multiple maybe?) it takes all weapons from this player and then triggers a door (with the targetname sa_winner).

I can't script to save my life, however heres some guess work i did lol.. i bet its nothing like how it should look but its worth a shot!

Code: Select all

main:
level waittill prespawn

thread speed_assault

level waittill spawn

speed_assault:
local.sa = 4 // I'm guessing this sets "sa" (give trigger_multiple targetname 'sa'?) to 4?
if (local.sa < 2) // If less then to players detected run the following?
{
local.player = palm.other
local.player takeall // take all weapons from the player who is left?
$sa_winner_trigger triggerable // trigger door "sa_winner" ?
$sa_winner_trigger waittill trigger
$sa_winner_trigger nottriggerable // Lock door untill triggered?
}
if (local.sa > 4) // If higher then 4 run the following?
{
local.player kill // complete guess work to kill players?
}
end

If some body helps me, could you discribe to me what each thing does because i realy want to learn this stuff it intrigues me! :p

scripts

Posted: Sat Jun 02, 2007 4:30 am
by tltrude
The best way to learn is to study the global scripts. They are in pak0.pk3 . Start with the minefield script. It uses a trigger multiple (targetname minefield) and blows up players that touch it.

Posted: Sat Jun 02, 2007 6:12 pm
by Ophisâ„¢
yea i usally do look at the games scripting but im more of a "get stuck in" trial and error sort of person and when it comes to the above thing i don't know where to start because i don't know of any similar maps...