Jump to content

Amazed

Member
  • Content Count

    17
  • Joined

  • Last visited

  • Medals

Posts posted by Amazed


  1. Hi!

    I am trying to avoid race conditions in a mp scenario by assigning each client a separate publicVariable it can broadcast to. I know you can have dynamic identifier names for variables like so:

    _MyVariable = 20;
    _MyVariableContent = "MyContent";
    call compile format["MyDynamic_%1=_MyVariableContent",_MyVariable];
    

    source: http://tactical.nekromantix.com/wiki/doku.php?id=arma:scripting#dynamic_variables

    What I came up with so far is this:

    _varIndex = 1;  
    _varContent = "blabla";
    publicVariable "" + format ["dynPubVar_%1=_varContent", _varIndex];
    

    Sadly this seems to be not working. Any ideas?


  2. Yup red barrel works.

    init barrel:

    this addEventHandler ["HandleDamage", {_this execVM "hint.sqf"}];
    

    hint.sqf:

    hint "damage";
    sleep 2;
    hint "";
    _this setDamage 0;
    

    But execution halts after I use "_this".

    So the same script written like this only works up the the "_this":

    hint "damage";
    _this setDamage 0;
    sleep 2;
    hint "";
    

    Why is that?

    Oh also what is the smallest object you know that has a hit model? :)


  3. Hm that changes the game.

    Well do you know of any objects that are exactly 1m tall and present one continuous area at that side?

    And while we are at it how can I make any object receive damage and test for it? For example every time I hit an object I want a hint to be triggered.

    What I tried:

    Init field of object:

    this addEventHandler ["Hit", {_this execVM "hint.sqf"}];
    

    hint.sqf:

    hint "damage";
    

    Seem to only work with pop-up targets.


  4. Hey!

    I am looking for a way to determine the dimensions of arbitrary objects (in meters).

    The script commands apparently only retrieve the position of objects relative to the map.

    Does anybody know how?

    Alternatively a list with all object dimensions would do the trick just as well. When push comes to shove I would content myself with a 1m tall object. :)

    Thanks in advance!

×