Check for last player....

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Ophisâ„¢
Colonel
Posts: 461
Joined: Sun Mar 12, 2006 2:30 pm
Location: England, Manchester
Contact:

Check for last player....

Post 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
Image[ Formerly Known As Snakeâ„¢ ]
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

scripts

Post 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.
Tom Trude,

Image
Ophisâ„¢
Colonel
Posts: 461
Joined: Sun Mar 12, 2006 2:30 pm
Location: England, Manchester
Contact:

Post 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...
Image[ Formerly Known As Snakeâ„¢ ]
Post Reply