Jump to content
Sign in to follow this  
colonel_paz

Couple of questions (objectives & heal script)

Recommended Posts

Hello guys,

I've been playing ARMA since the very first game, however i'm quite new to editing missions. I have a couple of questions for anyone who can help please!!

1.- How can I make a ship object appear on the water? every time I try to place a static ship it goes down the water :( I suppose I must use setPosATL... but how?

2.- Does anyone knows a simple script for self healing? I'm basically looking for something you can activate from your mause wheel menu.

Thanks for your help! :bounce3:

Edited by Colonel_paz

Share this post


Link to post
Share on other sites

Moving an object to a different height can be done using setPosATL along with getPosATL to get its current position on the other two axis. For example, putting in the init field:

this setPosATL [getPosATL this select 0, getPosATL this select 1, 5]

will place the object 5 metres above the ground.

By way of explanation, getPosATL returns an array consisting of [x,y,z] coordinates where x is to the east, y is to the south, and z is up. setPosATL takes the same set of arguments. "select" is used to pull out individual items from an array. You'll probably need to try a few tests with the z coordinate to get the ship in the right position.

For attaching scripts to units, use addAction. The simplest such script would just call

player setDamage 0.0

to instantly the player to full health, but you can also have a look at something like playMove to play an animation before the healing occurs.

Edited by some kind of guy
Fixed order of parameters

Share this post


Link to post
Share on other sites

Shouldn't it be:

this setPosATL [getPosATL this select 0, getPosATL this select 1, 5];

Share this post


Link to post
Share on other sites

Yes you're right, it should. :/ For some reason I always think getPos is the other way around.

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  

×