Jump to content
Sign in to follow this  
toadlife

Request for new scripting command in next patch

Recommended Posts

I small request for the BIS guys - The following command would be nice to have (to return handguns):

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

tertiaryWeapon vehicle

Operand types:

vehicle: Object

Compatibility:

Version 1.?? required.

Type of returned value:

String

Description:

Returns name of vehicle's tertiary weapon (empty string if none).

Example:

tertiaryWeapon player<span id='postcolor'>

Thanks!

Share this post


Link to post
Share on other sites

While we are wishing smile.gif

I'd like a command to check if helo has landed.

Hoz

Share this post


Link to post
Share on other sites

To check if a helo has landed just see if it's y pos is less than 3 or something.  And also check that it has health, that it didn't crashland. smile.gif

Doolittle

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (GAMEER_77 @ Dec. 03 2002,11:57)</td></tr><tr><td id="QUOTE">Another could be getheaddir and setheaddir wink.giftounge.gif<span id='postcolor'>

Hmm, howzabout "obj setDir heading" and "getDir obj"?

But what I truly wish for are the commands for setting pitch and bank of objects. That's the one major thing missing.

Share this post


Link to post
Share on other sites

what we REALLY need is to be able to name a unit which has been created by createUnit and that it doesn't need a group:

_bob = "soldierWMedic" createUnit [(getMarkerPos "spawn")]

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Spitfire @ Dec. 04 2002,16:31)</td></tr><tr><td id="QUOTE">But what I truly wish for are the commands for setting pitch and bank of objects. That's the one major thing missing.<span id='postcolor'>

Seconded.

Prospero.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Spitfire @ Dec. 04 2002,16:31)</td></tr><tr><td id="QUOTE">But what I truly wish for are the commands for setting pitch and bank of objects. That's the one major thing missing.<span id='postcolor'>

I agree on this one, but in a different manner:

getNormal object

returns the normal vector of an object

getNormal [X, Y]

returns the normal vector of terrain at [X, Y]

object setNormal [X, Y, Z]

sets the normal vector of an object

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Skumball @ Dec. 04 2002,17:23)</td></tr><tr><td id="QUOTE">what we REALLY need is to be able to name a unit which has been created by createUnit and that it doesn't need a group:

_bob = "soldierWMedic" createUnit [(getMarkerPos "spawn")]<span id='postcolor'>

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">"SoldierWB" createUnit [getMarkerPos marker1, groupAlpha, "bob=this"]<span id='postcolor'>

Works fine for naming a unit (little pbs for local variables, but can be sorted out).

About the group, it would definatively make things easier.

But this 2 points can ben sorted out currently :

What I do is create a dummy unit f the desired side, let's say dummyEast.

When I create a unit, I put it in dummyEast's group, then immediatly remove dummyEast from the group (dummyEast join grpNull)

It's like creating a unit in its own group.

And for the name, I use a generic name in the init field in the createUnit command (newEast=this), and then associate a local variable (_b=newEast) so that other instance of the script do not interfere.

Whis'

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (whisperFFW06 @ Dec. 05 2002,11:54)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Skumball @ Dec. 04 2002,17:23)</td></tr><tr><td id="QUOTE">what we REALLY need is to be able to name a unit which has been created by createUnit and that it doesn't need a group:

_bob = "soldierWMedic" createUnit [(getMarkerPos "spawn")]<span id='postcolor'>

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">"SoldierWB" createUnit [getMarkerPos marker1, groupAlpha, "bob=this"]<span id='postcolor'>

Works fine for naming a unit (little pbs for local variables, but can be sorted out).

About the group, it would definatively make things easier.

But this 2 points can ben sorted out currently :

What I do is create a dummy unit f the desired side, let's say dummyEast.

When I create a unit, I put it in dummyEast's group, then immediatly remove dummyEast from the group (dummyEast join grpNull)

It's like creating a unit in its own group.

And for the name, I use a generic name in the init field in the createUnit command (newEast=this), and then associate a local variable (_b=newEast) so that other instance of the script do not interfere.

Whis'<span id='postcolor'>

Hey... thats what I need!!

Can you explain a bit further with some sample coding?

Johan

PLEASE!

Share this post


Link to post
Share on other sites

Well I don't know if I should be happy or angry that you punkers hijacked my topic. At least you kept it on the first page for awhile. tounge.gif

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (toadlife @ Dec. 03 2002,05:34)</td></tr><tr><td id="QUOTE">I small request for the BIS guys - The following command would be nice to have (to return handguns):

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

tertiaryWeapon vehicle

Operand types:

   vehicle: Object

Compatibility:

   Version 1.?? required.

Type of returned value:

   String

Description:

   Returns name of vehicle's tertiary weapon (empty string if none).

Example:

   tertiaryWeapon player<span id='postcolor'>

Thanks!<span id='postcolor'>

I was going to post something about handguns when I saw your thread. What is exactely this supposed to do? Sorry but I fail to understand this script. sad.gif

What I miss is the following:

