Jump to content

weasello

Member
  • Content Count

    9
  • Joined

  • Last visited

  • Medals

Posts posted by weasello


  1. // Define the distance
    _dist = 1000;
    // Get a random direction
    _dir = random 359;
    
    // Move the person _DIST meters away from the destination (in the direction of _dir)
    unit_name_here SetPos [(getMarkerPos "spawnCenter" select 0)-_dist*sin(_dir),(getMarkerPos "spawnCenter" select 1)-_dist*cos(_dir)];
    

    That should do the trick. :) Requires a marker named "spawnCenter" obviously.


  2. It looks like directSay doesn't "say" what you put in quotes.

    unit_name directSay "testing";

    will actually play the pre-defined message labelled "testing" - it won't say the word "testing." That's if I'm reading the comref docs correctly:

    Sends the message to the direct channel. The message is defined in the description.ext file or radio protocol.

    so my question is - how do you define the message in description.ext?


  3. Here's a really simple one I whipped up, based off of the EVO-style teleport-from-flagpole:

    // Written by Weasel [PXS] - andy@andymoore.ca

    // Teleports a person to the marker "teleportDestination". You can place this marker anywhere on the map.

    // The marker can also be moved (see associated script: Teleport To Vehicle Location).

    //

    // To use: Add this script as an action on an item. EG:

    //

    // this addAction ["Teleport","teleport.sqf"]

    // Get a random direction

    _dir = random 359;

    // Move the person 15 meters away from the destination (in the direction of _dir)

    player SetPos [(getMarkerPos "teleportDestination" select 0)-15*sin(_dir),(getMarkerPos "teleportDestination" select 1)-15*cos(_dir)];

    exit;


  4. Pieced this together from a few different places. :)

    // Written by Weasel [PXS] - andy@andymoore.ca

    // This script rearms, refuels, and repairs vehicles.

    // Vehicles must be less than height 2 (typically landed, if air vehicles) and must remain in the

    // trigger area for 3 seconds. It then drains all fuel, repairs, rearms, and refuels.

    //

    // Setup a trigger area to activate this (F3 in map editor) with the following settings:

    //

    // Trigger REPEATEDLY, BLUFOR, PRESENT

    // Name: Rearmlist

    // Condition: this;

    // Activation: {[_x] execVM "rearm.sqf"} foreach thislist;

    //

    // Warning: If this trigger area overlaps another trigger area (such as ammo-transport Scripts), sometimes

    // things don't work as planned. Keep this seperate if you can.

    _unit = _this select 0;

    // Don't start the script until the unit is below a height of 2, and make sure they hold that

    // height for at least 3 seconds.

    WaitUntil{(getPos _unit select 2)<2};

    sleep 3;

    if((getPos _unit select 2)>2 || not (_unit in list Rearmlist)) exitWith{};

    _unit setFuel 0;

    _unit VehicleChat "Repairing...";

    sleep 15;

    _unit setDammage 0;

    _unit VehicleChat "Rearming...";

    sleep 10;

    _unit setVehicleAmmo 1;

    _unit VehicleChat "Refueling...";

    sleep 5;

    _unit setFuel 1;

    _unit VehicleChat "Finished.";

    if(true) exitWith{};


  5. Hey everyone!

    This is my first mission - 5th (and hopefully final) revision. My squad (Phoenix Soldiers, PXS) has been helping me test it out for balance.

    I recommend a team of talented and strategically-minded individuals for this one - it's TOUGH!

    A quick rundown/explanation:

    - A simple extraction mission "goes bad" with an unfolding story

    - Lots of action for heli pilots, infantry, and vehicles

    - Approximate playtime 1 to 2 hours

    - Blackhawk can hoist vehicles

    - Huey can load ammo on the ship and unload it in the field (ammo supply loading is on the rear aircraft lift)

    - Middle aircraft lift is used for refuel and rearming

    - Weather starts off bad but clears up after 30 mins

    - Recommend no-AI and no-respawn, play on veteran mode for realism. :)

    Once you get in-mission check the tasks for more instructions and plot.

    Feel free to unpack the PBO and see how I did things or borrow ideas. I learned a lot of the scripting from the forums!

    Download: http://www.andymoore.ca/arma2/utesraid.zip

    feedback welcome!


  6. Can someone tell me what I'm doing wrong here?

    I have a similar setup - a satphone trying to put onto a table. Table is called "table1", satphone is called "satphone1". Code in satphone's init:

    satphone1 attachTo [table1,[0,0,1]];

    I also tried putting "this" in place of satphone1 but nothing is working. The satphone just sits on the ground as per normal. :/

×