TKC-Community

Hacking and Art => Armed Assault 3 => Armed Assault 2 => Topic started by: Fishgun123 on June 06, 2012, 04:46:02 pm

Title: AI Spawn Script
Post by: Fishgun123 on June 06, 2012, 04:46:02 pm
Anybody know of an AI Spawn Script for Arma 2?
Title: Re: AI Spawn Script
Post by: katie1992 on June 06, 2012, 05:47:53 pm
SpawnUnit_command = _this select 0;

SpawnUnit = "USMC_SoldierS_Sniper" createunit [[(getpos player select 0), (getpos player select 1), 50], group player, format["%1", SpawnUnit_command]];

~0.01
deletevehicle SpawnUnit
SpawnUnit = nearestobject [[(getpos player select 0), (getpos player select 1), 50],"USMC_SoldierS_Sniper"];
deletevehicle SpawnUnit
sleep 0.5
deletevehicle SpawnUnit
exit


Try that.
Title: Re: AI Spawn Script
Post by: Fishgun123 on June 06, 2012, 05:51:42 pm
Wow thank you very much, it worked and thanks for being so helpful +1  :icon_biggrin2!
Title: Re: AI Spawn Script
Post by: Fishgun123 on June 06, 2012, 06:20:38 pm
Also may I ask where you found that script? I want to be able to change the type of Unit Spawned or Civ.
Title: Re: AI Spawn Script
Post by: Buster on June 06, 2012, 06:32:22 pm
SpawnUnit_command = _this select 0;

SpawnUnit = "USMC_SoldierS_Sniper" createunit [[(getpos player select 0), (getpos player select 1), 50], group player, format["%1", SpawnUnit_command]];

~0.01
deletevehicle SpawnUnit
SpawnUnit = nearestobject [[(getpos player select 0), (getpos player select 1), 50],"USMC_SoldierS_Sniper"];
deletevehicle SpawnUnit
sleep 0.5
deletevehicle SpawnUnit
exit


Try that.

Change the red bit to the unit needed to spawn  :icon_thumbsup
Title: Re: AI Spawn Script
Post by: Buster on June 06, 2012, 06:35:29 pm
Code: [Select]
_grp_player = group player;
_units_player = units _grp_player;

if (({alive _x} count _units_player) > 0) then {
{
if (!isPlayer _x) then {
_x removeAllEventHandlers "killed";
if (vehicle _x == _x) then {
deleteVehicle _x;
} else {
unassignVehicle _x;
sleep 0.532;
deleteVehicle _x;
};
};
} forEach _units_player;
};

[playerSide,"HQ"] sideChat "All AI soldiers dismissed !!!!";

if (true) exitWith {};

Make sqf with this inside to delete them  :icon_thumbsup
Title: Re: AI Spawn Script
Post by: BanHammer on June 06, 2012, 06:50:47 pm
lol!

Code: [Select]
{deleteVehicle _x} foreach units (group player);
Title: Re: AI Spawn Script
Post by: Buster on June 06, 2012, 06:54:06 pm
True, forget that then, this is simpler  :icon_teehee
Title: Re: AI Spawn Script
Post by: Chenarus93 on June 06, 2012, 06:55:37 pm
How would you go about getting these fellows to open fire on, say, zombies or players in Day Z?

I spawn them and attempt to use the squad commands, but I can't bring up the engagement menu (95% of the options are greyed out) and my units will not open fire on hostile survivors or zombies.
Title: Re: AI Spawn Script
Post by: MrMedic on June 06, 2012, 06:56:39 pm
lol!

Code: [Select]
{deleteVehicle _x} foreach units (group player);

LOL!