Having your main gun on your back makes your behaviour mode to be "SAFE" and when you grab it in your hands, player's behaviour is automatically set in "AWARE" mode. That's cool because with a simple script line, AI units are able to identify this movement as a menace and can give proper reaction. Then if a policeman sees you walking by with an M16 he won't care about this fact wow.gif , but if you addopt combat position he will try to shoot you.

Unfortunately this is not true for handguns. It makes no difference either having them on your back or in your hand. It would be very useful for covert mission design if having the pistol on hand sets unit behaviour in "AWARE" instead of leaving it in "SAFE"

Regards

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Holy Smoke @ Dec. 10 2002,05:07)</td></tr><tr><td id="QUOTE">I was going to post something about handguns when I saw your thread. What is exactely this supposed to do? Sorry but I fail to understand this script. sad.gif

What I miss is the following:

Having your main gun on your back makes your behaviour mode to be "SAFE" and when you grab it in your hands, player's behaviour is automatically set in "AWARE" mode. That's cool because with a simple script line, AI units are able to identify this movement as a menace and can give proper reaction. Then if a policeman sees you walking by with an M16 he won't care about this fact wow.gif , but if you addopt combat position he will try to shoot you.

Unfortunately this is not true for handguns. It makes no difference either having them on your back or in your hand. It would be very useful for covert mission design if having the pistol on hand sets unit behaviour in "AWARE" instead of leaving it in "SAFE"

Regards<span id='postcolor'>

It has nothing to do with behavor or detecting weather or not a unit has his weapon drawn.

In 1.75 the great folks at BIS added two very usefull commands, "primaryweapon", and "Secondaryweapon".

primaryweapon will return the weapons a vehicle has in its primary weapons slot, and secondayweapon will return weapons in the secondary weapons slot like.

For example If a soldier named "dude" has and m16 and a law launcher, the command primaryweapon dude will return "m16"

the command secondaryweapon dude will return "LAWLauncher"

If dude has a beretta there is no command that will return that weapon.

Hence my asking for a tertiaryweapon command.

For now I can extract the handgun a unit is carrying by doing this workaround:

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

_tertiaryweapon = (weapons dude - [Secondaryweapon dude,Primaryweapon dude]) select 0<span id='postcolor'>

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (toadlife @ Dec. 11 2002,18:37)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_tertiaryweapon = (weapons dude - [Secondaryweapon dude,Primaryweapon dude]) select 0<span id='postcolor'><span id='postcolor'>

Doesn't look like it is very painful to add that line for a mission designer. confused.gif NOrmally people ask for features when the workaround is difficult or impossible. wink.gif

But of course it would be logical to have a proper command for it... smile.gif

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (bn880 @ Dec. 11 2002,17:06)</td></tr><tr><td id="QUOTE">Doesn't look like it is very painful to add that line for a mission designer. confused.gif NOrmally people ask for features when the workaround is difficult or impossible. wink.gif

But of course it would be logical to have a proper command for it... smile.gif<span id='postcolor'>

Actually I has just thought of the workaround, and tested it 5 minutes before I posted it. tounge.gif I probably should have thought of it before, but still - having the command wouldnt hurt.

Share this post


Link to post
Share on other sites

I'd like a continuation of the create commands. We've got createvehicle and createunit now I'd like a createobject command or for more objects to be supported by createvehicle. I'd like to see a way to place trees, bushes, and walls without resorting to an addon.

thanks,

Plaz

Share this post


Link to post
Share on other sites

I'd love to see the following commands:

MagazinesInCargo <ammo-crate>

WeaponsInCargo <truck>

WeaponsInCargo <Weaponholder>

...

or has anybody found a workaround to get information about weapons/ammo in Cargo?

I'll even tried the weaponpool, but this only seem to work in campains confused.gif

Share this post


Link to post
Share on other sites

Another lovely thing would be ingame-dialogs, by this I mean dialogs which don't disable the movement keys. They are espescially useful to display information, which are permanent on the screen, but can be changed like Aktive Text through scripts.

Share this post


Link to post
Share on other sites

I would like to see something like "disableUnit" and "enableUnit". Disabling an unit disable everything related to it (make it disappear, disable all AI code, etc.) and enabling it would bring it back to life.

This would make it alot easier to make huge battles that wouldnt run 1fps, creating units with createUnit is very rather slow and alot of work. Instead, I could just put all the units, waypoints, etc. in the mission editor and put "disableUnit this" in the initlines of those which are very far away from players. Then, put a trigger around the area, which would enable the units when the player is nearby.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">This would make it alot easier to make huge battles that wouldnt run 1fps, creating units with createUnit is very rather slow and alot of work<span id='postcolor'>

This not solve the loading problem, try to put 1000 units on a map and look at the loading time.

But the idea is good, or do the "asleep" in the editor so the unit or group is not load...

We need something like that, it's sure.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Another lovely thing would be ingame-dialogs<span id='postcolor'>

How know where you are in the game or the dialog? With the mouse position, but the mouse command direction of the dude..

Or a control or alt key, when you press it you are in the dialog, else in the game, possible and not a lot of scripting (for us biggrin.gif )

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  

×