Forum Jump :

Author Message


Posts: 38
Rank:


Level: Member

Country: us
Location:
Occupation:
Age: 38
In-game name:

 
#1 Posted at 2015-08-23 06:33        
     
hello, I have read and attempted everything I could find online, to no avail. I guess I'll give three examples of scripts I have tried. maybe a basic error on my part will shed light on my failure.
1)
_wp = man1 addWaypoint [obj1, 0]; 
_wp setWaypointType "MOVE"; 
_wp1 = man1 addWaypoint [obj1, 0];  
_wp1 setWaypointType "MOVE"; 
_wp2 = man1 addWaypoint [man1, 0]; 
_wp2 setWaypointType "CYCLE";

2)
wayPoint0 = man1 addWaypoint [obj1, 0]; 
wayPoint0 setWaypointType "MOVE"; 
wayPoint1 = man1 addWaypoint [obj1, 0];  
wayPoint1 setWaypointType "MOVE"; 
wayPoint2 = man1 addWaypoint [man1, 0]; 
wayPoint2 setWaypointType "CYCLE";

3)
_wp = _grp addWaypoint [obj1, 0]; 
_wp setWaypointType "MOVE"; 
_wp1 = _grp addWaypoint [obj1, 0];  
_wp1 setWaypointType "MOVE"; 
_wp2 = _grp addWaypoint [man1, 0]; 
_wp2 setWaypointType "CYCLE";[/

None of these work for creating waypoints for AI...can anyone tell me where I have gone wrong?

P.S. I'm using markers to randomize where an ammo cash will Appear and attempting to have a basic guard patrol around it. Using GL as the base for the second waypoint. Triggers to Check where the ammo stash is, then a trigger to place the patrol team around the stash. I have put in to the triggers a sequential order of timing, as a buffer, so as to not run to many init and exec calls at one time.

"If you tremble with indignation at every injustice, then you are a comrade of mine." -"Che" Guevara-

Author Message


Posts: 1189
Rank:


Level: Member

Country: tr
Location:
Occupation: Computer Science student
Age: 20
In-game name: Wak

 
#2 Posted at 2015-08-23 07:16        
     
The last one should work. Maybe try giving it positions instead of objects?

_wp = _grp addWaypoint [getPos obj1, 0]; 
_wp setWaypointType "MOVE"; 
_wp1 = _grp addWaypoint [getPos obj1, 0];  
_wp1 setWaypointType "MOVE"; 
_wp2 = _grp addWaypoint [getPos man1, 0]; 
_wp2 setWaypointType "CYCLE";

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

#define getDamage getDammage

Advertisement


Author Message


Posts: 38
Rank:


Level: Member

Country: us
Location:
Occupation:
Age: 38
In-game name:

 
#3 Posted at 2015-08-23 07:37        
     
06/#/_wp2 setwaypointtype missing "cycle" error missing.....is ACE countering anything?

Added 10 minutes later:

screwed up and added your count...but even when I edit out that, the Ai don't move

no error messages though

This post was edited by Guevera79 (2015-08-23 07:49, 842 days ago)

"If you tremble with indignation at every injustice, then you are a comrade of mine." -"Che" Guevara-

Author Message


Posts: 1189
Rank:


Level: Member

Country: tr
Location:
Occupation: Computer Science student
Age: 20
In-game name: Wak

 
#4 Posted at 2015-08-23 10:18        
     
I have a unit running between obj1 and man1 just fine with this code:
_grp = createGroup west;
_unit = "B_Soldier_F" createUnit [position player, _grp];
_wp0 = _grp addWaypoint [getPos obj1, 0]; 
_wp0 setWaypointType "MOVE"; 
_wp1 = _grp addWaypoint [getPos man1, 0]; 
_wp1 setWaypointType "MOVE"; 
_wp2 = _grp addWaypoint [getPos obj1, 0]; 
_wp2 setWaypointType "CYCLE";

I am testing in ArmA 3 though, it might be an issue with older games.

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

#define getDamage getDammage

Author Message


Posts: 38
Rank:


Level: Member

Country: us
Location:
Occupation:
Age: 38
In-game name:

 
#5 Posted at 2015-08-23 12:55        
     
yeah, I am running Armed Assault at the moment...could be an issue. Hence the Armed Assault forum. Though, the code would be similar.

Added 13 minutes later:

your script does add A unit, just not the waypoints. same error

Added 1 minute later:

I just used this one
"ACE_SoldierWB_USSF_FID_DCUL"

This post was edited by Guevera79 (2015-08-23 13:10, 841 days ago)

"If you tremble with indignation at every injustice, then you are a comrade of mine." -"Che" Guevara-

Author Message


Posts: 1189
Rank:


Level: Member

Country: tr
Location:
Occupation: Computer Science student
Age: 20
In-game name: Wak

 
#6 Posted at 2015-08-23 15:49        
     
Maybe try this sqs script? You need to make the file extension ".sqs" and use exec, not execVM.

_grp = createGroup west
_unit = "B_Soldier_F" createUnit [position player, _grp]
_wp0 = _grp addWaypoint [position obj1, 0]
_wp0 setWaypointType "MOVE"
_wp1 = _grp addWaypoint [gposition man1, 0]
_wp1 setWaypointType "MOVE"
_wp2 = _grp addWaypoint [position obj1, 0]
_wp2 setWaypointType "CYCLE"

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

#define getDamage getDammage

Author Message


Posts: 38
Rank:


Level: Member

Country: us
Location:
Occupation:
Age: 38
In-game name:

 
#7 Posted at 2015-08-24 10:16        
     
yep, After messing around with it a bit that one did the trick. Thx very much for the help.

_grp = createGroup west
_unit = "ACE_SoldierWB_USSF_LRSD_BDUL" createUnit [amm1, _grp,"man1 = this"]
_wp0 = _grp addWaypoint [position obj1, 0]
_wp0 setWaypointType "MOVE"
_wp1 = _grp addWaypoint [getPos man1, 0]
_wp1 setWaypointType "MOVE"
_wp2 = _grp addWaypoint [position obj1, 0]
_wp2 setWaypointType "CYCLE"

"If you tremble with indignation at every injustice, then you are a comrade of mine." -"Che" Guevara-