Jump to content

Retrosniper

Member
  • Content Count

    9
  • Joined

  • Last visited

  • Medals

Everything posted by Retrosniper

  1. Hi All, I'm New to the forums and to scripting i'm well out of my depth but i'm learning slowly. i'm sure this has been asked before sorry if it has. I'm having some issues with my script. I want to set up multiple markers that when a player that is alive is within a radius is near this marker it spawns units from a list of possible units. I want all the values the units the spawn radius and etc to be customisabled. I'd love to know how to get them to spawn in buildings as well as on different floors. These spawn points would be through the map in towns and other locations. At the moment i only have it set to 1 marker and 1 unit type but the units don't spawn and i'm a bit lost as to what i should do i can't seem to figure it out. I'd rather create something my self than use already existing scripts (i'm being difficult i know sorry) My script is below I'm not sure if ive pasted it in correctly let me know. Thanks all. _opforMarker = "Opfor_1"; // Name of the marker where the OPFOR units will spawn around _spawnRadius = 100; // Radius around the marker where units can spawn _opforUnits = ["O_Soldier_F"]; // Types of units that can spawn // Get the position of the marker _markerPos = getMarkerPos _opforMarker; // Create a new group for the spawned units _newGroup = createGroup east; // Define the trigger area _triggerPos = _markerPos; _triggerRadius = 50; // Create the trigger _opforTrigger = createTrigger ["EmptyDetector", _triggerPos]; _opforTrigger setTriggerArea [_triggerRadius, _triggerRadius, 10, false]; _opforTrigger setTriggerActivation ["WEST", "PRESENT", true]; _opforTrigger setTriggerStatements ["True", "hint 'trigger on'", "hint 'trigger off'"]; // Spawn units around the marker { _unitPos = [_markerPos, _spawnRadius, 360] call BIS_fnc_findSafePos; _unitType = selectRandom _opforUnits; _unitType createUnit [_unitPos, _newGroup, "_newUnit = this"]; }
  2. Hey all im still alive went on holidays for a bit and was busy with study. Never expected Larrow and Harzach to come in and help ahah legends thanks for that. so a few things i want to do ill try to describe it as best i can. I basically want to create my own version of liberation but bare bones. Sorry Psiko and KP team. i will add more scripts over time and expand further but i want these functions working as the core of the system first I want to have three scripts one with lists of units that are defending and one thats a reinfocement script (so that they can be customised easily) that are arrays that are globally accessable and the same but for different markers i want the spawning script to only handle the spawning and calling of things from other scripts i dont want to have the lists of units and markers in that script to long to many variables my god the horror. i want the ai to spawn once being triggered by the marker when the players enter a 1.5km radius (i know it could cause alot of performance issues but i want vehicles to be able use their weapons at range more realistic blah blah also i know how to do that) the players clear the area and capture the marker and it changes it to blue the enemy can then come back and take those markers. and somehow work out how to have the ai commander or whatever controls the ai call in reinforcements any thing you guys can point me towards? For example like the below. 1st have i create a global variable correctly here? do i need to define it somewhere like in the init.sqf for it to be able to be called by other scripts? 2nd basically the same but with marker names instead humor me haha. I will eventually do a script for a ui for that shows a capture rate and whatever. heres the current spawning script below. any help or directions to point me in would be great thanks again gang.
  3. Thanks dude. I was talking on the discord as well and i got a response from Lepoard20 they wrote this up for me. It works and everyhing im going to keep working on this and try to improve it and learn more and more. I just want to make a array and it selects units from that creates a squad and creates a random amount of squads with a max squad limit per objective. _opforMarker = "Opfor_1"; // Name of the marker where the OPFOR units will spawn around // Get the position of the marker _markerPos = getMarkerPos _opforMarker; // Define the trigger area _triggerPos = _markerPos; _triggerRadius = 50; // Create the trigger _opforTrigger = createTrigger ["EmptyDetector", _triggerPos]; _opforTrigger setTriggerArea [_triggerRadius, _triggerRadius, 10, false]; _opforTrigger setTriggerActivation ["WEST", "PRESENT", true]; _opforTrigger setTriggerStatements ["this", toString { hint 'trigger on'; // Spawn units around the marker _opforMarker = "Opfor_1"; // Name of the marker where the OPFOR units will spawn around _spawnRadius = 100; // Radius around the marker where units can spawn _opforUnits = ["O_Soldier_F"]; // Types of units that can spawn // Get the position of the marker _markerPos = getMarkerPos _opforMarker; // Create a new group for the spawned units _newGroup = createGroup east; // Define the trigger area _triggerPos = _markerPos; _triggerRadius = 50; _unitPos = [_markerPos, _spawnRadius, 360] call BIS_fnc_findSafePos; _unitType = selectRandom _opforUnits; _unit = _newGroup createUnit [_unitType, _unitPos, [], 0, "NONE"]; // create the unit }, "hint 'trigger off'"];
  4. _opforMarker = "Opfor_1"; // Name of the marker where the OPFOR units will spawn around _spawnRadius = 100; // Radius around the marker where units can spawn _opforUnits = ["O_Soldier_F"]; // Types of units that can spawn // Get the position of the marker _markerPos = getMarkerPos _opforMarker; // Create a new group for the spawned units _newGroup = createGroup east; // Define the trigger area _triggerPos = _markerPos; _triggerRadius = 50; // Create the trigger _opforTrigger = createTrigger ["EmptyDetector", _triggerPos]; _opforTrigger setTriggerArea [_triggerRadius, _triggerRadius, 10, false]; _opforTrigger setTriggerActivation ["WEST", "PRESENT", true]; _opforTrigger setTriggerStatements ["True", "hint 'trigger on'", "hint 'trigger off'"]; // Spawn units around the marker _unitPos = [_markerPos, _spawnRadius, 360] call BIS_fnc_findSafePos; _unitType = selectRandom _opforUnits; _unit = _newGroup createUnit [_unitType, _unitPos, [], 0, "NONE"]; // create the unit So with the changes youve suggested how could i link the trigger to activate and then spawn the units because if they are currently not tied together then its activating the trigger but not spawning the units.
  5. Is this for the first iteration of the script or the second? ive tested on both and nothing spawns still
  6. im getting errors on line 24 with this below code saying no ; im unsure as to whats going on. _opforMarker = "Opfor_1"; _spawnRadius = 100; _opforUnits = ["O_Soldier_F"]; _markerPos = getMarkerPos _opforMarker; _newGroup = createGroup east; _triggerPos = _markerPos; _triggerRadius = 50; _opforTrigger = createTrigger ["EmptyDetector", _triggerPos]; _opforTrigger setTriggerArea [_triggerRadius, _triggerRadius, 0, false]; _opforTrigger setTriggerActivation ["WEST", "PRESENT", true]; { _unitPos = [_markerPos, _spawnRadius, 360] call BIS_fnc_findSafePos; _unitType = selectRandom _opforUnits; _unit = createUnit [_unitType, _unitPos, [], 0, "NONE"]; // create the unit _unit setGroupId [_newGroup]; };
  7. I was reccomended that by a friend. what would you suggest instead?
  8. Hey man super keen for SuperAI ive got a bunch of mates that play on a dedicated server. would be super keen to try this out when you release it for multiplayer.
  9. Squad name: Vague Strategist Timezone/location : AEST Gamemode preference : PVP ZEUS EXILE Website address: https://units.arma3.com/unit/vsclan Short description We are a group of players who have been playing together since 2011 in Arma 2 Dayz. were looking for others to join us and play. Were based in AUS and run survival and Zeus missions we'd love to have others from Oceania join us (ping) Language: english
×