Jump to content

z1_

Member
  • Content Count

    29
  • Joined

  • Last visited

  • Medals

Posts posted by z1_


  1. 2 minutes ago, gc8 said:

     

    are you sure this variable is working?

    That I'm not 100% sure about.  I get lost on the variables when i go between local and global. 

    Triggers condition is this and its set anyplayer/present/repeatable with  this exec "zciv.sqf";  in its init

    Is the this condition in the trigger referring to the player or the trigger? Do I need to call it differently?

    I'm hoping to not have to give the trigger a variable name so I can put it on any trigger, but like i said, I don't know much.


  2. UPDATE: So I gave up on that for now, and am trying to wrap my head around adding a single civ module, waypoint, and spawn, and sync the trigger in editor to the civ module that the script spawns.  The code below runs without error, but nothing actually happens.  Sure I'm missing something.  Most my knowledge on Arma scripting is very fragmented, could use some help.  Just spawning them all in the same spot atm until I get it working.  This is mostly for my understanding, there's a million civ scripts out there.  I'm sure I could pull it off with actual units a lot easier, but I'd like to understand how to get these modules spawned, synced, and running correctly via script.

     

    running it on the trigger activation as

    this exec "zciv.sqf";

     

    _group = createGroup sideLogic;
    _item0 = createUnit ["ModuleCivilianPresence_F",[0,0,0],[],0,"CAN_COLLIDE"];
    _item0 = group _group
    _item0 synchronizeObjectsAdd [this];
    _item0 setPosWorld getPosWorld this;
    _item0 setVectorDirAndUp [[0,0,0],[0,0,0]];
    _item0 setVariable ["objectArea",[100,100,0,true,-1]];
    _item0 setVariable ["#onCreated",compile true];
    _item0 setVariable ["#onDeleted",compile true];
    _item0 setVariable ["#unitCount",5];
    _item0 setVariable ["#usePanicMode",false];
    _item0 setVariable ["#useAgents",true];
    _item0 setVariable ["#debug",true];
    _item0 setvariable ["BIS_fnc_initModules_disableAutoActivation",false];
    _item0 setvariable ["BIS_fnc_initModules_activate",true];
    
    _item1 = createUnit ["ModuleCivilianPresenceSafeSpot_F",[0,0,0],[],0,"CAN_COLLIDE"];
    _item1 = group _group
    _item1 setPosWorld getPosWorld this;
    _item1 setVectorDirAndUp [[0,0,0],[0,0,0]];
    _item1 setVariable ["objectArea",[0.1,0.1,0,false,-1]];
    _item1 setVariable ["#type",1];
    _item1 setVariable ["#capacity",3];
    _item1 setVariable ["#useBuilding",true];
    _item1 setVariable ["#terminal",false];
    _item1 setvariable ["BIS_fnc_initModules_disableAutoActivation",false];
    _item1 setvariable ["BIS_fnc_initModules_activate",true];
    
    _item2 = createUnit ["ModuleCivilianPresenceUnit_F",[0,0,0],[],0,"CAN_COLLIDE"];
    _item2 = group _group
    _item2 setPosWorld getPosWorld this;
    _item2 setVectorDirAndUp [[0,0,0],[0,0,0]];
    _item2 setVariable ["objectArea",[0.1,0.1,0,false,-1]];
    _item2 setvariable ["BIS_fnc_initModules_disableAutoActivation",false];
    _item2 setvariable ["BIS_fnc_initModules_activate",true];

     


  3. So, I set up a bunch of modules, waypoints, and triggers for the Civilian Presence Module all over the map.  Everything works great in editor.  I wanted to try exporting it to sqf so I could use as a script and not have all the clutter for use in future missions.  It somewhat worked, as everything will load off the script but all the areas become active and spawn as soon as it loads even though nobody set off the trigger.  This only happens if I use script, works fine loaded from editor.  They are all set to any player - present - repeatable and synced to their respective module.  Is there a way to edit the sqf export so it will work correctly and only activate triggers when actually present.  There things I could remove?  If you want to know what I’m looking at set  (at work currently) up the civilian presence mod for one city real quick and do an export.  I know I could just merge with missions but I’d like it to not be cluttered if someone decides to edit the missions I upload.  Any help would be appreciated, I’m not too savvy on scripting but have a general understanding.  I know there’s other options, just want to see if I can get this to work.

×