OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: sharkattack on 02 Mar 2008, 17:29:37
-
hi
been playing with hoz s dofollowunit script .. an excellent script which does away with ai having to join the player group ..
im stuck trying to figure out how to call the script on the person who activates the trigger..
how could i get the name of the player so i could change the way the script is called
at the min i have it fired with this command
dummy = [hostage,leader_1] execVM DoFollowUnit.sqf
problem is if leader_6 finds the hostage id like him to follow leader_6
many thanx in advancve :)
great script ...
-
How about trying to get the hostage to follow the leader of whoever triggers the trigger?
dummy = [hostage, leader (thisList select 0)] execVM "DoFollowUnit.sqf";
-
thanks mate
:good:
-
A new problem with triggers
how could i set up a trigger which is fired by any group memeber (team1)
coming within a certain distance from an objective .
i can do it with a single named unit
condition
soldier1 distance objective < 5
how could i fire the trigger if any member of team 1 is less than 5 meters from objective
thanks :)
-
Well, I'm assuming the objective moves, otherwise a normal area trigger would make more sense. Assuming team1 has been set to the group we are talking about (e.g. by "team1 = group this" in init line):
({ (alive _x) and ((_x distance objective) < 5) } count (units team1)) > 0
If the objective is stationary, the simple way is to synchronise the group with an area trigger so that only that group will cause the trigger to activate.
-
the objective is stationary in this case.
i group the trigger to team one
and set activation to any group memeber present
how do i include the distance from objective to the condition of the trigger
edit
====
got it mate .. i put the above code in the grouped trigger and it works a treat ... many thanx
-
But you don't need to use the distance, since the trigger area implies a distance. Either that or I'm misunderstanding what you need.
-
the objective is an ammo crate inside a building .. getting it to fire is a bit unreliable using the trigger size .. sometimes the objective is ticked before the player can even see the crate ..
the above code seems to be a bit more accurate :)
-
Well, the code I gave above should be fine then.
-
it is mate ... works a treat
many thanx
-
Thanks here too Spooner.
That little snippet helped me solve a little headache I was dealing with. :good: