OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Top-Gun on 11 Nov 2003, 16:41:46
-
Hi boy's for my multiplayer mission how do i create a trigger were by if u go out of the trigger u die
another thing is a weapon respawn eg when u respawn u respawn with a shotty and a glock
-
Hey Top-Gun :)
It's quite a Simple if you know how it goes ;)
Ok First we make a trigger then type this:
Trigger condition:
(vehicle player in thisList) AND (side player != WEST)
Trigger activation:
(vehicle player) setDammage 1; player setDammage 1; hint "You are entering the West Spawn Zone! Prepare to DIE!"
If East enters the Trigger they will Die :)
To make a safezone for East just change WEST to EAST ;)
Trigger condition:
(vehicle player in thisList) AND (side player != EAST)
If you want the trigger to kill anybody, remove the side condition entirely.
Good Luck ;D
-
you miss understand me m8, it's a death match and if they step out of the town they die, so i was wondering how u do that,
-
use
!vehicle player in this list
in addition you could also have an additional trigger area that is slightly smaller than the allowed playing trigger area, which sends them a hint message telling them they are near the killzone when they leave it
-
Nah, i want it like the paint ball map were u go to far out of the village u die
-
thats what i stated
when u leave the trigger area u die
! = not
therefore
!vehicle player in this list
is a player that isnt in the tigger area
eg if i have to spell it out, "he has left the tigger area"
or you could simply have as was previously stated by Darkcell but instead of the on activation field, you add the kill lines to the deactivation field
you may also have to edit my line as follows
!(vehicle player in this list)&&(alive vehicle player)
You do the same for a smaller inner trigger so that when they leave this inner boundary they get a warning that they are nearing the edge of their safe playing area
-
hi thx but i'm a real mission noob this is my first proper one could you do an example ? plz
-
Plz it's the last thing left to do on my mission
-
come on guys .........
-
thought about the best way to do this
we will need 3 triggers and 1 script
all the triggers to be set to
anybody/repeatedly
and their On Activation and Condition fields to be left blank
Trigger 1 we shall name "KILLZONE"
size, much larger than both the other triggers
eg size 6000 X 6000
Trigger 2 we shall name "SAFEZONE"
this is the safe playing area
eg size 1000 X 1000
Trigger 3 we shall name "NOWARNINGZONE"
this is the zone that when leaving will cause a warning message to occur
eg size 950 X 950
increase the size difference between warning and safezone if vehicles are to be used, and possibly smaller difference if only infantry
start the following script from the init.sqs by using
[] exec "Zones.sqs"
;;zones.sqs
? (local server):exit
#START
~1
? (player in list SAFEZONE) && !(player in list NOWARNINGZONE): goto "WARNING"
? (player in list KILLZONE) && !(player in list SAFEZONE): goto "KILL"
goto "START"
#WARNING
titletext[format["\n%1\nYou are near a restricted area",name (player)],"PLAIN DOWN"]
goto "START"
#KILL
titletext[format["\n%1\nYou entered a restricted area",name (player)],"PLAIN DOWN"]
player setdammage 1
goto "START"
in addition you should add the danger signs to the outer edges of the safezone
basically what happens is, the script loops and sees what zones the player is and isnt in, then acts accordingly
if a player leaves the inner sanctum of the NOWARNINGZONE, but is still in the safezoner, he will receive a titletext message on screen every second warning him of his impending doom,
until he either gets killed by leaving the safezone or goes back into the NOWARNINGZONE
script untested but should work