Jump to content

dreadpirate

Member
  • Content Count

    457
  • Joined

  • Last visited

  • Medals

Everything posted by dreadpirate

  1. Jebus - Just Editor Based Unit Spawning Version: 1.433 Release Date: 2019/12/29 Author: DreadPirate Short Description: This script takes editor-based groups and respawns them when the group is eliminated Description: The group's waypoints are saved The group's loadouts are saved Multiple respawn positions are available Spawning can be synchronized with a trigger to create groups when needed The number of respawns can be set, or it can respawn infinitely The respawn delay can be a fixed number or a range A pause radius is available so groups don't spawn on top of their enemies An exit trigger can be used to exit the script early Integrated GAIA support (https://forums.bistudio.com/topic/172933-mission-template-stand-alone-gaia-make-missions-fast-by-using-mcc-gaia-engine/) A custom init string can be used to run your favourite patrol script, attack script, gear script, etc. Units are added to Zeus automatically Use it for ambient combat, waves of attackers, random patrols or whatever else you think of..... Installation / Usage: Copy the jebus folder into your mission folder Copy description.ext into your mission folder (or merge description.ext with yours) Place a group in the editor Call the script in the initialization box of the leader or group (examples given below) Option: Synchronize a trigger with the group leader. The group will not spawn until the trigger is activated Installing to a sub-folder: Copy the jebus folder into your mission sub-folder (eg scripts) Copy description.ext into your mission folder (or merge description.ext with yours) Edit description.ext to point to sub-folder (eg #include "scripts\jebus\cfgFunctions.hpp") Proceed as normal Parameters: this = Leader of a group "LIVES=" - Number of times group should respawn. Integer or array [minLives, maxLives]. Default is infinite lives "DELAY=" - Delay in seconds before respawning. Number or array [minTime, maxTime]. Default is 30 seconds "CACHE=" - Group will cache until players are within "CACHE=" metres. Default is no caching "REDUCE=" - Group will cache until players are within "REDUCE=" metres. Default is no reducing "START=" - Initial spawning delay. Use if you spawn multiple groups by one trigger to avoid spawn lag. Default is 0. "GAIA_MOVE=" - Group added to GAIA with "MOVE" parameter "GAIA_NOFOLLOW=" - Group added to GAIA with "NOFOLLOW" parameter "GAIA_FORTIFY=" - Group added to GAIA with "FORTIFY" parameter "FLYING" - Air vehicles will spawn already flying "RESPAWNMARKERS=" - Array of alternate respawn positions "PAUSE=" - Radius in which enemies will pause the spawner. Default is 200. "EXIT=" - Name of exit trigger. Group will not respawn again once trigger is activated "INIT=" - Init string to run upon spawning. (Use "_proxyThis" where you would usually use "this" in a script or function call). Default is empty string. "DEBUG" - Will provide debugging information Examples: 0 = [this] spawn jebus_fnc_main; Respawns group with default parameters. Uses editor waypoints. 0 = [this, "LIVES=", [4,8]] spawn jebus_fnc_main; Respawns group 4 - 8 times. Uses editor waypoints. 0 = [this, "DELAY=", [30,60]] spawn jebus_fnc_main; Respawns group after 30 - 60 seconds delay. Uses editor waypoints. 0 = [this, "CACHE=", 500, "GAIA_NOFOLLOW=", "3"] spawn jebus_fnc_main; Group uncaches when players are within 500m of spawn position. Assigns group to GAIA zone 3. 0 = [this, "PAUSE=", 100, "INIT=", "[_proxyThis, 'agia'] execVM 'UPS.sqf'"] spawn jebus_fnc_main; Group initializes Kronzky's UPS script to patrol a marker named 'agia'. Respawning will pause if enemies are within 100m of spawn position. 0 = [this, "GAIA_MOVE=", "9", "RESPAWNMARKERS=", ["m1", "m2"]]spawn jebus_fnc_main; Group will respawn randomly at its editor position or "m1" or "m2". Assigned to GAIA zone 9. 0 = [this, "GAIA_NOFOLLOW=", "10", "EXIT=", myExitTrigger] spawn jebus_fnc_main; Group will respawn until myExitTrigger is activated. Assigned to GAIA zone 10. Changelog: v1.0 (2014/10/28) - First release v1.1 (2014/11/09) - Added support for Motorized, Mechanized & Armored groups. Added trigger activated spawning. v1.2 (2015/02/21) - Added debugging information. Added variable respawn delay. Improved readability of installation and code. Various tweaks. v1.3 (2015/03/17) - ArmA 2 first release. Made parameters more user friendly. Added variable number of respawns. Added simple patrol script. Added simple attack script. Added pilot kill script. v1.31 (2015/03/30) - Added reset when no enemies are within certain radius. Added Arma 2 demo mission. v1.32 (2015/05/08) - Switched to using nearEntities instead of nearestObjects. Changed activation and reset to detect players. v1.33 (2016/3/27) - Eden update. GAIA support. v1.34 (2016/4/3) - Waypoint support. Variable respawn position support. Exit trigger support. v1.35 (2016/4/29) - Fixed caching. Save and restore editor loadouts v1.36 (2016/10/2) - Script can be called from group init. Vehicle locked status and cargo saved. v1.37 (2017/1/1) - Fixed trigger activation, planes, inventory v1.38 (2017/2/26) - Vehicles respawn in editor positions. "REDUCE=" added v1.39 (2017/3/10) - Skill levels are saved. Various tweaks and fixes. v1.40 (2017/10/2) - Dynamic Loadout support. "START=" added. Multi vehicle groups support RESPAWNMARKERS. v1.41 (2017/12/29) - Stopped units moving to default spawn position when using RESPAWNMARKERS v1.42 (2018/5/6) - The behemeth update. More vehicle attributes saved v1.43 (2018/7/1) - Variable names are saved for all group members and vehicles. Various tweaks and fixes v1.431 (2018/7/6) - Fixed a bug with trigger activation v1.432 (2019/6/1) - Variable names are now *actually* saved for all group members and vehicles. Pause radius default is now 0 v1.433 (2019/12/29) - Vehicles spawn 2m off ground (Global Mobilization fix) Version 1.433 Vehicles spawn 2m off ground (Global Mobilization fix) Various tweaks and fixes Download https://drive.google.com/open?id=11ExOwrgZFq4wox_VBhn8mQYONDgXwvAO GitHub https://github.com/DreadPirateAU/JEBUS Jebus - Just Editor Based Unit Spawning v1.431
  2. 0 = [this, "LIVES=", 1] spawn jebus_fnc_main;
  3. So, I think most mission makers and scripters have played around with @bangabob's excellent Enemy Occupation System (EOS) at some point: https://forums.bohemia.net/forums/topic/144150-enemy-occupation-system-eos/ Basically you place a bunch of enemy zone markers, run the script which generates a trigger for each zone and when players enter the trigger, enemies are spawned. When players leave the trigger, the enemies are deleted. If players clear a zone of enemies, it turns green and no further enemies will spawn there. (There is more to it than that, but that's the basics.....) So, I made a script to auto-generate 100 x 100m markers for map grids with enterable buildings in them. On Altis, this creates 3898 markers! (I'm blacklisting some buildings) I'll blacklist friendly occupied areas and bases, but with EOS, I'll still wind up with over 3000 triggers, checking every 0.5 seconds. So, my idea is: Instead of having triggers attached to zones checking for players, how about having a script running on players checking for nearby zones? I modified my script to create Locations for each zone. Now I can use: https://community.bistudio.com/wiki/nearestLocations to check if players are near zones and activate them accordingly. Before I go much further down this rabbit hole, can you veteran scripters tell me: am I wasting my time here? Will trading triggers for locations actually save any processing time? What are some pitfalls I'll need to look out for in terms of multiplayer and locality?
  4. Version 1.433 Vehicles spawn 2m off ground (Global Mobilization fix) Various tweaks and fixes Download https://drive.google.com/open?id=11ExOwrgZFq4wox_VBhn8mQYONDgXwvAO GitHub https://github.com/DreadPirateAU/JEBUS
  5. Here's the way I did it: https://drive.google.com/open?id=1ho7oivdkJX580Ls4qgDDaAbxuSeeilq2 (The deactivation code in the trigger deletes the vehicle and its crew when OPFOR has left the area)
  6. Shows how many people use the github, the entire main script was pasted in there twice..... Fixed now, thanks for the heads up @slatosniper
  7. We've all been there.....
  8. JEBUS doesn't work well with multi-vehicle groups, especially planes. Other than that, your init should work fine. Add "DEBUG" to the init, maybe your trigger isn't firing for some reason.....
  9. The group won't respawn until the whole group is killed AND the trigger is activated...
  10. Thank you @sgtfuzzle17 I will include this fix in the next update..... @Rayjer If you look at the planes in the demo mission, you'll find that JEBUS already has a function called pilotKill that does what you want. Here's an example of how to call it: 0 = [this, "FLYING", "INIT=", "[_proxyThis] call jebus_fnc_pilotKill"] spawn jebus_fnc_main;
  11. I just had a look at this. Seems like the vehicles aren't configured correctly. As a workaround, look for the following line in fn_main.sqf: _newVehicle = createVehicle [_newVehicleType, _newVehiclePosition, [], 0, _special]; (it's line number 278 if your editor shows line numbers.....) Add a line *above* that one that reads: _newVehiclePosition = [_newVehiclePosition select 0, _newVehiclePosition select 1, (_newVehiclePosition select 2)+ 1.5]; This will spawn vehicles 1.5 metres above their default position and then they will drop to the ground..... Unfortunately, this may cause problems for other vehicles, particularly planes that may tip over and get damaged when dropped.....
  12. Success! Thank you @engima!!! I'm also experimenting with your Civilian, Ambient Infantry and Patrolled Areas scripts. Everything is working well! For the record, here is my ConfigAndStart.sqf. I don't know if what I've done will work in a dedicated or headless client environment, but for single player and listen servers it does the job..... ConfigAndStart.sqf
  13. @engima This is what I tried...... The driver is being replaced as I want, but when the vehicle leaves the spawn radius, only the vehicle is deleted and the civilian is either killed or severely injured as the car disappears from under him..... ConfigAndStart.sqf
  14. I was going to use ON_UNIT_CREATED to delete the driver and add my own, but wouldn't that interfere with managing and despawning the vehicles and units?
  15. @engima Would it be possible to define an array of possible drivers as well as possible vehicles? It would be great for people using modded civilians and vehicles to mix and match what spawns.
  16. Because it was for enemies, I didn't bother with precise loadouts, but if that's what you want it will be a big script. At that point, you might want to look at creating your own faction. There are some good tools for doing that like the ALIVE Orbatron or Drongo's Config Generator: http://alivemod.com/wiki/index.php/ORBAT_Tool https://steamcommunity.com/sharedfiles/filedetails/?id=1771335720
  17. I did a similar thing myself. Have a look at setSkill.sqf in eos\functions....... // ADD CUSTOM SCRIPTS TO UNIT HERE [_unit] execVM "redressFIA.sqf"; {_x addCuratorEditableObjects [[_unit],true]} forEach allCurators;
  18. I can't recreate this error. Are you using vanilla aircraft or modded? @avibird 1 Try putting the JEBUS init code in the *group* init rather than the leader. I think this is what is causing the problem..... If you're spawning 3 JEBUS groups at once using "START=", use: 0 = [this] spawn jebus_fnc_main; 0 = [this, "START=", 10] spawn jebus_fnc_main; 0 = [this, "START=", 20] spawn jebus_fnc_main; This will space out the spawns, reducing lag..... It's hard to say how many groups is too many for JEBUS. A lot depends on your PC's performance. One of the problems with JEBUS is having multiple groups respawning at once causing lag. One solution may be to have a central JEBUS respawning queue, which will make sure groups respawn one at a time. But that requires a *major* rewrite that I'm not really up to doing at the moment.....
  19. Do you have a lot of JEBUS groups all spawning at once? If so, consider using the "START=" parameter to spread them out a little bit..... I believe the problem is caused by lots of "createVehicle" commands running at once in a laggy situation, but if anyone has any other ideas I'd be grateful for the assist.....
  20. @avibird 1 Appears to be working at this end. Here's a demo mission. The units will respawn endlessly until you stand on the square helipad. https://drive.google.com/open?id=1Ol7h-G-4PqF-N6EEpYR8-6wEBMKJiFRK
  21. While technically such a thing would be possible with JEBUS, you will wind up with a massive pile of spaghetti and meatballs with all the triggers and synchronisations you will need. I'd look for a simpler method......
×