Jump to content
HotosHideout

Simple Auto-Teleport Trigger

Recommended Posts

I currently have a simple trigger that teleports infantry to a specific location on the map. Below is the condition and activation code.

 

Condition

player in thislist && !(playerside == west);

Activation

player setposatl [5844,11332,0];

 

This trigger is exactly what i'm looking for as i'm following a KISS mentality.

However, the trigger does not teleport a vehicle with player if the player drives into the trigger area. He would have to dismount in order to be teleported. This is going to be used in a MP situation and I need any vehicle of any type that is identified as being on a side that isn't blufor to be teleported out. I've tried to generalize the object using vehicle and i've tried to use setVehiclePosition as well and neither seem to be working. 

I will use an external .sqf if that is the only way but i'd like to try and keep it isolated to a specific trigger i set in the editor, code included.

Any help is greatly appreciated.  

 

Share this post


Link to post
Share on other sites

your "thisList" refers probably to anyplayer or anybody presence condition. These conditions doesn't trigger when player is in vehicle. Don't ask me why!

But, usually, that work for vehicle player in thislist (then player can be infantry or driving a car)  . Don't tick the "server only" box.

 

The workaround can be: player inArea thisTrigger  , working both in vehicle or not.

Share this post


Link to post
Share on other sites
8 hours ago, pierremgi said:

your "thisList" refers probably to anyplayer or anybody presence condition. These conditions doesn't trigger when player is in vehicle. Don't ask me why!

But, usually, that work for vehicle player in thislist (then player can be infantry or driving a car)  . Don't tick the "server only" box.

 

The workaround can be: player inArea thisTrigger  , working both in vehicle or not.


So change the condition to player inArea this Trigger, with Trigger being the variable set for the trigger, and change the activation to vehicle player setposatl [5844,11332,0]; ?

Share this post


Link to post
Share on other sites

No. thisTrigger (in one word) is a "magic" variable referring to the trigger. player inArea thisTrigger && !(playerSide == west)

then, yes, vehicle player setposatl [5844,11332,0];

Trigger must be none, none, (preset condition) and repeatable, executed everywhere (not "server only").

Share this post


Link to post
Share on other sites

Alright this worked perfectly. Thank you.

Type: None
Activation: None

Repeatable: Yes

Server Only: No

 

Condition
player inArea thisTrigger && !(playerside == west);

On Activation
vehicle player setposatl [5844,11332,0];

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×