Jump to content
Sign in to follow this  
celery

Scripting commands you want in a future patch

Recommended Posts

Let's tell the devs what kinds of commands we would find useful. :)

addWeaponTurret/removeWeaponTurret

We can check, add and remove turret magazines but we lack the means to do the latter two with weapons. I've had to do some ridiculous workarounds to make turrets fire weapons that they do not have (checking when a turret fires, then forcing the main vehicle to fire the desired round, giving it the position and vector of the turret's round and deleting the original fired round).

An improved fire command

When you use fire on an infantry unit, it will take aim at the sky and then fire. We want the needless aiming part gone.

Command to check score board stats

This would be an extremely useful command. The command could return the stat array of the given unit in an [infantry,soft,hard,air,deaths,total] format. This would enable us to reliably add or deduct score depending on how we want players to receive score, i.e. no extra score for killing vehicles.

An intelligent respawn-type setPos command

You know how you spawn within the respawn marker when you die? Well, I'd like to be able to do the same with a command, giving it the desired unit and marker and the unit would be sent to a random position within the marker without ending up in water or stuck in objects.

Share this post


Link to post
Share on other sites

attachTo with rope/bone.

getHit (counterpart of setHit).

turnedOut

stance

turretWeaponDirection

headDir

setMarkerAttachLocal

saveConfig

Eventhandlers:

positionChanged

turnIn/turnOut

getInMan/getOutMan

ammoHit

onMarkerCreated event..

Edited by Sickboy

Share this post


Link to post
Share on other sites

the option to get non-classed objects via a nearestObjects call, perhaps by passing objNull or something in place of the array of classes.

ability to detect objects in a direction/range/angle vs circle centered around a unit.

biggest request - ability to explicitly kill a running FSM.

Share this post


Link to post
Share on other sites
the option to get non-classed objects via a nearestObjects call, perhaps by passing objNull or something in place of the array of classes
nearestObjects with an empty array does that :)

However that would include all objects, and not the non-classed ones specifically, perhaps that's what you meant.

Share this post


Link to post
Share on other sites
nearestObjects with an empty array does that :)

However that would include all objects, and not the non-classed ones specifically, perhaps that's what you meant.

A !(isKindOf "All") check will take care of the problem.

Share this post


Link to post
Share on other sites

hasLOS

Checks if Object A has free line of sight to Object B or if it's hidden behind obstacles of any sort (trees, other objects, terrain). Basically like a radar.

Share this post


Link to post
Share on other sites
A !(isKindOf "All") check will take care of the problem.
It does, but it is less convenient, and perhaps more demanding, than having it available from the command, natively.

Another example is the Eventhandlers i mentioned, getInMan, getOutMan.

If you really want to you can generate these events yourself by attaching getIn/getOut handlers to all vehicles, and generating the getInMan/getOutMan from that.

Yet it isn't very convenient and it will generate a lot of events that you probably need to discard.

Edited by Sickboy

Share this post


Link to post
Share on other sites

id like a command that tells wether a player cursor or anyones weapon is pointed at an object/unit.

Not like the knowsabout wich stays at 4 after you look away, but instant.

Look on object value is 1 or whatever.

Look away and value is imediatly 0 or whatever.

nvm command already exists, ty Myke for pointing it out.

Edited by Demonized

Share this post


Link to post
Share on other sites
id like a command that tells wether a player cursor or anyones weapon is pointed at an object/unit.

Not like the knowsabout wich stays at 4 after you look away, but instant.

Look on object value is 1 or whatever.

Look away and value is imediatly 0 or whatever.

You should check the comref prior to request commands that already exist: cursorTarget

Share this post


Link to post
Share on other sites
Myke;1822292']hasLOS

Checks if Object A has free line of sight to Object B or if it's hidden behind obstacles of any sort (trees' date=' other objects, terrain). Basically like a radar.[/quote']

ditto x 100. I've needed a hasLOS command in every mission i've ever done and have always had to make do with ugly brute force checks such as firing a bullet etc, that are not pretty or anywhere near as effective.

Share this post


Link to post
Share on other sites

setWeaponDirection!

