Jump to content
Sign in to follow this  
DroopyPiles

What do you kind of call any player? in scripting

Recommended Posts

What do you kind of call any player? in scripting, I have 5 players that i'm using in my co-op, I have this area you walk thru that when you go thru it it changes the loadout of who goes thru it, but at the mo I have to do it separately so I have to name that player in the script, how do I make the script just say any player? so I don't have to name them individually, thx

Share this post


Link to post
Share on other sites

what does the trigger return? thislist? if so then thislist select 0 would be your player, unless you want it to run on more than one player if, say two players are in the area. in which case it could be {...} foreach thislist

Share this post


Link to post
Share on other sites
what does the trigger return? thislist? if so then thislist select 0 would be your player, unless you want it to run on more than one player if, say two players are in the area. in which case it could be {...} foreach thislist

um the trigger I got set to detect blufor at mo, then when its walked thru it runs a script changing the weapons of the player named in the script, but I want the script instead of being named player specific, be something like "this" but that don't work, so anyone who walks into area gets weps changed, that make sence?

---------- Post added at 19:18 ---------- Previous post was at 17:44 ----------

i'm trying to do this

_wep1 = "Jon","Jason","Chris","Lindsay","Dax";

removeAllWeapons _wep1;

_wep1 addWeapon "arifle_MXC_Black_F";

but each person who triggers gets the change not the whole squad obviously

Edited by DroopyPiles

Share this post


Link to post
Share on other sites

You can't use local variables like that in a trigger, but you could put that code in a script and run it from your trigger activation and use thislist like Egg says to execute on all who are in trigger area.

trigger Act:

{nul = [] execVM "change_loadout.sqf";} foreach thisList;

on second look of you code. That code doesn't really make sense, but I see what you are trying to do. Maybe replace _wep1 with player and set trigger for repeating. Just an idea..

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
Sign in to follow this  

×