Code: [Select]
{deletevehicle _x;} foreach units player;
Title: Re: AI Spawn Script
Post by: BanHammer on June 06, 2012, 07:00:47 pm
True, forget that then, this is simpler  :icon_teehee
Title: Re: AI Spawn Script
Post by: Snuff on June 06, 2012, 09:02:46 pm
Code: [Select]
deleteObject cursorTarget;
That's all you need to delete something you look at, I lol'd when I realised this.
Title: Re: AI Spawn Script
Post by: Buster on June 06, 2012, 09:12:51 pm
What if its other side of map and you got no visual   :icon_rolleyes2
Title: Re: AI Spawn Script
Post by: zlake on June 06, 2012, 09:39:50 pm
Nice stuff. Just gotta figure out setfriend now.
Title: Re: AI Spawn Script
Post by: katie1992 on June 06, 2012, 09:42:31 pm
Yeah, I need to figure out how to get an AI unit to kill someone.
Every time I "Open fire" and "Command them to target someone" they say engaging but dismiss them.

I.E: Zombies, they won't kill zombies -.-

Anyone know of an AI that will kill zombies, russians? USMC or something..
Specific name/
Title: Re: AI Spawn Script
Post by: s0ybean on June 06, 2012, 09:45:43 pm
True, forget that then, this is simpler  :icon_teehee

I lol'd, marry me.
Title: Re: AI Spawn Script
Post by: zlake on June 06, 2012, 09:48:35 pm
Players are on the west side and zombies are civilian.

WEST setFriend [Civilian, 0];

would be an example. I'm working on it myself.


I found that players are on the west side by
if (side player == west) then {hint "You are on the West side.";};

Can tell zombies are civi by trying to get them to attack them.
Title: Re: AI Spawn Script
Post by: Fishgun123 on June 06, 2012, 09:52:27 pm
Hi I found out one way the otherday. Press space to bring up that type of green command thing and look at the player you want to kill. Double click right and the AI should say targeted blah blah etc. If not then I don't know sorry.  :smile
Title: Re: AI Spawn Script
Post by: Buster on June 06, 2012, 09:55:41 pm
Afaik, Civillian are friendly to everyone. So not sure if they will target anything. Last time I tried arming the CIV's they dont even pick up a weapon  :unsure
I could be wrong though, might try this myself  :icon_thumbsup
Title: Re: AI Spawn Script
Post by: Fishgun123 on June 06, 2012, 10:03:58 pm
Yes civs work on armed vehicle and stuff and do target civs on Cheranus life and stuff  :icon_magician
Title: Re: AI Spawn Script
Post by: Buster on June 06, 2012, 10:20:03 pm
Yes civs work on armed vehicle and stuff and do target civs on Cheranus life and stuff  :icon_magician
There ya go then  :icon_thumbsup
Usually I have to set them to a group though
Code: [Select]
_group = createGroup east;
[_civilianname] joinsilent _group;
Title: Re: AI Spawn Script
Post by: zlake on June 06, 2012, 10:20:49 pm
Hi I found out one way the otherday. Press space to bring up that type of green command thing and look at the player you want to kill. Double click right and the AI should say targeted blah blah etc. If not then I don't know sorry.  :smile
Well would be nice to make them auto attack other players. Can you even make west hostile to west?
Title: Re: AI Spawn Script
Post by: Fishgun123 on June 06, 2012, 10:47:05 pm
Umm I have no clue mate, but yes I agree it would be pretty cool.  :icon_rolleyes2
Title: Re: AI Spawn Script
Post by: zlake on June 06, 2012, 10:53:48 pm
Yes civs work on armed vehicle and stuff and do target civs on Cheranus life and stuff  :icon_magician
There ya go then  :icon_thumbsup
Usually I have to set them to a group though
Code: [Select]
_group = createGroup east;
[_civilianname] joinsilent _group;
I lub you long time. It auto attacks players but zombies nah
Title: Re: AI Spawn Script
Post by: katie1992 on June 06, 2012, 11:11:56 pm
Yes civs work on armed vehicle and stuff and do target civs on Cheranus life and stuff  :icon_magician
There ya go then  :icon_thumbsup
Usually I have to set them to a group though
Code: [Select]
_group = createGroup east;
[_civilianname] joinsilent _group;
I lub you long time. It auto attacks players but zombies nah

It does?
Auto attacks every player except yourself.

