Jump to content

Ghost

Member
  • Content Count

    668
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by Ghost


  1. a snippet from my group respawn. _spawn comes from a marker on map

    _spawn = getmarkerpos _marker;
    _wp1 = getmarkerpos _markwp1;
    _eGrp = createGroup EAST;
    _ldr = _egrp createUnit ["RU_Soldier_SL",_spawn, [], 0, "NONE"];
    [_ldr] join grpNull;
    _grpname = group _ldr;
    _man = _grpname createUnit ["USMC_Soldier",_spawn, [], 0, "NONE"];
    [_man] join _grpname;
    
    sleep 5;
    
    _grpname addwaypoint [_wp1, _rad1];
    [_grpname, 1] setWPPos _wp1;
    [_grpname, 1] setWaypointType _wptype;

    works really well. and testing on dedi


  2. Thanks ghost I used that as a reference and came up with this... though it says "Missing )"

    if (alpha_clear=false) then {player sideChat "Not clear"} else {player sideChat "All Clear"};

    I then put it in an .SQF file called "secure.sqf" and in the trigger activation did [] exec "secure.sqf"

    and still it doesnt work. it never shows anything in player side chat.

    That looks fine but I like to put ; after each statment i.e.

    player sidechat "not clear";

    I believe its needed but you would have to double check that.


  3. not able to check atm but try

    _pUnit = _this select 0;
    
    removeAllWeapons _pUnit;
    
    switch (typeof _punit) do {
    case USMC_Soldier_AA : {
    _pUnit addWeapon "M4A1_AIM_SD_camo"; 
    _pUnit addMagazine "30Rnd_556x45_StanagSD";
    };
    case USMC_Soldier_Medic : {
    _pUnit addWeapon "M4A1_HWS_GL_SD_Camo"; 
    _pUnit addMagazine "30Rnd_556x45_StanagSD";
    };
    };


  4. I'm not sure you understand how mission parameters work. He had

    valuesParam1[] = {1,2,3,4};

    Which means param1 would be equal to one of these values depending on what was selected. So if he selected "Dusk", param1 would be equal to 3. If he then did skipTime 3, it would only skip 3 hours instead of the 18.4 he wants.

    Your example would be fine IF Garbol87 had this:

    valuesParam1[] = {6.2,12,18.4,0};

    OR, what he had to begin with was perfectly correct. His error appears to be because he used sqs syntax in an sqf file. If he just changes init.sqf to init.sqs it should work perfectly.

    I do know how they work, I just am not good at explaining myself sometimes. Defining what param1 is over again is not needed. As you said he just needs to put the hour in. What I do is make the mission at 1200ish to make it easy and for testing i can see without nvgs. Then I would do as follows

    titleParam1 = "Time of Day:"; 
    valuesParam1[] = {-6,0,7,12};
    defValueParam1 = 0; 
    textsParam1[] = {"Morning","Midday","Evening","Night"};

    in a trigger i have

    skiptime param1;

    that will then set my time from 1200 to either 0600,1200,1900,2400


  5. Why? Param1 is given the value as defined in valuesParam1. SkipTime param1 would be skipTime 1, which would only skip by an hour. There's nothing obviously wrong that I can see with his init.sqs, but it is easier just to do this:

    Description.EXT
    
    titleParam1 = "DAYTIME";
    valuesParam1[] = {6.2,12,18.4,0};
    defValueParam1 = 6.2;
    textsParam1[] = {"Dawn", "Midday", "Dusk", "Night"};
    
    Init.sqf
    
    skipTime param1;
    

    As for the crash, it would seem that your init.sqs is actualyl an init.sqf, and that you are using sqs snytax in an sqf file. I've corrected it above.

    You misunderstood, Garbol had

    ?(param1==1):skiptime 6.2
    ?(param1==2):skiptime 12
    ?(param1==3):skiptime 18.4
    ?(param1==4):skiptime 0

    which is not what he needed, he defined param1 fine but to execute skiptime all he needed was

    skiptime param1;


  6. Ok that helped me a lot, now its almost working

    but i encounter next problem, when img is loading to display in brief message coming up that "cannot load mipmaps..."

    what options did you set in paa plugin to have it working, i tried with mipmaps/no mipmaps-still error, change img res-still nothin, dxt5/auto-same error...:confused:

    I just used ArmA tools Text View 2. Seemed to work for me.


  7. think of the description.ext as settings. Do not launch scripts from it. init.sqf is initialized at mission start. you could put it in the init.sqf, units initline a trigger onactivation really anywhere. Note if players JIP the init is accessed each time and may change the time. I personally because of laziness put it in a trigger set to once condition true with 1 for min, mid, max and on activation skiptime (param1);


  8. So I want to set the option in the MP coop mission so that the players will be able to set time of day.

    Description.EXT

    titleParam1 = "DAYTIME";

    valuesParam1[] = {1,2,3,4};

    defValueParam1 = 1;

    textsParam1[] = {"Dawn", "Midday", "Dusk", "Night"};

    Init.sqs

    ?(param1==1):skiptime 6.2

    ?(param1==2):skiptime 12

    ?(param1==3):skiptime 18.4

    ?(param1==4):skiptime 0

    When I choose an option it always crashes the whole game :/

    here is the message:

    "Preprocessor failed on file mpmissions\_cur_mp.Chernarus\init.sqf - error 7."

    please help :(

    to use the variable skiptime you do the following

    skiptime param1;

×