Forum Jump :

Author Message


Posts: 4
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2016-03-15 16:57        
     
At The Moment I´m building a Altis Life style mission were you play as a Police Officer against AI.
Now I got the Problem that I want to be able to stop a Vehicle, pull the driver out off it (ACE3) and search him, but as soon as i pull him out he follows the Waypoints on foot. To prevent that i used DisableAI"move" but after enabeling it he wont get in his Vehicle or walk anymore

Trigger:
condition:
AIZ2 distance P1 < 10 || AIZ2 distance P2 < 10 || AIZ2 distance P3 < 10

When activated:
AIZ2 setFuel 0; AIZ2D disableAI"move"

When Dectivated:
AIZ2 setFuel 1; AIZ2D enableAI"move"

AIZ2 = Vehicle
AIZ2D = Vehicle Driver (Civil)
P1,P2,P3 = Player/Police(Blufor)

I also tried to assign the Unit to the Vehicle but Nothing happend, Now I think freezing the Waypoints could help for exampel:
Freeze Waypoints on trigger Activation and something like get in Vehicle when the trigger is deactivated and after that unfreeze Waypoints

This post was edited by SCAR Gaming (2016-03-17 16:22, 585 days ago)


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 57
In-game name: Kobayashi Maru

 
#2 Posted at 2016-03-15 17:43        
     
A very efficient way to remove all waypoints:
while {(count (waypoints AIZ2D)) > 0} do {
deleteWaypoint ((waypoints AIZ2D) select 0)};

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Advertisement


Author Message


Posts: 4
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2016-03-15 17:50        
     
I don´t want to delete the Waypoints i just want to pause them when a Player gets closer then 10 Meters and after the player has Left the 10 Meter Radius to get back in his Car and follow the Waypoints again


Author Message

Tajin  



Posts: 433
Rank:


Level: Member

Country: de
Location: Bavaria
Occupation: Communications Designer
Age: 33
In-game name: Tajin

 
#4 Posted at 2016-03-15 18:01        
     
Just create a new, "Hold" waypoint at the current position and remove it when you're done with him.

There are a lot of very capable people on this forum, willing to spend some of their time to help you out. So if you have a problem, it surely isn't too much to ask that you atleast take the time to describe it properly. Thanks.

Author Message


Posts: 4
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name:

 
#5 Posted at 2016-03-15 18:15        
     
could help
you mean something like:
AZ2D addWaypoint[getPos AZ2D,0.5,(Number of the Waypoint)]
But then i would need to know which waypoint he just passed

groupName addWaypoint [center, radius, index, name]
from BIstudio


(I´m a noob in scripting)


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 57
In-game name: Kobayashi Maru

 
#6 Posted at 2016-03-15 19:03        
     
use currentWaypoint :
on activation:
_wpt = group AIZ2D addwaypoint [getPosATL AIZ2D, 0,currentWaypoint group AIZ2D]; _wpt setWaypointType "HOLD"
on deact:
deleteWaypoint [group AIZ2D, currentWaypoint group AIZ2D]

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Author Message

Tajin  



Posts: 433
Rank:


Level: Member

Country: de
Location: Bavaria
Occupation: Communications Designer
Age: 33
In-game name: Tajin

 
#7 Posted at 2016-03-15 20:14        
     
# SCAR Gaming : (I´m a noob in scripting)

When in doubt, always look here: https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3

Chances are there is a command in that list, that does exactly what you need.

Like "currentWaypoint", as Pierre already mentioned :)

There are a lot of very capable people on this forum, willing to spend some of their time to help you out. So if you have a problem, it surely isn't too much to ask that you atleast take the time to describe it properly. Thanks.

Author Message


Posts: 4
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name:

 
#8 Posted at 2016-03-16 19:28        
     
# Pierre MGI : use currentWaypoint :
on activation:
_wpt = group AIZ2D addwaypoint [getPosATL AIZ2D, 0,currentWaypoint group AIZ2D]; _wpt setWaypointType "HOLD"
on deact:
deleteWaypoint [group AIZ2D, currentWaypoint group AIZ2D]

Now it works that he stays in the Area but he wont get in again and wont drive or move to the next waypoint