Page 1 of 6 12345 ... LastLast
Results 1 to 10 of 54

  Click here to go to the first Developer post in this thread.  

Thread: Scripting command request

  1. #1
    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&#58;
    vehicle&#58; Object
    Compatibility&#58;
    Version 1.?? required.
    Type of returned value&#58;
    String
    Description&#58;
    Returns name of vehicle&#39;s tertiary weapon &#40;empty string if none&#41;.

    Example&#58;
    tertiaryWeapon player[/QUOTE]<span id='postcolor'>

    Thanks&#33;
    "Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

  2. #2
    </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 [/QUOTE]<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&#39;s the one major thing missing.



    Any sufficiently advanced bug is indistinguishable from a feature.

  3. #3
    what we REALLY need is to be able to name a unit which has been created by createUnit and that it doesn&#39;t need a group:

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

  4. #4
    </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&#39;s the one major thing missing.[/QUOTE]<span id='postcolor'>
    Seconded.

    Prospero.

  5. #5
    </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&#39;s the one major thing missing.[/QUOTE]<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

  6. #6
    </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&#39;t need a group:

    _bob = "soldierWMedic" createUnit [(getMarkerPos "spawn")][/QUOTE]<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">&#34;SoldierWB&#34; createUnit &#91;getMarkerPos marker1, groupAlpha, &#34;bob=this&#34;&#93;[/QUOTE]<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&#39;s say dummyEast.
    When I create a unit, I put it in dummyEast&#39;s group, then immediatly remove dummyEast from the group (dummyEast join grpNull)
    It&#39;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&#39;
    Whisper.
    OFrP member : http://ofrp.free.fr

  7. #7
    Prospero <--------------- punk.

  8. #8
    For the answer, see :
    http://www.flashpoint1985.com/cgi-bin....t=24809



    Someone gave the answer before me

    I stop hijacking NOW



    Whis&#39;

  9. #9
    </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&#58;
    *** ***vehicle&#58; Object
    Compatibility&#58;
    *** ***Version 1.?? required.
    Type of returned value&#58;
    *** ***String
    Description&#58;
    *** ***Returns name of vehicle&#39;s tertiary weapon &#40;empty string if none&#41;.

    Example&#58;
    *** ***tertiaryWeapon player[/QUOTE]<span id='postcolor'>

    Thanks&#33;[/QUOTE]<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.

    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&#39;s behaviour is automatically set in "AWARE" mode. That&#39;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&#39;t care about this fact , 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

  10. #10
    Master Gunnery Sergeant
    Join Date
    Jul 8 2001
    Location
    USA
    Posts
    1,134
    Author of the Thread
    </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.

    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&#39;s behaviour is automatically set in "AWARE" mode. That&#39;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&#39;t care about this fact , 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[/QUOTE]<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 = &#40;weapons dude - &#91;Secondaryweapon dude,Primaryweapon dude&#93;&#41; select 0[/QUOTE]<span id='postcolor'>

Page 1 of 6 12345 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •