Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

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

Thread: V1.85 scripting reference

  1.   Click here to go to the next Developer post in this thread.   #11

    Unhappy

    Gameer maybe you are right, actually I never used rating before... all the 2 years of OFP and no rating.

    Anyway, if anyone knows for sure what friendly and enemy are used for, let us know. (probably simple)

    The eventHandler question I should not have asked that way, let me ask one of the developers like Suma: If I install an eventHandler "hit" on (T72) and inside do </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">?&#33;&#40;canMove _vehicle&#41;&#58;_vehicle removeAllEventHandlers &#34;getIn&#34;;_vehicle removeAllEventHandlers &#34;Hit&#34;;&#91;_vehType&#93; exec &#34;removeEastUnit.sqs&#34;;hint format &#91;&#34;VEHICLE DESTROYED&#92;nvehicle %1&#92;noffender %2&#92;namount %3&#34;,_vehicle,_by,_amount&#93;;[/QUOTE]<span id='postcolor'>

    Is there any chance of another "hit" event being triggered even if the vehicle can not move? I seem to have this problem, sometimes 2 hits are processed for the vehicle when the first hit already removes all Handlers.



    "Peace can not be kept by force. It can only be achieved by understanding." Albert Einstein

    Please report Arma 3 bugs in the Bug Tracker

  2.   Click here to go to the next Developer post in this thread.   #12
    I have answered my question and I am posting the answer in hope people searching for this months from now will use the damn SEARCH feature.

    To make sure your event Handler is removed promptly and not triggered again for handlers like "hit" or "dammaged" or multiple handlers on one vehicle use something like:

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_handler = format &#91;&#34;&#91;_this select 0,_this select 1,_this select 2, %1&#93; call loadFile &#34;&#34;eastVehicleDammaged.sqf&#34;&#34;&#34 ;, _tryUnit&#93;
    _newVehicle addEventHandler &#91;&#34;Dammaged&#34;, _handler&#93;[/QUOTE]<span id='postcolor'>

    for your handlers... what&#39;s different? use .sqf which is atomic and will prevent the event (any event) to be triggered again before you do removeHandler.

    It really works.

  3. #13
    I can NEVER get those comand references to download from the Flashpoint 1985 website.
    YOU must chop down the MIGHTIEST tree in the forest...WITH......a HERRING!!!

  4.   Click here to go to the next Developer post in this thread.   #14
    Über Verwalter Placebo's Avatar
    Join Date
    Jul 23 2001
    Location
    Visby, Gotland, Sweden
    Posts
    20,998
    I&#39;ve mirrored it on OFPN here, try that
    If someone reports an issue/complains about the Alpha etc, replying in the thread "dude it's an alpha" doesn't really help anyone! Point them to the Arma3 Alpha feedback tracker instead please!

    Please do not PM or Email me directly about your CD Key issues, follow the guidance in this thread instead.

  5. #15
    Is it necessary to remove event handlers on objects that are no longer needed (they are dead)??

    What if I added a "killed" event to each player as they respawn. ***A game might have people spawning in maybe 500 times. ***Will this cause problems?

    If I delete an object does that remove it&#39;s event handler?? ***Or is the event still checked on some table?

    As long as whomever is reading this, I am still wondering, even though I&#39;ve seen discussions about this, which is "fastest", which is the CPU hog:
    Trigger or
    @
    I assume @ is faster than Trigger and Trigger is about equal to a loop like
    #loop
    ~0.01
    goto "loop"
    ?? ***And @ is probably a loop with ~0.0001??

    And what if I have a script that calls out other scripts that go into loops themselves (I see this as like running threads). ***How crazy can we get with doing this??? ***What if I have something firing bullets & each bullet is running its own little script in a loop....I mean, how crazy can we get here?

    Doolittle

    Ranger School - Make your own mission in game! Full MP support (Old ver)
    DooACS - Arma2 anti-cheat to protect your server, feared by cheaters

  6. #16
    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (placebo @ Oct. 21 2002,00:03)</td></tr><tr><td id="QUOTE">I&#39;ve mirrored it on OFPN here, try that [/QUOTE]<span id='postcolor'>
    Thanks, that worked....I wonder why I can never download it from "Flashpoint 1985"...I have at one time or another, tried to download all of the different versions, and it NEVER worked.

    I actually resorted to viewing the "online reference"...and printing the whole thing from there ....that took quite a while

  7. #17

    Unhappy

    Hi all,

    I&#39;m not the best when it comes to scripting, so I&#39;d like to ask the following question.

    Can you add a new event to the event Handler, and if so how?

    DragoFire
    Just another tragic case of terminal kinetic energy poisoning&#33;

    It&#39;s hard to please everyone, but easy to upset everyone&#33;

  8. #18
    Quote Originally Posted by (Doolittle @ Nov. 24 2002,00:26)
    How crazy can we get with doing this??? ***What if I have something firing bullets & each bullet is running its own little script in a loop....I mean, how crazy can we get here?
    I don&#39;t get your point...
    That&#39;s quite a normal thing to do - happens all the time.
    What&#39;s wrong with that?

  9.   This is the last Developer post in this thread.   #19
    Über Verwalter Placebo's Avatar
    Join Date
    Jul 23 2001
    Location
    Visby, Gotland, Sweden
    Posts
    20,998
    I appreciate this topic is pinned but there seemed no real point to reply to that post from nearly 3 years ago?

  10. #20
    Staff Sergeant
    Join Date
    Jan 9 2002
    Location
    Poland - Bytom
    Posts
    363
    I have an interesting reply

    LINK IS OFFLINE &#33;&#33;&#33;&#33;&#33;&#33;&#33;&#33;&#33;&#33; &#33;&#33;&#33;&#33;&#33;&#33;&#33;&#33;&#33;&#33; &#33;&#33;&#33;&#33;&#33;&#33;&#33;
    \"We hope you enjoyed FFUR\" --&#62; I did &#33;

Page 2 of 3 FirstFirst 123 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
  •