Is there a way to stop them firing at players? I.E: Hold fire, does it work?
Title: Re: AI Spawn Script
Post by: Buster on June 06, 2012, 11:20:12 pm
try this :
Code: [Select]
_civilianname disableAI "TARGET";
_civilianname disableAI "AUTOTARGET";
Then :
Code: [Select]
_civilianname enableAI "TARGET";
_civilianname enableAI "AUTOTARGET";
Try it its just a quick thought so its untested  :icon_thumbsup
Title: Re: AI Spawn Script
Post by: katie1992 on June 06, 2012, 11:38:14 pm
I'm confused as to where to place that line fo command ;/
Title: Re: AI Spawn Script
Post by: Fishgun123 on June 06, 2012, 11:38:24 pm
Buster I PM'ed you.
Title: Re: AI Spawn Script
Post by: Fishgun123 on June 06, 2012, 11:41:44 pm
I'm confused as to where to place that line fo command ;/
Same, thats exactly what I PM'ed Buster about.
Title: Re: AI Spawn Script
Post by: zlake on June 06, 2012, 11:44:26 pm
They are auto attacking players and zombies. What if I just want them to attack players also how do I give you rep?
Title: Re: AI Spawn Script
Post by: Fishgun123 on June 06, 2012, 11:47:04 pm
They are auto attacking players and zombies. What if I just want them to attack players also how do I give you rep?
1: Dunno, 2: You need to have 100 posts.
Title: Re: AI Spawn Script
Post by: katie1992 on June 06, 2012, 11:50:49 pm
Can anyone paste a full snippet of the code you've got for the "AI" spawned to attack anything?
Title: Re: AI Spawn Script
Post by: Fishgun123 on June 07, 2012, 12:02:47 am
Can anyone paste a full snippet of the code you've got for the "AI" spawned to attack anything?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Title: Re: AI Spawn Script
Post by: katie1992 on June 07, 2012, 12:25:05 am
This would be great, thanks..
Title: Re: AI Spawn Script
Post by: Buster on June 07, 2012, 01:11:53 am
Guys, cant find a spoon big enough at the moment  :icon_laugh
Title: Re: AI Spawn Script
Post by: Buster on June 07, 2012, 01:37:10 am
Ok then, make this code into a script or take out the // comments and add to the spawned ai's init.
ur_ai = the name you need to give the ai that you spawn  :icon_thumbsup
Code: [Select]
_grp = creategroup (east);  // Side of a group to make enemy
_grp allowFleeing 0;   // 0 means maximum courage, while 1 means they will fuck off
[ur_ai] join _grp;   // the group ur_ai will join
ur_ai enableAI "TARGET";      // Obvious
ur_ai enableAI "AUTOTARGET";   // More obvius
ur_ai setskill 1;   // set to 1 for maximum skill
ur_ai setCombatMode "RED";   // Makes ur_ai red with anger
ur_ai setBehaviour "AWARE";   // give ur_ai awareness
ur_ai addweapon "MakarovSD";   // give ur_ai a gun
ur_ai addmagazine "8Rnd_9x18_Makarov";  // gives ur_ai some ammo
ur_ai selectWeapon "MakarovSD";   // tells ur_ai to use this weapon
while {alive ur_ai} do {  
ur_ai setvehicleammo 1;      // will give ur_ai unlimited ammo
sleep 0.01;
};
Not actually tested, so try it and let me know  :icon_cool2
Title: Re: AI Spawn Script
Post by: katie1992 on June 07, 2012, 02:23:43 am
I tried this:

Code: [Select]
ur_ai = _this select 0;
_grp = createGroup east;

ur_ai = "GUE_Soldier_Sniper" createunit [[(getpos player select 0), (getpos player select 1), 50], group player, format["%1", TKC__MedicDevString_command]], _grp allowFleeing 0, ur_ai enableAI "TARGET", [ur_ai] join _grp, ur_ai enableAI "AUTOTARGET", ur_ai setskill 1, ur_ai setCombatMode "RED", ur_ai setBehaviour "AWARE", ur_ai addweapon "AKS_74_kobra", ur_ai addmagazine "30Rnd_545x39_AK", ur_ai selectWeapon "AKS_74_kobra", while {alive ur_ai} do { ur_ai setvehicleammo 1, sleep 0.01
};

