Jump to content
dreadpirate

Jebus - Just Editor Based Unit Spawning

Recommended Posts

On 6/14/2019 at 4:33 PM, anfo said:

I've been away for a while, so I thought I'd just check whether cached AI are still invisible, or spawn in now?

edit: this is not a call to action, nor am I entitled to one! I just remember it was discussed with a possibly of inclusion at some point.

@anfoI did update JEBUS recently with a bug fix, but I haven't got around to adding this feature yet. I'm playing with ALIVE and Ravage at the moment and not really working on JEBUS.....

 

On 6/13/2019 at 9:08 PM, redarmy said:

JEBUS spawning units CAN be given to ALIVE,though you may need to manually do it via the ALIVE interface.

@redarmy http://alivemod.com/wiki/index.php/Script_Snippets#Profiling_all_non_profiled_units_on_the_map will automatically add JEBUS units to ALIVE.

 

You just need to remember that when ALIVE profiles those units, JEBUS will think they're dead and respawn them unless you have a synched trigger of some sort....

 

Also, ALIVE just spawns from unit classnames, so you'll lose any custom loadouts.....

  • Like 1

Share this post


Link to post
Share on other sites

Is anyone else having issues with the markers of a patrol zone not disappearing once a mission starts?  Specifically when using Giaea.  I have this in the init file for the mission:

 

// We set the markers invisible (if you use more then 100 markers, then increase). Or delete if you want them visible
for "_x" from 1 to 100 do
{
	format ["%1",_x] setMarkerAlpha 0;
};

But the markers (specifically circles) are still showing up where the AI patrols.  I've manually turned down the alpha as an interim solution, but it seems like I'm doing something wrong.  This started happening a few versions ago.

Share this post


Link to post
Share on other sites
On 6/16/2019 at 11:08 AM, dreadpirate said:

@anfoI did update JEBUS recently with a bug fix, but I haven't got around to adding this feature yet. I'm playing with ALIVE and Ravage at the moment and not really working on JEBUS.....

 

No worries. Thank you for keeping Jebus afloat, even in small ways.

Share this post


Link to post
Share on other sites
12 hours ago, gatordev said:

Is anyone else having issues with the markers of a patrol zone not disappearing once a mission starts?  Specifically when using Giaea.  I have this in the init file for the mission:

 


// We set the markers invisible (if you use more then 100 markers, then increase). Or delete if you want them visible
for "_x" from 1 to 100 do
{
	format ["%1",_x] setMarkerAlpha 0;
};

But the markers (specifically circles) are still showing up where the AI patrols.  I've manually turned down the alpha as an interim solution, but it seems like I'm doing something wrong.  This started happening a few versions ago.

Do the markers still disappear in the JEBUS demo mission? I forgot to check when I did the update.... 

Share this post


Link to post
Share on other sites
12 hours ago, dreadpirate said:

Do the markers still disappear in the JEBUS demo mission? I forgot to check when I did the update.... 

 

I'll have to check.  Didn't think to cross check that, but that's a good idea.

Share this post


Link to post
Share on other sites
On 6/19/2019 at 3:14 PM, gatordev said:

 

I'll have to check.  Didn't think to cross check that, but that's a good idea.

I think that code only applys to markers with numerical names ie “1, 2, 3” etc

Share this post


Link to post
Share on other sites

Hello Dread! 

 

It has been a long while since I've played Arma 3, but I've recently begun to play it again because of the new contact DLC that I'm hyped about!

 

But anyway the reason I'm writing you is because I've picked up mission making again and I've tried to use your updated script but it no longer works for me???

I've made sure the description.ext and jebus folder was included in my mission folder (along with the contents of the init.sqf for good measure) but nothing appears to be working. I'm even using the new function code in the init line of units instead of the old "execVM" method, but alas nothing.

 

It works perfectly fine and well in the demo mission, and what's odd is that if I make a copy of that mission, with all of the same scripts, folders and everything, respawning stops.

 

I've never been the brightest when it comes to scripting/coding so maybe it's just something small I'm overlooking but this is frustrating! I loved this script back in the day, saved my maps from a lot of unnecessary clutter.

 

Edit: Got it working, I guess I needed the GAIA folder in there as well. Still doesn't explain why copying the demo mission made that stop working but oh well??? 

 

I also have a question for you when you see this post, regarding the high command module and respawning

 

Share this post


Link to post
Share on other sites
21 hours ago, MitchyG117 said:

Hello Dread! 

 

It has been a long while since I've played Arma 3, but I've recently begun to play it again because of the new contact DLC that I'm hyped about!

 

But anyway the reason I'm writing you is because I've picked up mission making again and I've tried to use your updated script but it no longer works for me???

I've made sure the description.ext and jebus folder was included in my mission folder (along with the contents of the init.sqf for good measure) but nothing appears to be working. I'm even using the new function code in the init line of units instead of the old "execVM" method, but alas nothing.

 