also something with LOS like Myke suggested. Right now its a pain in the ass to get LOS. :(

Share this post


Link to post
Share on other sites

Ive been wanting a LOS check for ages, thanks for making the request Myke.

My latest attempt to get good LOS check is to try a hidden soldier (hideobject) aiming a laser designator at a position with a spawned trigger at the spot. If the trigger shows a laser target object in the list then LOS = TRUE. If no laser in the trigger then an object blocked the laser so no LOS. Its getting ridiculous. This method is untested.

islocked - check if a vehicle is laser locked and by whom

firelocked - force AI to fire its guided weapon once locked onto target. Stay locked onto target untill missle dead or scripter tells the AI to do different

switchlocked - get an array of known lockable targets to ai vehicle and allow scripter to switch lock to another target if desired

fix dofire - unreliable command, should be absolute like fire/useweapon

fix domove - unreliable command , does not work over long distances (like unoptimized pathfinding code) or if Ai is FSM'ed to do something else the command is often forgotten. Spamming the command with loops is an ugly workaround for this that also works about as bad.

isaimedat - check if a unit is aiming at something (actuall barrel angle not if internally targeted)

fix fire command for infantry as Celery described above...

disableAI "rotate" so we get back rotation for disableAI move and can lock rotation as WE wish. I cant understand the regression in flexibility that was done here....

disableAI "overwatch" - .....

disableAi = "behaviourchange" - ....

disableai = "combatmodechange" - .....

disableAI "FSMcontroll" -.....

more controll over default AI behavior is a MUST!

reinstate deletecollection:

hideobject is turning out to be no good for many things I wanted it for....

hideobject should not prevent units from targeting (aiming straight at) hidden objects. For about a year or so we had scriptable working invisible targets method (no addon dependancy) with deletecollection then bis took the command away and replaced it with an inferior command. Now to get invisible targets back we have to wait for Mapfact to never release them for Arma2 (because they quit) or install a large mod like ACE which should not require

BTW: BIS did really well to add the projectile to the fired EH array. THANK YOU!

Share this post


Link to post
Share on other sites

Fix setMimic

We were able to show emotion on people's faces in OFP and Arma 1 with this command but it doesn't work in Arma 2. Everyone is srs bsns or unintentionally smiling.

Share this post


Link to post
Share on other sites
biggest request - ability to explicitly kill a running FSM.

While I agree, you may quite easily design your fsm quitable. Just have some variable in your fsm, say _quitFSM, and incorporate a simple check in the "main-loop" of the fsm. Once _quitFSM is true, the fsm quits.

Now you can simply setFSMVariable _quitFSM to true from anywhere and the fsm will quit the next loop. Sure, maybe you want to

waitUntil{(completedFSM _fsm)};

or something prior to starting a new fsm or whatever...

Works pretty nice, aslong as you do it the same way for all your fsm. Also this way you may incorporate something like a clean-up routine in your fsm before it really quits. I doubt you could do something like this, if you'd simply kill the fsm. But ok...

killFSM [i]handle[/i]

Why not. :)

Share this post


Link to post
Share on other sites

this addallmagazines;

A scripting command so that when you add a weapon for a unit, the default ammunition is automatically allotted, rather than having to do ten addmagazine scripting commands. And, a bug fix that fixes the bug where Czech characters appear instead of English ones.

Share this post


Link to post
Share on other sites

I'd like SQF scripts to be able to use the goto command. If they did, it would be the ultimate scripting format. Getting to return or skip to any part of a script would save tons of effort by not having to write a single huge wall of code that has to take every possible situation into account multiple times.

Share this post


Link to post
Share on other sites

position collisionTrace vector;

position collisionTrace [vector, [ignore1, ignore2...]];

Share this post


Link to post
Share on other sites

I still would like to have setHeight which basicly should be a shortcut for "this setPos [(getpos this select 0), (getpos this select 1), height_variable]";

I don't know how often I wrote that line, but I guess it was several thousand times in the past 10 years.

Share this post


Link to post
Share on other sites

I want a command which can move an object from one 3d position to another smoothly regardless simulation.

i.e. Move a land vehicle to the air and then move it to another position in the air so that I can create a kinda of enviroment loss gravity! lol.

What's more, I also wanna a command which can return the bullet drop position directly so that I can write the dust effect more easily when a bullet hit on someplace.

Share this post


Link to post
Share on other sites
I'd like SQF scripts to be able to use the goto command. If they did, it would be the ultimate scripting format. Getting to return or skip to any part of a script would save tons of effort by not having to write a single huge wall of code that has to take every possible situation into account multiple times.

But the whole purpose of SQF is to be more structured and get rid of harmful gotos...

Share this post


Link to post
Share on other sites
I still would like to have setHeight which basicly should be a shortcut for "this setPos [(getpos this select 0), (getpos this select 1), height_variable]";

I don't know how often I wrote that line, but I guess it was several thousand times in the past 10 years.

slightly easier way...

_pos = getPos _obj;
_obj set[2, _heightVar];
_obj setPos _pos;

Share this post


Link to post
Share on other sites
But the whole purpose of SQF is to be more structured and get rid of harmful gotos...

I don't consider it harmful. It's one of the two big reasons I prefer SQS to SQF because I'm able to write scripts that would be a nightmare to organize without the goto command, such as a zombie behavior script. And those who don't like it wouldn't have to use it in any case.

Share this post


Link to post
Share on other sites
I don't consider it harmful. It's one of the two big reasons I prefer SQS to SQF because I'm able to write scripts that would be a nightmare to organize without the goto command, such as a zombie behavior script. And those who don't like it wouldn't have to use it in any case.

Why not use FSM then? They are actually pretty much the same thing as using lots of gotos, only better. Sounds like that's what you need. Also since SQF can return values, gotos wouldn't really work so well, so I say keep them out of SQF.

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  

×