Jump to content
Sign in to follow this  
Minizzzile

this addaction AI join squad. Multiplayer.

Recommended Posts

Hello, I am creating a script that forces an AI to join a players squad. (This is for multiplayer so it has to work for any player, which is where I run into problems)

This is what I place on the AI(s) I want to be able to join the player.

Join = this addaction ["Join Group","Join.sqs"]

Join.sqs

[this] join group player

Which dosen't work (obviously) but I got this response in a different thread but didn't ask him about it because it wasn't a thread for scripting help :S

If anyone can help, I would appreciate it.

You would have to search the zombie´s (this) nearestobjects and check if isplayer is true, then save it into a variable and join to the group of that human player.

I am at a lost as what to do here... :j:

Share this post


Link to post
Share on other sites

try this:

private ["_obj","_caller","_id"];
_npc = _this select 0;
_caller = _this select 1;
_id 	= _this select 2;

_npc removeAction _id;
[_npc] joinSilent _caller;

Share this post


Link to post
Share on other sites
try this:

private ["_obj","_caller","_id"];
_npc = _this select 0;
_caller = _this select 1;
_id 	= _this select 2;

_npc removeAction _id;
[_npc] joinSilent _caller;

Monsada, what if it was *.sqf?

Share this post


Link to post
Share on other sites

That is SQF, you can tell by the semicolons at the end of each statement. With SQS the semicolons represent comments (I think).

Share this post


Link to post
Share on other sites
That is SQF, you can tell by the semicolons at the end of each statement. With SQS the semicolons represent comments (I think).

Just making sure, since I do not know about sqs, because in the OP it says, "Join.sqs".

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  

×