hint "Soldier spawned...";

Dunno what I should edit?
Title: Re: AI Spawn Script
Post by: zlake on June 07, 2012, 02:55:51 am
Ok then, make this code into a script or take out the // comments and add to the spawned ai's init.
ur_ai = the name you need to give the ai that you spawn  :icon_thumbsup
Code: [Select]
_grp = creategroup (east);  // Side of a group to make enemy
_grp allowFleeing 0;   // 0 means maximum courage, while 1 means they will fuck off
[ur_ai] join _grp;   // the group ur_ai will join
ur_ai enableAI "TARGET";      // Obvious
ur_ai enableAI "AUTOTARGET";   // More obvius
ur_ai setskill 1;   // set to 1 for maximum skill
ur_ai setCombatMode "RED";   // Makes ur_ai red with anger
ur_ai setBehaviour "AWARE";   // give ur_ai awareness
ur_ai addweapon "MakarovSD";   // give ur_ai a gun
ur_ai addmagazine "8Rnd_9x18_Makarov";  // gives ur_ai some ammo
ur_ai selectWeapon "MakarovSD";   // tells ur_ai to use this weapon
while {alive ur_ai} do { 
ur_ai setvehicleammo 1;      // will give ur_ai unlimited ammo
sleep 0.01;
};
Not actually tested, so try it and let me know  :icon_cool2

No result

Your other code

_group = createGroup east;
[_civilianname] joinsilent _group;
Agros players and zombies

I tired

_group = createGroup enemy;
[_west] joinsilent _group;
[_east] joinsilent _group;

_group = createGroup enemy;
[west] joinsilent _group;
[east] joinsilent _group;

as there is 8 factions and enemy is one of them same result not agroing other players.
Title: Re: AI Spawn Script
Post by: Buster on June 07, 2012, 03:11:22 am
Sorry guys, right now am a little popped up with the amber necter  :icon_teehee
will need to study this tomorrow, can't decide whether it's my head that's fucked or yours  :icon_o_o
Am thinking this is quite simple but I must be wrong  :icon_cry2
Title: Re: AI Spawn Script
Post by: zlake on June 07, 2012, 03:18:08 am
Well I had it sorta working now I cant even get it to do that anymore. So id say mines fucked up atm.
Title: Re: AI Spawn Script
Post by: Buster on June 07, 2012, 03:22:35 am
Ok ffs, lets go right to begining of class boys and girls.  :icon_sly
Do you know how to spawn a unit ?  :unsure
Answer yes/no  :icon_thumbsup
Title: Re: AI Spawn Script
Post by: katie1992 on June 07, 2012, 03:23:21 am
Ok ffs, lets go right to begining of class boys and girls.  :icon_sly
Do you know how to spawn a unit ?  :unsure
Answer yes/no  :icon_thumbsup

No, we don't.
We posted that on the first page because it looked cool.
Title: Re: AI Spawn Script
Post by: zlake on June 07, 2012, 03:39:20 am
Katie I'm looking over http://community.bistudio.com/wiki/createUnit Ill update you if I figure anything out.
Title: Re: AI Spawn Script
Post by: Buster on June 07, 2012, 03:55:01 am
SpawnUnit_command = _this select 0;

SpawnUnit = "USMC_SoldierS_Sniper" createunit [[(getpos player select 0), (getpos player select 1), 50], group player, format["%1", SpawnUnit_command]];

~0.01
deletevehicle SpawnUnit
SpawnUnit = nearestobject [[(getpos player select 0), (getpos player select 1), 50],"USMC_SoldierS_Sniper"];
deletevehicle SpawnUnit
sleep 0.5
deletevehicle SpawnUnit
exit


Try that.
well why post this if you !=wot it means   :icon_cool2
Title: Re: AI Spawn Script
Post by: darkrounge on June 07, 2012, 04:00:51 am
I know what it means, else I wouldn't have posted it.
Touch? Motherfucker!

