Jump to content
Sign in to follow this  
NeMeSiS

New ArmA Scripting commands

Recommended Posts

With the release of the wiki we can now see what kind of new commands there are, lets find them and speculate what they to/their possibilites for enw scripts  biggrin_o.gif

ArmA scripting section

hideBehindScripted, When set to true it disables the default engine hiding behavior.

unit hideBehindScripted true

So units will know how to properly hide/fond cover this time?  smile_o.gif

enableAI, This one is probably going to be popular aswell wink_o.gif

Share this post


Link to post
Share on other sites

weeeeeeeee...now we can prepare for the posibilities of ArmA yay.gif  yay.gif  yay.gif  yay.gif

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

[side, position, idStatic, vehicle]: Array

Type of returned value:

Nothing

Compatibility:

Version 1.86 required.

Description:

Adds a point guarded by the given side.

If idStatic is not negative, the position of a static object with the given id is guarded.

If the given vehicle is valid, the starting position of the vehicle is guarded, otherwise the given position is guarded.

Example:

point = createGuardedPoint [ east, [0, 0], -1, vehicle player ]

Now that is sweet biggrin_o.gif

Share this post


Link to post
Share on other sites

In Model Config it lists the Observer/Commander Gun and Turret and the Main Gun and Turret. Does it mean weapons on vehicles will be limited to two?

And it lists the Observer/Commander Gun and Turret only for Tanks.

What does that all mean?

-------------------------------------------------------------

Nice now we have a slide animation, called translation smile_o.gif

Share this post


Link to post
Share on other sites

This is amazingly interesting but I am not coder so could someone here explain to me what some of these new innovative scripts will do in laymens terms? Like give me a situation please

Share this post


Link to post
Share on other sites
This is amazingly interesting but I am not coder so could someone here explain to me what some of these new innovative scripts will do in laymens terms? Like give me a situation please

Well, they are not all new, the old ones from OFP/OFPE are included aswell.. smile_o.gif

If you click on them they give a short description, i couldnt figure them all out, but most of them are pretty straight forward: createGroup

I am still wondering what the difference between setSkill and setUnitAbility is huh.gif

Share this post


Link to post
Share on other sites

hmm so far the ones posted are from version 1.75 plus. lol . we need to discuss the 2.90 and above surely ?

Share this post


Link to post
Share on other sites

Hi,

I have to say that this is very very very very nice thumbs-up.gif . Good work. I really like many new script commands I see.

But wink_o.gif :

- Where are the functions for analyzing and modyifing strings

- I can't seem to see a getTarget(gets units target) and a getWhatUnitisLookingAt.

- There is not getMarkerText in the wiki,which seems odd since you can setMarkerText now smile_o.gif

- There are no MP-related functions like one gets by Bn880's COC Network Services 2. Are they going to be some or do I have to rely on bn880 in the future as well smile_o.gif

Thats all I could think of right now as this is obviously quite an amount of information,very nice new script commands by the way(I repeat myself biggrin_o.gif). I especially like all the UI ones

Share this post


Link to post
Share on other sites

I find the concept of "AI Centers" very interesting: createCenter, deleteCenter

I assume that means some sort of "main point of interest" for the AI, which would open up much more flexible AI behaviour!

Share this post


Link to post
Share on other sites

And we are finally able to create different types of waypoints including all their parameters! Woohoo! biggrin_o.gif

Share this post


Link to post
Share on other sites
And we are finally able to create different types of waypoints including all their parameters! Woohoo! biggrin_o.gif

As well as dynamic triggers:

• createTrigger

• setTriggerActivation

• setTriggerArea

• setTriggerStatements

• setTriggerText

• setTriggerTimeout

• setTriggerType

Share this post


Link to post
Share on other sites
I find the concept of "AI Centers" very interesting: createCenter, deleteCenter

I assume that means some sort of "main point of interest" for the AI, which would open up much more flexible AI behaviour!

Well, it might be that, but if you open current OFp game saves (with CoC BinViewer or something), you can see that AI centers are in fact instances of a class containing all the current AI information (what is the AI doing, position, known targets, waypoints, etc.).

I'm guessing that this will allow something like a complete restart of whole AI during mission for long MP.