It works perfectly fine and well in the demo mission, and what's odd is that if I make a copy of that mission, with all of the same scripts, folders and everything, respawning stops.

 

I've never been the brightest when it comes to scripting/coding so maybe it's just something small I'm overlooking but this is frustrating! I loved this script back in the day, saved my maps from a lot of unnecessary clutter.

 

Edit: Got it working, I guess I needed the GAIA folder in there as well. Still doesn't explain why copying the demo mission made that stop working but oh well??? 

 

I also have a question for you when you see this post, regarding the high command module and respawning

 

The first thing I would suggest is add the DEBUG parameter to your JEBUS units and see what happens. 

 

The other thing is to enable the showscripterrors parameter in the A3 launcher and see if you get any errors from that. 

Share this post


Link to post
Share on other sites

@dreadpirate

I'll try that without the GAIA folder and see what happens, I don't mind having the folder in my mission folder for now.

 

I wanted to ask though, is it possible to use the high command module and add spawned units to your command bar? synchronizing it to the module itself doesn't do anything

Share this post


Link to post
Share on other sites
2 hours ago, MitchyG117 said:

@dreadpirate

I wanted to ask though, is it possible to use the high command module and add spawned units to your command bar? synchronizing it to the module itself doesn't do anything

I think there is a scripting command or function to add new units to high command, but I'm not able to look it up just now.

Share this post


Link to post
Share on other sites
1 hour ago, dreadpirate said:

I think there is a scripting command or function to add new units to high commnd, but I'm not able to look it up just now.

There is, hcSetGroup. I've been trying to get that to work. Here is what I have in the init box of my squad:

 

0 = [This, "INIT=", "Unit1 hcSetGroup [Squad1]"] spawn jebus_fnc_main;

 

Now, using 'Unit1 hcSetGroup [Squad1]' worked fine in a trigger for units not being spawned by jebus, but does nothing when put in the init string or firing said trigger after jebus has spawned the group with the variable name 'Squad1'. 

 

As you might guess Unit1 is the name of the Commander unit and Squad1 is the group name of the subordinate Squad. Could it be that when spawned in the group variable name is not being saved?

 

 

Share this post


Link to post
Share on other sites

Try:

 

0 = [This, "INIT=", "(group _proxyThis) hcSetGroup [Squad1]"] spawn jebus_fnc_main;

 

You're right. The group name is not saved, only the individual units and vehicles.....

Share this post


Link to post
Share on other sites
15 hours ago, dreadpirate said:

I think there is a scripting command or function to add new units to high commnd, but I'm not able to look it up just now.

Just gave it a try. Returned an error message saying "error hcSetGroup: Type group, expected object"

 

I tried switching places with (group _proxyThis" and [Squad1] because in a trigger you use the commanding unit name first

 

But that just returned a similar error

 

error hcSetGroup: Type group, expected array"

 

EDIT!! I'm excited to type that I've got it working, figured it out myself so I'm proud of myself!

 

Reading the error message, it said "expected array" so I just made one slight adjustment to the code and got it working! All it needed was brackets 

 

0 = [This, "INIT=", "Unit1 hcSetGroup [(group _proxyThis)]"]

 

Thank you so much Dread you are a genius with scriping, I honestly don't even know what _proxyThis is supposed to mean in coding language but thank heavens you referred me to it because now I can get on with creating my mission that involves respawnable high command groups 😀

 

Edited by MitchyG117
Problem Solved!!

Share this post


Link to post
Share on other sites
On 6/23/2019 at 9:25 AM, Blitzen88 said:

I think that code only applys to markers with numerical names ie “1, 2, 3” etc

 

Now that you mention it, that sounds familiar.  That's a bummer.  I ended up going back to work before I could try testing the demo mission, but hopefully can work on that in the next few days now that I'm off again.

Share this post


Link to post
Share on other sites

Hi @dreadpirate


When using "START=", we appear to be getting debug info bottom left of screen stating "First Loop!" at every event of START I suspect. Would you know where to turn this off. Debug in fn_main.sqf is already off.

 

Anfo

Share this post


Link to post
Share on other sites
6 minutes ago, anfo said:

Hi @dreadpirate


When using "START=", we appear to be getting debug info bottom left of screen stating "First Loop!" at every event of START I suspect. Would you know where to turn this off. Debug in fn_main.sqf is already off.

 

Anfo

Yeah, you're right, I forgot to add the debug condition to that section

 

Change line 249 of fn_main.sqf from:

 

systemChat "First Loop!";

 

to:

 

 if (_debug) then {systemChat "First Loop!";};

 

and you're good to go!

 

On 6/26/2019 at 1:35 AM, MitchyG117 said:

Reading the error message, it said "expected array" so I just made one slight adjustment to the code and got it working! All it needed was brackets 

 

0 = [This, "INIT=", "Unit1 hcSetGroup [(group _proxyThis)]"]

 

Thank you so much Dread you are a genius with scriping, I honestly don't even know what _proxyThis is supposed to mean in coding language but thank heavens you referred me to it because now I can get on with creating my mission that involves respawnable high command groups 😀

 

Far from a genius here. I imagine most of the veteran scripters cringe when they look at my code. What I mostly do is what you did: trial and error until I get it to work somehow.....

  • Like 1

Share this post


Link to post
Share on other sites
On 6/23/2019 at 9:25 AM, Blitzen88 said:

I think that code only applys to markers with numerical names ie “1, 2, 3” etc

 

So ran a test last night and the marker was still visible even with just a "1" as the marker name.  Wasn't able to test the demo mission, but this was with the latest release.

Share this post


Link to post
Share on other sites
On 6/29/2019 at 4:58 PM, dreadpirate said:

if (_debug) then {systemChat "First Loop!";};

 

Thanks Dread, fixed the issue. Not sure if we did the right thing, but we have feeling line 132 should also be false instead of true? Anyway, FYI as mission worked regardless. 👍

Share this post


Link to post
Share on other sites

Hey I think I found a bug that does not allow jebus to work correctly when using a trigger type skip waypoint with a condition of !alive. Jebus still works but you can't use the trigger skip waypoint type it will not hold the group in place until the condition is met. Any thoughts on how to make this work?

 

Share this post


Link to post
Share on other sites
On 7/30/2019 at 2:39 AM, avibird 1 said:

Hey I think I found a bug that does not allow jebus to work correctly when using a trigger type skip waypoint with a condition of !alive. Jebus still works but you can't use the trigger skip waypoint type it will not hold the group in place until the condition is met. Any thoughts on how to make this work?

 

Is the unit being checked with !alive a JEBUS unit as well? Because the trigger would activate at the start of the mission when the unit is saved and deleted by JEBUS.

  • Thanks 1

Share this post


Link to post
Share on other sites

@dreadpirate no it's just using a trigger to move into place once a unit is killed not the group using jebus. Also I have the code to put in a chopper for unlimited fuel.

 

Null = this spawn {while {alive _this setfuel 1; sleep 60}}; 

 

 

But when using it with jebus the object init box does not carry over when the unit is spawned in at start or if respawn in into the mission. I know I had a problem with custom group names carrying over as well.  Am I able to correct this or this is part of jeb's complex spawning system within the script itself.

Share this post


Link to post
Share on other sites

Need help attempting to using "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.

 

With this code -

Null = this spawn {while {alive _this setfuel 1; sleep 60}}; 

 

0 = [this, "LIVES=", [2,4]; "INIT=","[_proxyThis, 'Null = this spawn {while {alive _this setfuel 1; sleep 60}}; '] spawn jebus_fnc_main;

 

 

What is the correct way to use it to make sure the object init box will carry over when the unit get spawned into the game.

 

Share this post


Link to post
Share on other sites

Anyone had issues with jebus since the last Game update? Sometimes jebus the double bspawn a group or not follow it's editor place waypoints with GIAI. For example I have a group with a move waypoint  then seek and destroy and seek and destroy then move waypoint with GIAI code for zone. It always works initially but after a respawn it will move to the town and do the first few waypoints but when GIAI waypoint is it up the group just stays idle and never moves to the zone. 

 

Just wondering if anybody else is having issues or I need to look at other things that could be causing it.

Share this post


Link to post
Share on other sites

@dreadpirate  or anyone else that can help. Can't get this to work says error with this when putting this into a unit init box.

 

0 = [this,"INIT=",[_proxyThis,]addeventhandler ["Fuel",{(_this select 0) setfuel 1; systemchat "setfuel 1";}];] spawn jebus_fnc_main;

 

 

"INIT=" - Init string to run upon spawning. (Use "_proxyThis" where you would usually use "this" in a script or function call). 

 

 

I want to add a script to refuel a chopper after respawn using jebus.

 

 

Share this post


Link to post
Share on other sites
13 minutes ago, avibird 1 said:

@dreadpirate  or anyone else that can help. Can't get this to work says error with this when putting this into a unit init box.

 

0 = [this,"INIT=",[_proxyThis,]addeventhandler ["Fuel",{(_this select 0) setfuel 1; systemchat "setfuel 1";}];] spawn jebus_fnc_main;

 

 

"INIT=" - Init string to run upon spawning. (Use "_proxyThis" where you would usually use "this" in a script or function call). 

 

 

I want to add a script to refuel a chopper after respawn using jebus.

 

 

If you look back a few pages Dread gVe an example of how to addaction to a unit. My understanding was to have the unit execute a script which adds the addaction

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

×