Well, what I'm confused on doing is reestablishing the AI to fire at both; Humans and Zombies.
To which I'm still, to this point, confused.
Title: Re: AI Spawn Script
Post by: zlake on June 07, 2012, 04:13:26 am
Should have enough info to figure it out.
Title: Re: AI Spawn Script
Post by: Buster on June 07, 2012, 04:15:49 am
I know what it means, else I wouldn't have posted it.
Touch? Motherfucker!

Well, what I'm confused on doing is reestablishing the AI to fire at both; Humans and Zombies.
To which I'm still, to this point, confused.

WTF man, I thought that was posted by katie1992 on Today at 12:47:53 PM, not  darklounge  :icon_laugh
Title: Re: AI Spawn Script
Post by: Buster on June 07, 2012, 04:23:09 am
Code: [Select]
_grp = creategroup (east);  // Side of a group to make enemy
_grp allowFleeing 0;   // 0 means maximum courage, while 1 means they will fuck off
[ur_ai] join _grp;   // the group ur_ai will join
ur_ai enableAI "TARGET";      // Obvious
ur_ai enableAI "AUTOTARGET";   // More obvius
ur_ai setskill 1;   // set to 1 for maximum skill
ur_ai setCombatMode "RED";   // Makes ur_ai red with anger
ur_ai setBehaviour "AWARE";   // give ur_ai awareness
ur_ai addweapon "MakarovSD";   // give ur_ai a gun
ur_ai addmagazine "8Rnd_9x18_Makarov";  // gives ur_ai some ammo
ur_ai selectWeapon "MakarovSD";   // tells ur_ai to use this weapon
while {alive ur_ai} do {  
ur_ai setvehicleammo 1;      // will give ur_ai unlimited ammo
sleep 0.01;
};

Lol It owned me. So now I take it I need to find a way to change my own faction.
No !
now you need to know how to impliment this shit you've been given, and others should shut the fuck up and post more constructive posts, if they know how to do it better !
I'm not bitter I'm the murphys  :icon_thumbsup
Title: Re: AI Spawn Script
Post by: zlake on June 07, 2012, 04:40:30 am
Ill figure this out sooner or later. Yeah I messed something up ofc. I'm trying to nail it atm.
Title: Re: AI Spawn Script
Post by: zlake on June 07, 2012, 07:01:09 am
Should be enough info there.
Title: Re: AI Spawn Script
Post by: MrMedic on June 07, 2012, 06:08:04 pm
Code: [Select]
SpawnUnit_command = _this select 0;

SpawnUnit = "USMC_SoldierS_Sniper" createunit [[(getpos player select 0), (getpos player select 1), 50], group player, format["%1", SpawnUnit_command]];
_grp = creategroup (east);  // Side of a group to make enemy
_grp allowFleeing 0;   // 0 means maximum courage, while 1 means they will fuck off
[ur_ai] join _grp;   // the group ur_ai will join
ur_ai enableAI "TARGET";      // Obvious
ur_ai enableAI "AUTOTARGET";   // More obvius
ur_ai setskill 1;   // set to 1 for maximum skill
ur_ai setCombatMode "RED";   // Makes ur_ai red with anger
ur_ai setBehaviour "AWARE";   // give ur_ai awareness
ur_ai addweapon "MakarovSD";   // give ur_ai a gun
ur_ai addmagazine "8Rnd_9x18_Makarov";  // gives ur_ai some ammo
ur_ai selectWeapon "MakarovSD";   // tells ur_ai to use this weapon
while {alive ur_ai} do {  
ur_ai setvehicleammo 1;      // will give ur_ai unlimited ammo
sleep 0.01;
};

Lol It owned me. So now I take it I need to find a way to change my own faction.
No !
now you need to know how to impliment this shit you've been given, and others should shut the fuck up and post more constructive posts, if they know how to do it better !
I'm not bitter I'm the murphys  :icon_thumbsup
_grp allowFleeing 0;   // 0 means maximum courage, while 1 means they will fuck off ........ :icon_laugh
Title: Re: AI Spawn Script
Post by: MrMedic on June 07, 2012, 06:19:43 pm
if they know how to do it better !

