Jump to content
Sign in to follow this  
celery

Scripting commands you want in a future patch

Recommended Posts

oh, and please, give us more, or why not definable/unlimited, _sides_. This together with a command to set the default side of any faction.

RU vs INS vs TK vs TK_INS anyone? :/

Edited by ruebe

Share this post


Link to post
Share on other sites
This together with a command to set the default side of any faction.

RU vs INS vs TK vs TK_INS anyone? :/

A unit's side is easily determinable already, changing the default side of an entire faction seems way too messy to be practical. More sides would be nice though, and while it seems more likely that it's possible (create a new center and set it's relation with all the others), there's evidance that all over the engine it's hardcoded with just the 5 (technically, I know of 7 total) current ones and seems like BI would have to spend a lot of time to get it working 100% (or like a lot of these kinds of features, BI might implement it but only have it actually ~80% working).

Edited by Big Dawg KS

Share this post


Link to post
Share on other sites

ctrlSetAngle

CtrlAngle

GetUnitPos (return position state like "down", "middle", "up")

SetATL(ASL)PosZ

taskGUItargets - for indicate multiple objective targets for player in game screen, like waypoint indicator (with different icon types and scripting command for change it)

and i'd like to see "layer"-like ctrl structure :)

Edited by Wass

Share this post


Link to post
Share on other sites

getIdentity because setIdentity is alone without it..

Share this post


Link to post
Share on other sites

Making setIdentity array based instead of depending on description.ext would be nice, too.

Share this post


Link to post
Share on other sites

ActionKeyPress "OpticsMode";

ActionKeyPress "Stand";

ActionKeyPress "Prone";

ActionKeyPress "SitDown";

ActionKeyPress "PrevChannel";

ActionKeyPress "NextChannel";

et cetera. for any bindable action just as if the keystroke was entered by the user.

Share this post


Link to post
Share on other sites

Something like "this" (think OO - refering to itself, not parameters) from within an FSM to retrieve the currently running FSM handle (per instance of course)... since I'd like to register that fsm-handle with setVariable on the fsm-executing object (unit or group) without a wrapper function calling execFSM... that would be quite sweet. :)

Share this post


Link to post
Share on other sites

some basic I/O to text file, would be useful for recording or reading history of a game, or script. have been needed this a few times now, only to find that you cant do it :(

Share this post


Link to post
Share on other sites

Something that belongs to scripting but also to configs: ability to add "fired" EH to weapons instead of vehicles/units.

example:

"AT5Launcher" addEventHandler ["fired", {code}];

So any unit that has a AT5Launcher weapon (regardless if it's a man or a vehicle) will get this EH assigned.

If you want to be sure that such a EH that is related to the weapon does always work, you would have to add the EH to each unit (as everyone might pick up the weapon in question midgame). With the EH assigned to the weapon this work automatically and you don't have to care.

Share this post


Link to post
Share on other sites

Don't know if anyone is still looking at this thread, but I for me the most useful new commands would be to enable the full management of VON in MP. Be able to enable individual radio channels, though script commands. This would include listening and sending on each channel.

Share this post


Link to post
Share on other sites

In addition to what has been mentioned on this list already, these could be useful (just crude ideas, specific implementation and return values would need to be considered)

* _unit getImpactAngle _shot => [vert angle to normal of the hitpart, horz angle to normal, [xyz vector of the shot on impact]]

* _unit getImpactSpeed _shot => [speed of round on impact]

* _unit canhear _enemy => float 0,...1

* _unit cansee _enemy => float 0,...1

* {pos/Object} hasfreevisualtrajectory {pos/Object} => bool

* [{pos/Object}, _weapon, _mag, _muzzle] hasfreeballistictrajectory {pos/Object} => bool

The latter could also return => float 0,...1 if one would calculate penetration for the ammo type an potential surfaces crossed.

* _pos in visualsector _unit => bool (to test visual field)

* Eventhandler : "detectsfired" => [_unitthatfired, direction, estimatedistance, {with "ears", "eyes", "both"}]

* Eventhandler : "spotted" => [_unit, _enemy, knowabout or so]

* Eventhandler : "flarelaunched" => [_unit,]

* Eventhandler : "chafflaunched" => [_unit]

* Eventhandler : "ecmlaunched" => [_unit]

* Eventhandler : "weaponitemdropped" => [_unit,_item]

* Eventhandler : "weaponitemgrabbed" => [_unit,_item]

+ make FindHidePos work again (FindHidePos [pos/object, range, min height/size of cover, max height/size of cover, or object type]

+ implement aimedAtTarget also for "Man" class objects

very important I would find:

allow setvariables to work on dead "Man" type objects, i.e. don't let them loose the stored info.

Share this post


Link to post
Share on other sites
* Eventhandler : "flarelaunched" => [_unit,]

* Eventhandler : "chafflaunched" => [_unit]

* Eventhandler : "ecmlaunched" => [_unit]

FiredEH should work for these.

* Eventhandler : "detectsfired" => [_unitthatfired, direction, estimatedistance, {with "ears", "eyes", "both"}]

* Eventhandler : "spotted" => [_unit, _enemy, knowabout or so]

To a degree you can get these from the danger.FSM.

Share this post


Link to post
Share on other sites

Here are my suggestions off the top of my head:

  • _unit setHeight Number - Quick, easy, simple.
  • rotSpeed _unit - IE returns a value for the velocity/rate of spin [X,Y,Z] (or [X,Z,Y]?).. rather than trying to calculate it based on time / vector (vectordir etc.)
  • setRotSpeed _unit - Allows you to add "spin" :)
  • _array setSide "West" - Sets side of unit(s)

Share this post


Link to post
Share on other sites

I'd like an improvement to hideobject to bring back one of the features lost with the changes to deletecollection. That would be the ability to simply make the object transparent but still detectable so we could create invisible objects without having to use addons.

obj Hidetextures true

Share this post


Link to post
Share on other sites

I'd like a function ...

...to set the unit Class, for example to change the clothes of a person (MP Compatible)...

...and an AttachTo Function where the unit is still able to move, so that for example the units movement is only sent as offset to the object which it is attached to...

...and the possibility to save informations in an easy textfile to store informations to keep continuous missions continuous :)

perhaps some wishes will for christmas :)

Share this post


Link to post
Share on other sites
I'd like a function ...

...to set the unit Class, for example to change the clothes of a person (MP Compatible)...

...and an AttachTo Function where the unit is still able to move, so that for example the units movement is only sent as offset to the object which it is attached to...

...and the possibility to save informations in an easy textfile to store informations to keep continuous missions continuous :)

