Home   Help Search Login Register  

Author Topic: units sits down  (Read 3399 times)

0 Members and 1 Guest are viewing this topic.

Offline bakerboy1990

  • Members
  • *
units sits down
« on: 30 Jul 2009, 16:29:35 »
hi im trying to make an AI unit sit down but he wont do it, ive tryed all the methods to no avail, i think this is the officil syntax for the ARMA version is this soldierOne action ["sitDown", soldierOne], but it doesnt work, please help, thanks

Offline CH

  • Members
  • *
Re: units sits down
« Reply #1 on: 17 Aug 2009, 23:53:09 »
I think he has to be in "safe" mode or else he will stand up once seated.

I've attached a sample mission so you can see for yourself.

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Re: units sits down
« Reply #2 on: 18 Aug 2009, 11:05:58 »
You should use a "move" WayPoint  OR a trigger which start after 1 second....to make the unit sitdown

Place the unit,and place a "move" WP for the unit,in the On Act of the WP, put
this action ["sitdown",this] or this action ["sit down",this]     (i forgot which is the right one)

To make him salute :

this action ["salute",this]

Haroon1992.........................
Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(

Offline bakerboy1990

  • Members
  • *
Re: units sits down
« Reply #3 on: 26 Aug 2009, 15:58:53 »
thanks for the replies, but they dont work, tryed every example

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Re: units sits down
« Reply #4 on: 26 Aug 2009, 16:26:44 »
As the action sit down command is not working for you, i suggest you use an animation command....
Check out this for more action commands :http://community.bistudio.com/wiki/ArmA:_Actions

The animation list can be found on the following link :
http://community.bistudio.com/wiki/ArmA:_Moves

Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(

Offline bakerboy1990

  • Members
  • *
Re: units sits down
« Reply #5 on: 26 Aug 2009, 20:46:20 »
thanks for the reply :) how do i implement the animation i.e where do i put it?? i think this is the correct animation    AmovPercMstpSlowWrflDnon_AmovPsitMstpSlowWrflDnon

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Re: units sits down
« Reply #6 on: 27 Aug 2009, 14:45:13 »
Put this in your soldier's WP, the animations should not work with the init field of the units [as i never succeeded in doing that]
So place a WP, make it wait about 1 second,
then :

unitname switchmove "AmovPercMstpSlowWrflDnon_AmovPsitMstpSlowWrflDnon"
OR
unitname playmove "AmovPercMstpSlowWrflDnon_AmovPsitMstpSlowWrflDnon"

switchmove = the unit will change to the specified animation instantly.....[quite unrealistic, but this is best for intros and cutscenes]
playmove = the unit will change to the specified animation normally [that is, the unit will sitdown]

[note : Most of the animations i have tried are only working with switchmove]

Additional :
What if you wanted to make an animation loop.....
Say a unit will salute you when you are near him, then he will return to normal position...
There are two methods possible,
Using Trigger
Using a Script


Using Trigger
========

First put a trigger,

Axis A and B   :    0

Activation : Anyone , NOT PRESENT
REPEATEDLY

Condition  :   player distance saluter < 10

On Act      :  saluter action ["SALUTE",saluter]

On Deact   : saluter action ["CANCELACTION",saluter]
---------------------------------------------------------------------------------------
Using a Script
==========
Code: [Select]
#startthesalute
?not (alive player) OR not (alive saluter)   :   exit
;?= if, and "  :   " = then,exits the script when one of the two is dead

@player distance saluter < 10
saluter action ["SALUTE",saluter]
;saluter will salute player if player is less than 10 m from him

@player distance saluter > 10
saluter action ["CANCELACTION",saluter]
;saluter stops saluting as player is further than 10 m from him

goto "startthesalute"
;the script jumps to the label "startthesalute" and waits again for the player to approach saluter

Note : saluter can be anything , you have to name the saluting unit...
Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(

Offline bakerboy1990

  • Members
  • *
Re: units sits down
« Reply #7 on: 27 Aug 2009, 17:27:08 »
oh u are such a help....excellent it works!!! thanks you so much.

now another question lol, i make 4 jets attack an invisable target, they drop bombs etc, but they keep turning round and attacking the target, i only want them 2 drop 1 bomb and then leave, example: this doTarget T1: this doFire T1 and waypoint order is open engage at will, status combat and speed full, then i have a waypoint get out at an airfield but they ignore this, i also made a trigger to set waypoint but i get an error when i play the mission, this setWPPOS P1, maybe i need a setPos getPos in there some where??

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Re: units sits down
« Reply #8 on: 28 Aug 2009, 15:16:00 »
It will be more suitable if you open a separate thread about this.
Also i am not VERY familiar with the air strike, honestly, i never EVEN tried of it...

Here is a quote from the Admin of ArmAHolic.com,

Foxhound
Quote
Yep, getting planes to fly the route you want them with waypoints is, as far as I know (and master Fox doesnt know all you know ), not possible.
Cause of the speed of the plane he may miss a waypoint if you put it to close or want it to turn to fast.
If he misses a waypoint he will try to move back in order to reach, only from another way, so this means he has lost the path completely and getting to the next waypoint will give the plane the same problems.

Use waypoints spread out enough for the AI to be able to reach them.
For bombing runs try to use straigt approching lines indeed.

Also, if you activate the explosions by trigger like shadow_spyder explained you might as well use a bombing script instead of just creating explosions.


strike.sqs
Code:
_plane = _this select 0
_plane fire "BombLauncher"
~0.6
_plane fire "BombLauncher"
~0.5
_plane fire "BombLauncher"
~0.6
_plane fire "BombLauncher"
~0.6
_plane fire "BombLauncher"
exit



Execute this like
Code:
[xxxxxx] exec "strike.sqs"

Where xxxx is the name of the plane.


All you have to do is test and try where to put the trigger to make sure the plane actually hits the target.
Keep in mind speed and height do influence the path of the bombs, so if you finally make it hit the targets and you change its height (for example) you will have to adjust the position of the trigger too.

But i found these on the ArmAHolic.com, hope one of them will work... :

http://www.armaholic.com/page.php?id=428
http://www.armaholic.com/page.php?id=1090
The above links contains downloadable Air Strike templates and they are ready to use ones..
---------------------------------------------------------------------------------------
However , if you want to make your own and customize yours follow this :
Forum Threads about air strike :

http://www.armaholic.com/forums.php?m=posts&p=5774#5774   Mission Editing/Planes Bombing

Also you can use the SEARCH function provide both here on OFPEC and ArmAHolic...
Just type what you want, in this case.....
type air strike
http://www.ofpec.com/forum/index.php?action=search
OFPEC search ^

http://www.armaholic.com/plug.php?e=search&a=search
ArmAHolic search ^

Haroon1992.......................................
« Last Edit: 28 Aug 2009, 15:22:35 by haroon1992 »
Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(