Jump to content
Sign in to follow this  
Kolmain

A runner question

Recommended Posts

Some odd questions;

() How can I get a unit to not stop at a waypoint? I want to simulate somone running away and he wouldnt stop at every corner of the building lol and yes i have tried things and yes his state is set to carless, any ideas?

() How can I create a trigger to execute something once Unit A AND Unit B is farther than X meters from Unit C?

() My scenario is that I am chasing down this guy and I want him to have an action on him, maybe something like 'tackle' that would make him play a falling animation and set him to an unconcious state (im using ACE2) which i can do, just need the action/anim part.

Any help would be awesome, thanks!

EDIT:

Going to try this when I get the chance

pilot stop false;

pilot setBehaviour "Careless";

pilot disableAI "Target";

pilot disableAI "Autotarget";

pilot disableAI "Watch";

Edited by Kolmain

Share this post


Link to post
Share on other sites
() How can I get a unit to not stop at a waypoint? I want to simulate somone running away and he wouldnt stop at every corner of the building lol and yes i have tried things and yes his state is set to carless, any ideas?

I guess you'd have to have him switch to the next the waypoint before he reaches the first one. Try placing a trigger (let's give it say... 7x7 radius, but you might have to change it depending on how close you need him to get to the WP) over the WP, set it to Switch, sync it to the waypoint and group it to the unit.

() How can I create a trigger to execute something once Unit A AND Unit B is farther than X meters from Unit C?

In the trigger's condition field:

{_X distance unitC < Xmeters} count [unitA,unitB] < 0

Where Xmeters is your distance (don't replace _X though, that needs to stay _X).

Edited by Big Dawg KS

Share this post


Link to post
Share on other sites

i have the completion radius of the wp set to 10m but still stops....

Share this post


Link to post
Share on other sites
i have the completion radius of the wp set to 10m but still stops....

Use the trigger then... :j:

As Switch trigger will move him to the next WP without completing the previous one (so hopefully without the stop).

Share this post


Link to post
Share on other sites

ok, sowwy, goona give it a go now, thanks for the help!

Share this post


Link to post
Share on other sites

() How can I get a unit to not stop at a waypoint? I want to simulate somone running away and he wouldnt stop at every corner of the building lol and yes i have tried things and yes his state is set to carless, any ideas?

The only way I can think of doing that right now is by creating an invisible Helipad or Marker and make them move to it using the following code

[color="Orange"]// If you are moving them to a marker[/color]

group move (getMarkerPos "marker");

[color="Orange"]// If you are moving them to a invisible helipad[/color]

unit move (getPos helipad_name);

() How can I create a trigger to execute something once Unit A AND Unit B is farther than X meters from Unit C?

I think this will work but Im not sure if its what you want


waitUntil {((_unitA distance _unitC)>50) && ((unitB distance _unitC)>50);};
[color="Orange"]
//Whatever code you want here[/color]

Im not really sure if this will work but hope it will.

Share this post


Link to post
Share on other sites

Oh, I thought the stopping was due to path planning? Iirc far spaced waypoints in Arma1 made AI stand there longer than if they were close together. Haven't tested in Arma2 though.

Share this post


Link to post
Share on other sites
Oh, I thought the stopping was due to path planning? Iirc far spaced waypoints in Arma1 made AI stand there longer than if they were close together. Haven't tested in Arma2 though.

This is genrally true. However, you usually only see noticable delays when the waypoints are extremely far apart and/or there is a lot of stuff they have to plan around. It's typically not the reason they stop at waypoints.

Share this post


Link to post
Share on other sites

The trigger method worked, havent tested the distance yet

Share this post


Link to post
Share on other sites

for the last question i found and motified a melee script

//melle.sqf
_man = nearestObjects [ player , ["Man","Man"], 2] select 1 
_pos=getpos player;
_pos2=getpos _man;
_angle=(((_pos2 select 0) - (_pos select 0)) atan2 ((_pos2 select 1)-(_pos select 1)));
player setdir _angle;
~0.001
player switchmove "AmelPercMstpSlowWrflDnon_StrokeGun"
~1
_man switchmove "AmelPercMstpSnonWnonDnon_zasah6hlava";
[_man, 0] call ace_blackoutall;
_man removeAction 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
Sign in to follow this  

×