_Letsspawnsomenutterswithvehiclesandfillthem = [position player ?, side ?, group player ?] call BIS_fnc_spawnGroup;


Title: Re: AI Spawn Script
Post by: XJ on June 07, 2012, 06:28:07 pm
Ok ffs, lets go right to begining of class boys and girls.  :icon_sly
Do you know how to spawn a unit ?  :unsure
Answer yes/no  :icon_thumbsup

No, we don't.
We posted that on the first page because it looked cool.


Hey you unthankful buchiach, why don't you fuck off to the little meth lab you crawled out of? Nobody here is obligated to help you, so if you want to be helped pick an appropriate tone.
Title: Re: AI Spawn Script
Post by: katie1992 on June 07, 2012, 06:34:15 pm
Ok ffs, lets go right to begining of class boys and girls.  :icon_sly
Do you know how to spawn a unit ?  :unsure
Answer yes/no  :icon_thumbsup

No, we don't.
We posted that on the first page because it looked cool.


Hey you unthankful buchiach, why don't you fuck off to the little meth lab you crawled out of? Nobody here is obligated to help you, so if you want to be helped pick an appropriate tone.

OK, well that kinda abbreviated your ability to differentiate logic from reason, am I not entitled to reply to puerile posts.


Now, if you're going to post foul comments on people's thread: http://tkc-community.net/forum/index.php?action=profile;u=4487;sa=showPosts
Then I advice you to not argue with people whom is just 'leading' the way to what you've done on several occasions.
This is the seventh time you've criticized/insulted someone, so I advice you look at yourself before commenting on my attitude.

And I wasn't being nasty for your information, he asked a question, I decided to answer.
Title: Re: AI Spawn Script
Post by: MrMedic on June 07, 2012, 06:45:41 pm
Come on now you 2 , were here to ha'ck the game , we all have to start somewhere , remember that both of you.

Have a nice day to both , working together will be more productive than lone wolfing at your level.
Title: Re: AI Spawn Script
Post by: katie1992 on June 07, 2012, 07:12:12 pm
Come on now you 2 , were here to ha'ck the game , we all have to start somewhere , remember that both of you.

Have a nice day to both , working together will be more productive than lone wolfing at your level.

Yessir  :icon_magician
Title: Re: AI Spawn Script
Post by: XJ on June 07, 2012, 07:13:09 pm
Ok ffs, lets go right to begining of class boys and girls.  :icon_sly
Do you know how to spawn a unit ?  :unsure
Answer yes/no  :icon_thumbsup

No, we don't.
We posted that on the first page because it looked cool.


Hey you unthankful buchiach, why don't you fuck off to the little meth lab you crawled out of? Nobody here is obligated to help you, so if you want to be helped pick an appropriate tone.

OK, well that kinda abbreviated your ability to differentiate logic from reason, am I not entitled to reply to puerile posts.


Now, if you're going to post foul comments on people's thread: http://tkc-community.net/forum/index.php?action=profile;u=4487;sa=showPosts
Then I advice you to not argue with people whom is just 'leading' the way to what you've done on several occasions.
This is the seventh time you've criticized/insulted someone, so I advice you look at yourself before commenting on my attitude.

And I wasn't being nasty for your information, he asked a question, I decided to answer.

Yes, but the difference is that I do not depend on your information. The way I talk might seem offensive, but had you been here before the DayZ hype, you would understand everything. Also, you counting my posts means I'm doing it right.  :smile

/discussion
Title: Re: AI Spawn Script
Post by: MrMedic on June 07, 2012, 07:20:07 pm
Ok ffs, lets go right to begining of class boys and girls.  :icon_sly
Do you know how to spawn a unit ?  :unsure
Answer yes/no  :icon_thumbsup

No, we don't.
We posted that on the first page because it looked cool.


Hey you unthankful buchiach, why don't you fuck off to the little meth lab you crawled out of? Nobody here is obligated to help you, so if you want to be helped pick an appropriate tone.

OK, well that kinda abbreviated your ability to differentiate logic from reason, am I not entitled to reply to puerile posts.


