Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Posts posted by Doodle

  1. Just came here about to post almost the same question.

    I have a script for a player (s3) to spawn a static weapon

    _mg1b = createVehicle ["B_HMG_01_high_F", getPos s3, [],1,"NONE"];

    _mg1b setDir 180;

    works fine but I would like to static to spawn in the direction the player (s3) is facing rather than the setDir. I tried removing the setDir but then anything spawned will always face north.

    Thanks in advance

  2. @ Kabs -

    Pretty sure the texture issue is not the script - have a look round for an answer as I have seen other people with this issue on servers - I think there might be a setObjectTextureglobal - Do let us know here if you do find a solutiuon for the textures on a server as its something I would be intrested in knowing,

    @King Richard

    Script working perfectly - Just a thought I notice the addactions are available when you are in the drivers / passenger seat. Might be a nice option to choose whether acctions are available when you are in the vehicle or you HAVE to be outside of the vehicle.

  3. I am using the following to move an object to a vehicle marker

    box1 setPos (getMarkerPos "car_marker");

    this works fine BUT will place the box in the middle of the vehicle. - Anyone help how I could move it to "just off center of maker"

    I know I can use the below if I want to move the box to the side of the vehicle

    box1 setpos (car modelToWorld [4,2,0]);

    but for mission it needs to be a marker

    is there something that can do similar but for a marker rather than object

    thanks in advance

  4. Glad to hear you got it working -

    I am no script wizzard and you may want to double check with someone who knows more but I am pretty sure that the change I made above is correct - and I notice your script still has the _veh - I am not saying that this will solve your problem but on our version that has been working perfectly on aour dedi for a couple of weeks we have _MHQ

    MHQ_vehAction1 =


    _this addAction

    ["Prepare truck for weapon","support\scripts\truck_initv2.sqf",

    nil, 1, false, true, "",

    "alive _this && {speed _this == 0}"];

    publicVariable "MHQ_vehAction1";


  5. @ KingRichard - All working fine on our dedi, I did notice the couple of typos and amended that at this end. Really like the script! - Though now I see an option for multiple vehicles it's got me thinking.

    @Kabs - cant help with the scripts running after the vehicle has respawned as we dont use that option. A couple of things in your code I "THINK" might be wrong are

    Change youe respawn time to at least 20 sec - 1 sec might be too short as the vehicle may just keep respawning and the getting destroyed as the od wreck has not had time to delete.

    Also I think that the below code should be

    MHQ_vehAction1 =


    _this addAction

    ["Prepare truck for weapon","support\scripts\truck_initv2.sqf",

    nil, 1, false, true, "",

    "alive _this && {speed _this == 0}"];

    publicVariable "VEH_vehAction1";


    IN RED

    MHQ_vehAction1 =


    _this addAction

    ["Prepare truck for weapon","support\scripts\truck_initv2.sqf",

    nil, 1, false, true, "",

    "alive _this && {speed _this == 0}"];

    publicVariable "MHQ_vehAction1";


    You dont need to name the vehicle in the script only name the vehilce in the editor - in the vehicles NAME field.

    Sorry I can tbe of more help

  6. Just tried this on dedi

    Currently trigger COND is this

    Everything works perfectly. Items spawned - messages broadcast across network

    If I change the COND to vehicle player == s5 then nothing happens at all.

    Surely the script is dedi server friendly already as it works when the trigger is not limited to a specific player?

    Thanks (confused) in advance.

  7. try this.

    edit- didn't notice the part about helo landing and setting trigger. so better to just check side of vehicle.

    // check if vehicle is a less then 10 meters from ground and EAST side faction - just change faction to whatever you need.
    {if (side _x == East && (getPosATL  (vehicle _x) select 2) < 10) then {  --your code here--  }} foreach (list base);

    fyi - I got into the habbit of naming my triggers so the example above has a trigger name of "base" hence the "list base" at the end.

    Thanks for this - not quite following in the ---your code here--- bit. Is this a list of vehicles that I want to activate the trigger ca1 car2 etc?

    the vehicles that will be in the list are all "empty" editor placed vehicles - doesnt that make them "no side" so cant check for WEST?

    the route would be -

    helo13 flown by human players will lift damaged car2 and drop it on repair pad activates repair script. Then after a set time helo can pick up repaired empty vehicle

    The only way to get the vehicle to repair pad is by helo list

  8. Wonder if anyone can help -

    I have an editor placed trigger that I need to activate only if any of an editable array of vehicles enters it - eg car1 or tank5 or helo13 etc and also only when the vehicle touches the ground The idea being the damaged car1 gets dropped on repair pad by helo13 but I dont want helo 13 to set off the trigger when it is hovering above the repair pad dropping off car1. but if helo13 LANDS on the pad then it would trigger it,

    I think it might be something like "car1 in thislist OR tank5 in thislist" to count the vehilcles but not sure about the height check - I did see there was a new ARMA 3 command "touchingtheground" might be good

    thanks in advance

  9. OK Guys

    Firstly thankyou for all the assistance at last we got there and now everyone can see the messages and I learnt a lot along the way - though some things I just cant get my head round I knew that it was locallity but for the life of me couldnt work it out.

    - of course as soon as one thing works then I discover something else that would be nice to change but not essential

    I do have another queery - not that its a major issue but I would like to know

    I have several radio triggers placed in the editor that anyone can access.

    So for example in the above player S5 can deploy a mortor by pressing 0 0 5 Radio Echo but also if player s3 activates the trigger it will deploy a mortor at S5's position

    I am guessing it is because triggers placed in editor are global? - If I limit the trigger condition to "isplayer and ==s5" so ONLY s5 can activate the trigger then we get no message and nothing spawned.

    does adding the "isplayer and ==s5" make the trigger local? its no big deal but it would be nice to limit the radio channels 1 per player

    player s1 - Radio Alpha

    player s2 - Radio Bravo

    etc etc

    Like I said no big deal but would be nice

    Thanks in advance

  10. the function part (your message stuff) would have to go somewhere where every player would get it, so putting that in init.sqf would be safe bet.

    then you could just put the BIS_fnc_MP line directly into the script that is called when addaction is activated. I use it all the time like that since addactions are only local effect.

    using your original post as example

    //nul = execVM "spawn_mortor1.sqf"; 
    //Spawn Mortor 
    playsound "drill"; 
    // execute message to all clients
    [[],"sendMessage",true,false] call BIS_fnc_MP;
    if (!isServer) exitWith {};  
    _mortor2tuf = "Chemlight_green" createVehicle (position s5); 
    _mortor2tuf setDir 0; 
    sleep 1.0; 
    _mortor2tufe = createVehicle ["SmokeShellGreen", getPos s5, [],1,"NONE"]; 
    _mortor2tufe setDir 0; 
    sleep 1.0; 
    _mortor2tuff = "B_Mortar_01_F" createVehicle (position s5); 
    _mortor2tuff setDir 180; 
    sleep 1.0; 
    if (true) exitWith {};  

    and in your init.sqf

    // function to display message
    sendMessage = 
       _startuf = "<img size='4' image='icons\mortor1.paa' align='left'/><br/>";     
       _titletuf = "<t color='#FFFFFF' size='1.2' align='left'><br/>Mortor Support.</t><br/>"; 
       _texttuf = "<t color='#58FA58' size='1.0' align='left'>A member of your sqaud is deploying a Mortor.<br/><br/>It is marked with green smoke and chemlight.</t><br/><br/>";
       hintSilent parseText (_startuf + _titletuf + _texttuf);

    Still no joy exactly with any of these - the above version on dedi displays messag ok but does not spawn items - any idea?

    thanks in advance

  11. ok guys can report back that it all works perfectly.

    There is one slight change that would be nice but not essential.

    I have placed a vehicle named mcv in editor that is locked. When it respawns it respawns "unlocked" and chance of making the script remember the locked state of the vehicle.

    would adding mcv lock true to either my init or placed in a game logic in editor keep the vehicle locked when it respawned and when someone jip'd?

    thanks in dvance

  12. @ Grimes

    Still no messages on dedi with the latest code from above.

    You mention in previous post "If this doesn't work just remove the isServer bit all together, and have all machines define the function and call it."

    Could you point me in right direction please does it become this? - I removed the (isServer) part.

    if then {

    pre_fnc_broadcastMsg = {

    _broadcastString = _this select 0;

    hint _broadcastString;



    "BroadcastMessage" addPublicVariableEventHandler {

    [_this select 1] call pre_fnc_broadcastMsg;


    Once again many thanks in advance.

    ---------- Post added at 11:47 AM ---------- Previous post was at 11:40 AM ----------


    Many thanks for this - the reason not going this route is I didnt know how.:o

    Will take a look at the above - would I have to add anything to my init to use the above?

    Thanks in advance

  13. this is whats in my init

    if (isServer) then {
    pre_fnc_broadcastMsg = {
     _broadcastString = _this select 0;
     hint _broadcastString;
    "BroadcastMessage" addPublicVariableEventHandler {
     [_this select 1] call pre_fnc_broadcastMsg;

    the only difference between the one above is semi colons slightly different, is this the change?


  14. @Grimes

    Think I might be about to spoil your day. Messages dont broadcast on our dedi. In fact there are no messages at all.

    Previously only the person who activated the script saw the message (wanted it so all see message) and items were spawned

    now no message at all - items do get spawned.

    Time to give up maybe,,

    Will take a look in other thread - thanks

  15. Once again thanks

    1. I only chucked the "hint" in there to see what happens.

    2 Yep I know exactly what the hint looks like as I have used it numerous times

    3 Up to date, on steam debug console enabled in editor and on dedi, files verified fine, and showscripterros enabled in startup

    Can i Just confirm when you load your demo mission into editor - hit preview and the scroll to HELLO you get no errors, you see the message and you are running with showscripterrors?

    Doing a complete reinstall - though my scripting abilities aint great I am sure there must be something not right with my ARMA - will report back.