BTW: We can probably make new commands, like "move" or "no target" :

http://community.bistudio.com/wiki/commandFSM

http://community.bistudio.com/wiki/doFSM

Now to discover FSM files format. smile_o.gif

Share this post


Link to post
Share on other sites
Well, it might be that, but if you open current OFp game saves (with CoC BinViewer or something), you can see that AI centers are in fact instances of a class containing all the current AI information (what is the AI doing, position, known targets, waypoints, etc.).

Don't burst my bubble! wink_o.gif

But then again, if you look at the setTargetAge command - they are talking about "how the target is known to the other centers".

Which led me to believe that this might be a new type of "AI Center"...

Share this post


Link to post
Share on other sites
Guest Ti0n3r

edit: Ah nevermind sad_o.gif

Share this post


Link to post
Share on other sites

I'm currently watching at TeamSwitch, EnableTeamSwitch, RemoveSwitchableUnit, SwitchableUnits, SetPlayable...

I'd like SwitchTo instead of SelectPlayer, but it's MHO wink_o.gif

edit: wrong commands!

Share this post


Link to post
Share on other sites
Well, it might be that, but if you open current OFp game saves (with CoC BinViewer or something), you can see that AI centers are in fact instances of a class containing all the current AI information (what is the AI doing, position, known targets, waypoints, etc.).

Don't burst my bubble! wink_o.gif

But then again, if you look at the setTargetAge command - they are talking about "how the target is known to the other centers".

Which led me to believe that this might be a new type of "AI Center"...

That supports my interpretatation. It is like InfoAge in Editor, which sets when was unit last detected by someone from that side (in OFp this influence only enemy icons on map IIRC).

Of course, I'm not sure, maybe some expert who fiddled with AI long enough can make it clear.

These commands may also indicate that you can create & destroy sides dynamically. You can at least change who is friendly to whom:

http://community.bistudio.com/wiki/setFriend

Share this post


Link to post
Share on other sites

Well,seems the Script-Command reference is somewhat WIP indeed.

Question:

http://community.bistudio.com/wiki/setPlayable

So it isnt "unit setPlayable bool" in order for one to turn off units that are currently unoccupied and playable

onPlayerDisconnected/Connected <- I sure hope that isnt a thing like onMapSingleClick that can be overwritten and you can't even check what it currently is

Btw,does publicVariable send all Types now?

Oh boy,I figure Ill wait 1-2 months and then check out this wiki again and wait for now or there are too many questions biggrin_o.gif

Share this post


Link to post
Share on other sites
But I can't see commands for:

- returning unit's stance

animationState?

Yeah, I noticed that later but didn't want to edit my post for the 3rd time smile_o.gif

Share this post


Link to post
Share on other sites

Operand types:

unit(s): Object or Array

[fsm name, position, target]: Array

Type of returned value:

Nothing

Compatibility:

Version 2.53 required.

Description:

Orders a unit to process command defined by FSM file (silently).

Example:

soldierOne doFSM' ["move.fsm", position player, player]

sounds v interesting . a bit of this and initambience we onto a winner already smile_o.gif

Share this post


Link to post
Share on other sites

Not really a scripting command, but config values and interesting:

Quote[/b] ]transportVehiclesMass

Integer: Default 0

transportVehiclesMass = 0; // not used by any model

Quote[/b] ]transportVehiclesCount

Integer : default 0

transportVehiclesCount = 15; // a Carrier (big ship)

There's so much nice stuff inside, but I also got some things I'm not confident with wink_o.gif

Share this post


Link to post
Share on other sites

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

Operand types:

None

Type of returned value:

Nothing

Compatibility:

Version 2.90 required.

Description:

Initialize the ambient life.

nener.gif

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

Operand types:

obj: Object

Type of returned value:

Array

Compatibility:

Version 2.61 required.

Description:

Return object's direction vector in world coordinates as [x, z, y].

I've wanted this one for a long time.

Share this post


Link to post
Share on other sites

WIND

Operand types:

None

Type of returned value:

Array

Compatibility:

Version 2.92 required.

Description:

Returns the current wind vector.

So if wind is simulated, than this means weapon projectiles will be affected by wind?

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  

×