Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Posts posted by jonipetteri

  1. Hello there!
    Like the topic says, I'm looking for a skilled scripter to do few small (I guess) scripts for me (and my small unit). Yes, this may sound stupid, but I'm simply running out of my free time at this point.


    So, if you are familiar with Arma editor, editing and scripting, do not hesitate to contact me.

    To be fair guy, I'm willing to pay for your efforts. Half when we have agreement and half when wanted results are done and tested.



  2. Hi guys!


    I've placed down a unit in the editor and gave it some move waypoints. Going to activate first with trigger.


    Is there a way to give, lets say five pre-defined locations for second waypoint and randomly choose one of those?


    Also, I'm going to add some playMoveNow code to that waypoint...




  3. 2 minutes ago, lexx said:


    I did, and you must do something wrong in your code.

    Like I said, sarogahtyps code works fine. I run it via Game Logic-module in the editor.


    I've attached cable1 to ied2 by writing cable1 init box this: ied2 attachTo [cable1, [0, 0, 0] ]; and this code is not working after I run sarogahtyps code.


  4. 8 hours ago, sarogahtyp said:



    private _max_range = 100;
    private _min_range = 10;
    private _rnd_range = _min_range + random (_max_range - _min_range);
    private _rnd_dir = random 360;
    private _desired_pos = ied1 getPos [_rnd_range, _rnd_dir];
    ied2 setPos _desired_pos;


    Okay, for some reason this code is messing up my attachTo setup.

    I've placed (in editor) IED, in this case ied1, and another IED, in this case ied2.

    I've also placed down third small object (in editor), HDMI-Cable, in this case cable1.

    I've attached cable1 to ied2 using attachTo command (to make it look a bit differend than normal), and wrote it in init box of the cable1.


    Now, the code above works just fine, but it somehow "removes" my attachTo command, and this cable1 will now stay in the same place where I put it it the editor.


    Any idea why?

    • Confused 2

  5. 1 hour ago, sarogahtyp said:

    no need to attach. attachTo is thought to mount an object on another. that's not what you want.

    your way is getPost (Alternative Syntax) and setPos:


    private _max_range = 100;
    private _min_range = 10;
    private _rnd_range = _min_range + random (_max_range - _min_range);
    private _rnd_dir = random 360;
    private _desired_pos = ied1 getPos [_rnd_range, _rnd_dir];
    ied2 setPos _desired_pos;


    Thanks sarogahtyp!


    I'll put that to test.


    Just curious, what about commands setPosATL and getPosATL? Are you familiar with those? What kind of cases that would be the way  to go?

  6. A little explanation what I want to happen:

    I've placed down an object in the editor, IED, lets call it ied1.

    I've placed down another object in the editor, IED, lets call it ied2.

    Added some empty markers and synced those to ied1 to get a bit randomness.

    And now, I want ied2 stay in certain distance from the ied1, wherever ied1 will spawn.

    If I use attachTo command, for example: "ied2 attachTo [ied1, [3, 9, 0] ];" , it works fine, but attached IED, ied2, won't stay on terrain level when terrain gets bumpy.


    So, is there a similiar command like attachTo, but attached object will take its place on the terrain level?



  7. Hello guys!


    I'm pretty confused about all the setPos's and getPos's commands... I've placed down an object1 via editor, and now I'm trying to attach object2 to it, so that object2is always on the ground level, wherever I place objectX.


    And if its possible, I'd like to be able to change x and y axis distances (like in attachTo).



    • Confused 1

  8. 2 hours ago, pierremgi said:


    _unit doesn't mean nothing in your trigger.

    It's a little bit weird to activate this kind of EH in a trigger.


    player addEventHandler ["HandleDamage", {

      params ["_unit", "_selection", "_damage"];

      _damage = if (_unit inArea theTriggerNameYouWant) then [{_damage * 0.5},{_damage}];


    Not a professional, so I might be weird. Now the trigger is activated when player is wearing certain vest.


    Do you think it would be better to do this (MP) via script?

  9. 18 hours ago, sarogahtyp said:

    not tested but should reduce the damage to the half:

    _unit addEventHandler ["HandleDamage", 
    params ["_unit", "_selection", "_damage"];
    (_damage * 0.5)


    Tested this in init of the trigger in the editor. Didn't work. Alltough didn't throw any errors... Can you help with this? Am I missing something?




    Any player


    On Activation: hint "Superhuman!"; _unit addEventHandler ["HandleDamage", {params ["_unit", "_selection", "_damage"];(_damage * 0.5)}];