Now, if you're going to post foul comments on people's thread: http://tkc-community.net/forum/index.php?action=profile;u=4487;sa=showPosts
Then I advice you to not argue with people whom is just 'leading' the way to what you've done on several occasions.
This is the seventh time you've criticized/insulted someone, so I advice you look at yourself before commenting on my attitude.

And I wasn't being nasty for your information, he asked a question, I decided to answer.

Yes, but the difference is that I do not depend on your information. The way I talk might seem offensive, but had you been here before the DayZ hype, you would understand everything. Also, you counting my posts means I'm doing it right.  :smile

/discussion

You are being a bit offencive to katie tbh , just because she i take it is of a lower 'ability' than you are at doesnt meen you should be offencive towards him/her. if he/she has insulted you directly then thats a different matter and should really be taken to pm, me on the other hand i know for a fact some people around here lie through their teeth and that is why i retaliate , not becaus ei care what people think but to put them 'in their place' as they allways end up getting people banned so i take away their credibility.

there may be a few spelling mistakes in this post , i dont have the time or will to check it tbh as arguing is getting no one nowhere fast.

could we possibly get back on topic or shall we continue debateing who has the biggest e penis?
Title: Re: AI Spawn Script
Post by: Buster on June 08, 2012, 12:43:09 am
if they know how to do it better !

 _etsspawnsomenutterswithvehiclesandfillthem = [position player ?, side ?, group player ?] call BIS_fnc_spawnGroup;



Lol why post this and confuse them even more  :unsure 
Title: Re: AI Spawn Script
Post by: jcmomo on June 12, 2012, 12:04:34 pm
man im also having trouble getting the ai to target something they are like neutral even if its opposing side :(
Title: Re: AI Spawn Script
Post by: zlake on June 12, 2012, 12:06:16 pm
Buster gave you more than enough to make a working unit and more than enough clues to figure out how to crate a unit.
Title: Re: AI Spawn Script
Post by: Xerxes on August 08, 2012, 03:44:59 am
Lots of good info Buster....thanks it was helpfull
Title: Re: AI Spawn Script
Post by: stealthstick on August 08, 2012, 05:15:34 am
What if its other side of map and you got no visual   :icon_rolleyes2

Then do this.

Code: [Select]
_targ = cursortarget;
deletevehicle _targ;
hint format ["You have deleted: %1", _targ];

Title: Re: AI Spawn Script
Post by: MrMedic on August 08, 2012, 04:49:15 pm
man im also having trouble getting the ai to target something they are like neutral even if its opposing side :(

setrating ,  dotarget , dofire ( dont use commandtarget or it will notify everyone that you have orderd an ai to kill something if they are on the same side )

ps there is a much better way to do this rather than using an ai unit.
Title: Re: AI Spawn Script
Post by: MrMedic on August 08, 2012, 05:00:54 pm
What if its other side of map and you got no visual   :icon_rolleyes2

Then do this.


_targ = cursortarget;
deletevehicle _targ;
hint format ["You have deleted: %1", _targ];



?
Title: Re: AI Spawn Script
Post by: Snuff on August 08, 2012, 05:05:21 pm
Code: [Select]
_plypos = getPos player;
runMrMedicSpawner _plypos;

That's what MrMedic is referring too.
Title: Re: AI Spawn Script
Post by: Buster on August 08, 2012, 06:17:53 pm
What if its other side of map and you got no visual   :icon_rolleyes2

Then do this.


_targ = cursortarget;
deletevehicle _targ;
hint format ["You have deleted: %1", _targ];



?
I will second that. How can this control ai ?appart from that you got no visual?
Title: Re: AI Spawn Script
Post by: stealthstick on August 09, 2012, 02:00:28 am
What if its other side of map and you got no visual   :icon_rolleyes2

Then do this.


_targ = cursortarget;
deletevehicle _targ;
hint format ["You have deleted: %1", _targ];



?
I will second that. How can this control ai ?appart from that you got no visual?

I thought you were asking "what if I delete something, but don't know/can't see if it was deleted"

If this wasn't your question, then my mistake.