Jump to content
Sign in to follow this  
evilnate

How to make units charge!

Recommended Posts

I want to make a mission where the players on on the roof of a hotel and they must defend it from a mob of angry civilians.

I have a group of 21 armed civilians that are told to run to a hotel and fight but it isn't working out so well.

I tried adding <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this SetUnitPos "UP"; this allowfleeing 0 to the init of each civilian but they still go prone, and stop advancing. I want them to RUN after the HOTEL and only stop if they are going to fire. I searched the OFP section very hard but find nothing that works for ARMA.

I've tried making the waypoint MOVE, SEEK AND DESTROY, CARELESS, SAFE, COMBAT, etc. but nothing is working the way I want it to.

Share this post


Link to post
Share on other sites

A simple "move" waypoint with speed mode "full" and behaviour "aware" should do it but I think this will only work as long as your civilians do not have enemy contact (AI switch to combatmode "red" as soon as they encounter enemis afaik).

Share this post


Link to post
Share on other sites

Also this SetUnitPos "UP"; does not work in Arma 1.02. I saw on these boards that it will be fixed in the next patch, whenever that will be. Prob Feb, with release of UK version.

Cheers

GC

Share this post


Link to post
Share on other sites

It actualy does work.

But it's automaticly switched back to "auto".

So if you make a looping script it will work:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

#loop

Unit_Name SetUnitPos "UP"

goto "loop"

Share this post


Link to post
Share on other sites

I was wondering if it was a 1.02 thingy.

Ya sure do find alot of these buggers when making missions.

Thanks for the input.

Share this post


Link to post
Share on other sites
It actualy does work.

But it's automaticly switched back to "auto".

So if you make a looping script it will work:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

#loop

Unit_Name SetUnitPos "UP"

goto "loop"

Sorry Mr Pedantic. But if a light is turned on and then is turned off straight away, then it works, but not as you want it to, or as it should.

So i will say that the command doesnt work as it does in OFP, and it will work like it did in OFP in the next patch of ARMA.

Cheers

GC

Share this post


Link to post
Share on other sites
It actualy does work.

But it's automaticly switched back to "auto".

So if you make a looping script it will work:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

#loop

Unit_Name SetUnitPos "UP"

goto "loop"

Sorry Mr Pedantic. But if a light is turned on and then is turned off straight away, then it works, but not as you want it to, or as it should.

So i will say that the command doesnt work as it does in OFP, and it will work like it did in OFP in the next patch of ARMA.

Cheers

GC

Sorry for being pedantic, but I think that there is huge difference between "No, it just doesn't work" and "No,but it works different way".

Have you tried that ?

I don't think so.

'cos if you did you could notice, that it works.

As you can see, there is no "sleep" in my (easy) script.

That means, that SetUnitPos "UP" is repeated every 0,0000whatever (basicly as fast as your PC can handle it).

Why will be this corrected in next patch than ?

'cos it's much easier to add "SetUnitPos" in unit's init line that making a script for that.

Cheers

Deadfast (Mr. Pedantic)

Share this post


Link to post
Share on other sites

It will be fixed in the next patch, so it works as it did.

It would also be a command to the ai unit, that would be needed once, and not thousands of times for a long map, also if lots of units had the script, then the command would be executed shit loads of times.

I do believe the prob with the command is that it sets itself to AUTO after the up command was given, therefore seems incorrect to me from a programming point of view.

Cheers

GC

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  

×