perhaps some wishes will for christmas :)

3 quarters of your requests are available in upcoming TOH and A3.

---------- Post added at 16:13 ---------- Previous post was at 16:13 ----------

setobjecttextures for all units!

setObjectTexture works just fine for all units.

---------- Post added at 16:16 ---------- Previous post was at 16:13 ----------

Here are my suggestions off the top of my head:

  • _unit setHeight Number - Quick, easy, simple.

Seems somewhat pointless though indeed probably quick, easy and simple, though the same counts for writing a function or macro.

Share this post


Link to post
Share on other sites
setObjectTexture works just fine for all units.

Hasn't for me. I've had problems setting texture with the Russian Spetznas units. I wanted them to have a custom camo for a mission.

Seems somewhat pointless though indeed probably quick, easy and simple, though the same counts for writing a function or macro.

;)

Also it makes scripting much more accessible and sense to complete scripting newbies. How to set height is one of the most frequently asked questions and this could provide simple answers / make it easy for lazy people.

Edited by Dead3yez

Share this post


Link to post
Share on other sites
Hasn't for me. I've had problems setting texture with the Russian Spetznas units. I wanted them to have a custom camo for a mission.
That's not a matter of setObjectTexture command not working on the unit, but the model's selection naming or timing issue, as some units have setObjectTexture set in config init eventhandlers.

Which isn't relevant to "Script commands you want in a future patch".

Oh well, perhaps somewhat nitpicky :D

Share this post


Link to post
Share on other sites

Make global versions of say, chat, radio, hint and titleText commands. It would simplify things a huge amount.

Share this post


Link to post
Share on other sites
Make global versions of say, chat, radio, hint and titleText commands. It would simplify things a huge amount.

Yes!

player globalChat "String";

player mpGlobalChat "String";

something like that.

EDIT:

Would like built-in SQL functions (connect, query, insert, etc)

Edited by GossamerSolid

Share this post


Link to post
Share on other sites

quick thought.

  • _Killedmen = advScore unitName select 0; //(advanced score) to return individual scores [Men,Light,Heavy,Air]

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  

×