FireWalker 329 Posted July 16, 2016 I need a little help. This is for Multi Player Environment. 1. Lets say I have 10 triggers that spawn enemy AI when a player is within the individual bases zone. 2. I want to let the players know where these enemy spawns are, but I want to keep it random for replay value. 3. So, lets say that on any given mission I want three of the AI bases to show up on the players map as a marker. (same bases will show for all players) 4. But, I want the three markers to be random on each play through, and I want all 10 bases to always spawn - so if they stumble upon them, there is still surprise factor - on the players. I'm thinking I just need to name the triggers individually and place them into an array.. but I need help with that. I would assume it needs to be done on server, because if it was local all the players would see different markers.? As I type this, I'm thinking it might be easier to just spawn random triggers that have markers already attached? I'm not really sure how to proceed, but the above gives a good outline. Thanks for any help, Fire Share this post Link to post Share on other sites
kylania 568 Posted July 16, 2016 Here's a script I did for "random" ammo caches, which is kinda the same thing you're doing. I have 10 caches preplaced on the map and this script goes in and deletes the ones I don't need. Then it puts down markers at the remaining ones and spawns sentry group at each. Might give you some ideas. if (!isServer) then {exit;}; // input _ammoCacheCount = _this select 0; _ammoCachePool = [ammo0, ammo1, ammo2, ammo3, ammo4, ammo5, ammo6, ammo7, ammo8, ammo9]; _ammoCacheRemaining = []; for [{_i=0},{_i<_ammoCacheCount},{_i=_i+1}] do { // _ammoCache = selectRandom _ammoCachePool; _ammoCacheRemaining pushBack _ammoCache; _ammoCachePool deleteAt (_ammoCachePool find _ammoCache); }; { deleteVehicle _x; } forEach _ammoCachePool; { if (true) then { _rMarker = createMarkerLocal [format["mrk%1", _x], getPos _x]; _rMarker setMarkerShapeLocal "ICON"; _rMarker setMarkerTypeLocal "Minefield"; myMarkers pushBack format["mrk%1", _x]; }; if (true) then { [getPos _x, east, (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "UInfantry" >> "OIA_GuardSentry")] call BIS_fnc_spawnGroup; }; } forEach _ammoCacheRemaining; 1 Share this post Link to post Share on other sites
FireWalker 329 Posted July 16, 2016 Here's a script I did for "random" ammo caches, which is kinda the same thing you're doing. I have 10 caches preplaced on the map and this script goes in and deletes the ones I don't need. Then it puts down markers at the remaining ones and spawns sentry group at each. Might give you some ideas. Kylania, thank you! This looks like a great start in the right direction. I'm out of town tomorrow, but looking forward to messing around with this on Sunday. Fire Share this post Link to post Share on other sites