Jump to content
dreadpirate

Jebus - Just Editor Based Unit Spawning

Recommended Posts

I made a simple demo mission:

 

https://drive.google.com/open?id=0B-gOD7yyJ9VJWkRCUUwza0ZVaDg

 

The patrol won't move to the 2nd circle unless a BLUFOR unit is standing in the square.

 

Check the condition in waypoint 0.

 

Press Y to activate Zeus, delete the patrol and wait for respawn.....

 

 

Yes. You can use any patrol script you want with the custom init string, or you can use the built-in GAIA support.

 

  • 0 = [this, "GAIA_NOFOLLOW=, "1] execVM "Jebus.sqf"; //Using GAIA with the NOFOLLOW setting for zone 1
  • 0 = [this, "INIT=, "[_proxyThis, 'agia] execVM 'UPS.sqf'"] execVM "Jebus.sqf"; //Using Kronzky's Urban Patrol Script to patrol marker 'agia'

Which patrol script did you have in mind? I can build a little demo mission.....

thank you very much man.. i use the vanilla taskpatrol command. although I can reaaally need some help with fortification as I want it not only to man the nearest empty turrets but also random building positions.

 

One last question, these gaia zones, do I have to make a marker named 1 for the above example to run??

Share this post


Link to post
Share on other sites

thank you very much man.. i use the vanilla taskpatrol command. although I can reaaally need some help with fortification as I want it not only to man the nearest empty turrets but also random building positions.

 

One last question, these gaia zones, do I have to make a marker named 1 for the above example to run??

 

GAIA relies on markers and they need to be named 1, 2, 3, 4, etc.

 

Did you get GAIA Fortify working? What seems to be the problem?

Share this post


Link to post
Share on other sites

Check the condition in waypoint 0

 

Thanks Dread, despite this being outside the scope of what your script is probably responsible for, you have been very helpful once again.

Share this post


Link to post
Share on other sites

Hello Dread, hello guys,

 

First, I want to say thank you Dread for this script, this seems like really the easiest way to spawn in troops.

I ran into a problem: I want to spawn in a group of opfor ai when trigger "radiotower" is not alive. 

I test it as a opfor soldier, destroy the radio tower and my group of enemy ai spawns and follows the waypoints.

now, when I play the mission as blufor and I destroy the radio tower, the enemy group won´t spawn.

I use 

 

0 = [this] execVM "Jebus.sqf";

for the groups leader.

 

triggering the trigger as opfor spawns opfor ai in

triggering the trigger as blufor won´t spawn opfor ai in.

 

Trigger is just

 

NOT ALIVE radiotower

 

Ideas, anyone? What could go wrong?

Share this post


Link to post
Share on other sites

@edelrost:

 

If it works when you're OPFOR but not BLUFOR, my guess would be that BLUFOR is inside the "PAUSE=" radius, which is 200m by default.

 

Try:

0 = [this, "PAUSE=", 100] execVM "Jebus.sqf"; //Try 50 or even 0 if this doesn't work.....

You can also:

0 = [this, "DEBUG"] execVM "Jebus.sqf";

to get debugging information that might help you figure out the problem.....

Share this post


Link to post
Share on other sites

Hey dread, thank you for your reply. It was in fact that pause radius, which is a good feature. But in my case, I need to spawn in the AI really close to the player for some close action :) Thank you very much for your help!

  • Like 1

Share this post


Link to post
Share on other sites

Is it possible to lock specific positions in a spawned vehicle? Here's what I have:

 0 = [this, "PAUSE=", 20, "LIVES=", 1, "DEBUG", "INIT=", "pickup1 lockDriver true; pickup1 lockCargo [0, true];"] execVM "Jebus.sqf";

and the vehicle that's part of the spawned group is named pickup1. But when the vehicle spawns and I kill the occupants the code has no effect :(
 
I understand that I can just lock the vehicle entirely in the editor, but I want the players to still be able to use the vehicle's turret.
 
 

 

 

 

A second question, so I thought I might edit this post...
 
Is it possible to stop and resume the respawning? I'm assuming that it's not, but I thought I might ask. One way I thought that I could be able to achieve this was to change the pause radius on the fly, but I'm not sure on how to go about doing that.

Edited by pritchardgsd

Share this post


Link to post
Share on other sites

Is it possible to lock specific positions in a spawned vehicle? Here's what I have:

 0 = [this, "PAUSE=", 20, "LIVES=", 1, "DEBUG", "INIT=", "pickup1 lockDriver true; pickup1 lockCargo [0, true];"] execVM "Jebus.sqf";

and the vehicle that's part of the spawned group is named pickup1. But when the vehicle spawns and I kill the occupants the code has no effect :(

 

I understand that I can just lock the vehicle entirely in the editor, but I want the players to still be able to use the vehicle's turret.

 

 

 

 

 

A second question, so I thought I might edit this post...

 

Is it possible to stop and resume the respawning? I'm assuming that it's not, but I thought I might ask. One way I thought that I could be able to achieve this was to change the pause radius on the fly, but I'm not sure on how to go about doing that.

 

Q1:

0 = [this, "INIT=", "(vehicle _proxyThis) lockDriver true; (vehicle _proxyThis) lockCargo [0, true];"] execVM "Jebus.sqf";

Q2:

 

At present the pause radius is fixed. If it's a feature people really want, I could look at implementing a pause trigger instead, which could have whatever conditions you wanted.....

Share this post


Link to post
Share on other sites

This is almost certainly awful since I'm pretty fresh to ARMA scripting, but I seem to have managed to achieve a pausable respawner by placing the test for trigger activation that is usually outside of the main loop right at the start of it instead. It... seems to work, but I doubt that it's the best way to do this.

//Main loop
while { _lives != 0 } do {
	if (! isNil "_trigger") then {
	while {! (triggerActivated _trigger)} do {
		sleep 10;
		//if (_debug) then {systemChat format["%1",_trigger]};
		if (_debug) then {systemChat "Waiting for trigger activation in main loop"};
	};
};
//the rest of the loop

Does anything about this stick out as specifically flawed? 

  • Like 1

Share this post


Link to post
Share on other sites

If it works, it's good!

 

I'll have a look at making it more efficient, but this improvement will be in the next version.

 

(With all due credit given to you, pritchardgsd.....)

  • Like 1

Share this post


Link to post
Share on other sites

Will waypoints be saved?

  • The group's waypoints are saved
  • Like 1

Share this post


Link to post
Share on other sites

Problem: Jets spawn up in the Air and fall down until they are able to gain some speed. Also, the "FLYING" thing doesnt work, "FLY" does.

 

0 = [this, "DELAY=", [5,60], "FLY"] execVM "Jebus.sqf";

 

How do i make em fly straight away and not stall on respawn?

Share this post


Link to post
Share on other sites

Problem: Jets spawn up in the Air and fall down until they are able to gain some speed. Also, the "FLYING" thing doesnt work, "FLY" does.

 

0 = [this, "DELAY=", [5,60], "FLY"] execVM "Jebus.sqf";

 

How do i make em fly straight away and not stall on respawn?

 

"FLY" is not a valid parameter for JEBUS, it will just be ignored.

 

"FLYING" works well for helicopters, but you are correct that it doesn't work for planes.

 

A simple solution is to give the plane enough height to start its engines and recover, 2000 should be enough.

 

But I agree that this is not ideal and I'll work on a fix for the next release.....

  • Like 1

Share this post


Link to post
Share on other sites

Dread,

 

Awesome script. But a question.

 

How would I use bis_fnc_taskPatrol or bis_fnc_taskDefend instead of gaia and markers with these examples

 

  • 0 = [this] execVM "Jebus.sqf";
  • Respawns group with default parameters. Uses editor waypoints.
  • 0 = [this, "LIVES=", [4,8]] execVM "Jebus.sqf";
  • Respawns group 4 - 8 times. Uses editor waypoints.
  • 0 = [this, "DELAY=", [30,60]] execVM "Jebus.sqf";
  • Respawns group after 30 - 60 seconds delay. Uses editor waypoints.

Also, for the aircraft one that spawns flying how do i give it a loiter or search and destroy waypoint? Does it work as normal, just place the waypoint in eden?

 

Thank you

Share this post


Link to post
Share on other sites
Here are some copy and paste codes I use with JEBUS. All codes go in leader of groups init.  I hope this helps

 

0 = [this, "LIVES=", 2, "DELAY=", [3,6],"PAUSE=", 10, "INIT=", "[group _proxythis, getPos _proxythis] call BIS_fnc_taskDefend"]  execVM "Jebus.sqf";

 

0 = [this, "LIVES=", 2, "DELAY=", [3,6],"PAUSE=", 10, "INIT=", "[group _proxythis, getMarkerPos 'marker_0'] call BIS_fnc_taskAttack"]  execVM "Jebus.sqf";

 

0 = [this, "LIVES=", 2, "DELAY=", [3,6],"PAUSE=", 10, "INIT=", "[group _proxythis, getPos _proxythis, 300] call bis_fnc_taskPatrol"]  execVM "Jebus.sqf"; // group will patrol 300 meters around spawn start

 

0 = [this, "LIVES=", 2, "DELAY=", [3,6],"PAUSE=", 10, "INIT=", "[group _proxythis, getMarkerPos 'marker_0', 200] call bis_fnc_taskPatrol"]  execVM "Jebus.sqf"; // group will go to marker 0 and patrol 200 meters around marker_0

 

0 = [this, "LIVES=", 2, "DELAY=", [3,6],"PAUSE=", 10, "ATTACK=", getMarkerPos "marker_0"] execVM "Jebus.sqf";

 

0 = [this, "LIVES=", 9, "DELAY=", [3,6],"PAUSE=", 10] execVM "Jebus.sqf"; // Use this for user placed waypoints

  • Like 1

Share this post


Link to post
Share on other sites

For my mission I'm working on, I need groups to not respawn unless all of their friends are dead. I'm not sure if that's something anyone else wants, but here's the change I made:

waituntil {
		sleep 10;
		_unitCount = _unitSide countSide allUnits;
		if (_debug) then {systemChat format ["_unitCount %1", _unitCount]};
		_unitCount < 1;
	};

It would be nice to see this included as an option when running JEBUS, but I wasn't game to try and implement it myself since that part of the code seems complicated and I don't really need it right now.

Share this post


Link to post
Share on other sites

Hi Dread, what do you make of this?

https://youtu.be/M9L8fAnCcSs

 

edit: Apologies, just realised it was private

Yeah, good find anfo. The issue is the group formation heading is overriding the vehicle heading.

 

Find this line in Jebus.sqf

_newGroup addVehicle _newVehicle;

and add the following line afterwards

_newGroup setFormDir _respawnDir;

Needs a bit more testing to see if it breaks anything else, but it works for static weapons.....

 

A fix will be in the next version.....

 

Dread,

 

Awesome script. But a question.

 

How would I use bis_fnc_taskPatrol or bis_fnc_taskDefend instead of gaia and markers with these examples

 

  • 0 = [this] execVM "Jebus.sqf";
  • Respawns group with default parameters. Uses editor waypoints.
  • 0 = [this, "LIVES=", [4,8]] execVM "Jebus.sqf";
  • Respawns group 4 - 8 times. Uses editor waypoints.
  • 0 = [this, "DELAY=", [30,60]] execVM "Jebus.sqf";
  • Respawns group after 30 - 60 seconds delay. Uses editor waypoints.

Also, for the aircraft one that spawns flying how do i give it a loiter or search and destroy waypoint? Does it work as normal, just place the waypoint in eden?

 

Thank you

 

Have a look at ayoungs post above for how to use bis_fnc_taskPatrol and bis_fnc_taskDefend with JEBUS.

 

Yes, you can use normal waypoints for aircraft, which works well for helicopters, but, as discussed above, planes are not working as I would like with JEBUS at the moment so you have to spawn them either on the ground or at great height (>2000m). Working on a fix.....

 

 

For my mission I'm working on, I need groups to not respawn unless all of their friends are dead. I'm not sure if that's something anyone else wants, but here's the change I made:

waituntil {
		sleep 10;
		_unitCount = _unitSide countSide allUnits;
		if (_debug) then {systemChat format ["_unitCount %1", _unitCount]};
		_unitCount < 1;
	};

It would be nice to see this included as an option when running JEBUS, but I wasn't game to try and implement it myself since that part of the code seems complicated and I don't really need it right now.

 

Another way to do this would be a trigger synced to all the relevant groups with the condition: (east countSide allUnits) < 1

 

(Combined with your improvement of checking the trigger inside the main loop, of course).

Share this post


Link to post
Share on other sites

Hi Dread

 

Is there a limited amount of waypoint types that you would consider spawnable by Jebus? I've (painfully) got "Join and Lead" and "Join" waypoints to work on separate tanks, but if they spawn then the action is not carried out for some reason and the lead tank runs off without the rest. If you'd like a video explaining this I'll be happy to produce.

 

edit: after a vanilla test, the penny dropped where I think the necessary syncronisation link between the "Join and Lead" and "Join" waypoints is probably be created after spawn?

Share this post


Link to post
Share on other sites

Hi Dread

 

Is there a limited amount of waypoint types that you would consider spawnable by Jebus? I've (painfully) got "Join and Lead" and "Join" waypoints to work on separate tanks, but if they spawn then the action is not carried out for some reason and the lead tank runs off without the rest. If you'd like a video explaining this I'll be happy to produce.

 

edit: after a vanilla test, the penny dropped where I think the necessary syncronisation link between the "Join and Lead" and "Join" waypoints is probably be created after spawn?

I basically intended Jebus waypoint support to cover the basics: move, cycle, search and destroy, etc.

Advanced waypoints are saved by Jebus, but it doesn't save synchronisations, so the functionality is lost.

Any particular reason the tanks aren't in the same group at spawn?

Share this post


Link to post
Share on other sites

Any particular reason the tanks aren't in the same group at spawn?

 

Oh, sorry if I didn't elaborate on that point. They can be in a group, but even if I spread the group of tanks over a wide area, the moment they spawn they are within metres of each other and they have a hard time sorting out the "knot" before they leave on their waypoints.

 

An example is 4 x AI controlled tanks which are grouped to a leader. I place them probably 10 - 20 metres away from each other, but then they spawn they are within 1-5 metres. Makes for a bit of a messy start for the AI to sort out. The reason I tried "Join and Lead " and "Join" was to try and get around the problem of them spawning so close to each other.

Share this post


Link to post
Share on other sites

Awesome mod. Is there anyway to get it working with HC, HCC or Advanced AI Command as it seems I cant have JEBUS work with any of the groups if they are controlled by HC Mods.

Share this post


Link to post
Share on other sites

Oh, sorry if I didn't elaborate on that point. They can be in a group, but even if I spread the group of tanks over a wide area, the moment they spawn they are within metres of each other and they have a hard time sorting out the "knot" before they leave on their waypoints.

 

An example is 4 x AI controlled tanks which are grouped to a leader. I place them probably 10 - 20 metres away from each other, but then they spawn they are within 1-5 metres. Makes for a bit of a messy start for the AI to sort out. The reason I tried "Join and Lead " and "Join" was to try and get around the problem of them spawning so close to each other.

I suppose I don't spawn multi-vehicle groups with Jebus that much. When I get a chance, I'll look at methods for spreading out the spawn positions.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×