Jump to content

jacmac

Member
  • Content Count

    173
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by jacmac

  1. jacmac

    Trigger Debacle

    I was able to work around the problem.
  2. With the latest update there is a little display at the beginning of a mission with the mission title, summary and graphic, but I can't figure out how it is set up. Are there instructions anywhere?
  3. The trigger here fails to be created; _trig always ends up as "<NULL-Object>", thus none of the code after the createTrigger does anything. What I was trying to do is dynamically detect the number of units within a trigger area with a trigger created in a fixed position. No matter what I did I kept getting 0. I finally created a test mission and put the loop in init.sqf ( with a sleep 10; in the beginning). I placed a group of friendly soldiers on the map next to me, and this script repeatedly fails to create a trigger. I don't understand what the problem is at all. sleep 10; while {true} do { _pos = getPos player; systemChat ("_pos: " + (str _pos)); _trig = createTrigger ["None", _pos]; _trig setTriggerArea [90,90,0,false]; _trig setTriggerActivation ["ANYBODY", "PRESENT", true]; systemChat ("_trig: " + (str _trig)); sleep 2; //waituntil {(count list _trig) > 0}; _tlist = list _trig; systemChat ("_tlist: " + (str _tlist)); _count = count _tlist; deleteVehicle _trig; systemChat ("count: " + (str _count)); };
  4. Weapon1 = "weaponHolder" createVehicle getpos some random position Weapon1 addWeaponCargo [_WeaponH,1]; Weapon1 addMagazineCargo blah blah blah "weaponHolder" createVehicle is the thing that is not obvious, everything else is.
  5. This returns a trigger (at least); the trigger is "somenumber: <no shape>" and the list count still comes out as 0. I assume the <no shape> is a problem? The problem I am trying to solve is dynamically detecting the number of units inside the trigger area. What I get from a static trigger is 1 no matter how many are in the trigger area. In other words, more units entering/exiting a static trigger did not result in the count dynamically growing/shrinking. This is the reason for creating, then deleting. I'm just trying to get the number of units in an area on a regular basis.
  6. jacmac

    Spawning enemy units

    The radius is set at 200, you might need to adjust it.
  7. jacmac

    Spawning enemy units

    Basically, you're going to have to watch for the exit. So from the position of the marker, find all BLUFOR within a radius and if there is none found, then then delete group 1. You would need a piece of code like: _BLUFOR_Count = 1; while { _BLUFOR_Count > 0 } do { _BLUFOR_Count = {_x isKindof "Man" and (side _x) == west} count (nearestObjects [(getMarkerPos "spawnmarker"), [], 200]); sleep 5; }; {deletevehicle _x} forEach (units _group1); deleteGroup _group1; This could be placed immediately after spawning the enemy group code you already have.
  8. jacmac

    Spawning enemy units

    Trigger act: blufor present on activation (getMarkerPos "spawnmarker") execVM "spawnUnits.sqf" if (!isServer) exitWith {}; _spawnPos = _this; _side = createCenter east; _group1= createGroup east; _group1= [_spawnPos , east, (configFile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfSquad")] call BIS_fnc_spawnGroup; [_group1,_spawnPos,200] call bis_fnc_taskPatrol;
  9. The problem with your solution is that you deleted the entire first dimension element when he only wanted to remove [8,8,8] from the second dimension.
  10. jacmac

    Spawning enemy units

    One of these might help you: Similar Threads Spawning enemy by distance By clydefrog in forum ARMA 2 & OA : MISSIONS - Editing & Scripting Replies: 18 Last Post: 08-13-2012, 04:57 PM Spawning enemy By Frosties in forum ARMA 2 & OA : MISSIONS - Editing & Scripting Replies: 6 Last Post: 04-12-2012, 11:13 AM Help spawning enemy group By Swoop in forum ARMA - MISSION EDITING & SCRIPTING Replies: 8 Last Post: 07-28-2007, 03:24 AM Spawning enemy AI By LtCmdrBoon in forum ARMA - MISSION EDITING & SCRIPTING Replies: 0 Last Post: 06-17-2007, 07:37 PM Enemy spawning script By Winters in forum OFP : MISSION EDITING & SCRIPTING Replies: 7 Last Post: 12-03-2003, 02:39 PM
  11. There are many editors with syntax highlighting available. I happen to use Ultraedit, but I believe Notepad++ has syntax highlighting definitions available. There are dedicated Arma editors and tools made by the community, although I don't think there is anything that is out for Arma 3 specifically.
  12. Check out the structured text control in my Generic Vehicle Service script: http://forums.bistudio.com/showthread.php?151507-Generic-Vehicle-Service The files to look at are simple_text_control.sqf, stc_include.hpp, control_include.hpp, and colors_include.hpp. I've been working towards releasing a set of scripts to make it easier to incorporate structured text displays, they are a quite confusing animal to wrap your head around at first glance. These are non-interactive, simply meant to display information without interrupting the player. I got them to work and I'm still not totally sure how they work yet.
  13. Does: systemChat (str ([[_myarray select 2] select 2] select 2); display 8?
  14. Use this tool: http://browser.six-projects.net/cfg_groups/East/config?version=67 It will take you a little while to figure out the relationships between the class names and "configFiles", but this is a good way to learn.
  15. jacmac

    Random Side Mission time

    ExecVM a script with this in init.sqf? if (! isServer) exitWith{}; _sleepTimeMax = 2000; _sleepTimeMin = 1000; while { true } do { waitUntil {Global_Side_Mission == 0}; sleep ((floor random _sleepTimeMax) + _sleepTimeMin); Global_Side_Mission = 1; }; Then have your side mission sqf do the reverse: if (! isServer) exitWith{}; while { true } do { waitUntil {Global_Side_Mission == 1}; ....execute side mission code... waitUntil {Global_Side_Mission == 0}; }; Somewhere, when the side mission is complete, set Global_Side_Mission back to 0.
  16. I've put landing pads down, so they definitely exist. However, I didn't know they were required to get a helicopter to land in script.
  17. Man that's pretty vague, but psuedo code, here's what you need to learn: Get Position of the Trigger or a marker or put in an absolute position and pass it as a parameter to a sqf that will spawn the group in the trigger's On Act (on activation). Create an SQF that does something like this (where _this = the position to spawn the group): _enemyGroup = createGroup east; _enemyGroup = [_this, east, (configFile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfSquad")] call BIS_fnc_spawnGroup; This is an example of spawning an enemy infantry group. If you want some other kind of group, learn how to navigate the configFiles and look at BIS_fnc_spawnGroup. These enemies aren't going to do anything except spawn with default parameters. Read the wiki and look at other people missions to learn what to do with the group if you want them to move somewhere or whatever.
  18. if (! isServer) exitWith {}; Put at the top of your mission.sqf, otherwise every one of the MP clients that connects will execute the code. If there was code in mission.sqf that clients should execute, I would recommend that you take it out of mission.sqf and put it in it's own file like mission_client.sqf and rename mission.sqf to mission_server.sqf. Then it will be really clear which code is for what.
  19. Documentation is updated and a test mission is in the download. There was a key piece of information left out - you have to add some lines to description.ext.
  20. Just so I understand, you are saying that the markers and triggers get created and show up immediately after the script starts and while the delay messages are showing up? If so, I can not imagine what is causing that. Could you zip up your mission and post it? I would like to understand how it could be happening.
  21. I suspect that your trigger might have a problem. Anyway, I'll create a demo mission and post it, which should clear things up.
  22. I'll make a demo mission, verify that it works, and update this post with the mission and any changed files. I don't think Dev .52 is a problem, but I'm not 100% positive of that. ---------- Post added at 02:04 PM ---------- Previous post was at 01:42 PM ---------- Can you try adding "#include stc_include.hpp" to the file named "simple_text_control.sqf"? I think I must have somehow left this out, although if that is true, I'm not quite sure how I'm able to use it now. I will create a demo mission and verify all of this later, but that might fix your immediate problem. As a side note: UC_showtext_small is a class in stc_include.hpp for the structured text dialog.
  23. Nevermind, I realized afterwards that I answered my own question.
  24. My mistake, please remove "call compile preProcessFile "lookup_object_info.sqf";" from your init.sqf. The line is a left over in the documentation, I'll edit it. Thanks for letting me know.
  25. I got that part, but don't see the loop in his code that produces _x.
×