Catchdog64 11 Posted January 11, 2017 I still can't get it to work. The trigger is working for sure, but nothing is spawning. Is it by chance not compatible with some mods? Share this post Link to post Share on other sites
dreadpirate 173 Posted January 11, 2017 13 minutes ago, Catchdog64 said: I still can't get it to work. The trigger is working for sure, but nothing is spawning. Is it by chance not compatible with some mods? Mods shouldn't affect anything but you could try running the demo mission with your mods active and see what happens. Are you still seeing a wall of debugging text? Share this post Link to post Share on other sites
Catchdog64 11 Posted January 11, 2017 Not after I took the activation line out of the trigger. Will try the the demo mission. Share this post Link to post Share on other sites
Catchdog64 11 Posted January 11, 2017 Ok, It's now telling me "Enemies in pause radius: waiting" Share this post Link to post Share on other sites
Catchdog64 11 Posted January 11, 2017 Got it to work, but it's not spawning the composition correctly. They were given a custom loadout, but they spawn with the original. Share this post Link to post Share on other sites
Catchdog64 11 Posted January 11, 2017 Figured it out. Units in the composition have to be survivors instead of a standard unit in order to retain custom loadout. Share this post Link to post Share on other sites
Catchdog64 11 Posted January 11, 2017 Thank you by the way. Share this post Link to post Share on other sites
dreadpirate 173 Posted January 11, 2017 3 hours ago, Catchdog64 said: Figured it out. Units in the composition have to be survivors instead of a standard unit in order to retain custom loadout. Glad you got it working, but I have custom loadouts working on all unit types, so something is still not quite right. I'll add some more detailed debugging info in the next version, so I can hopefully pick up any lingering bugs..... Share this post Link to post Share on other sites
WurschtBanane 11 Posted January 21, 2017 But i have a big issue with it: Units names do not get saved. This makes the making of many missions impossible. For example: I want to remove all anti-ground missiles from a jet and maybe use some kind of command in its init to hide objects from it so it does not attack ground targets. But when it respawns, the init from both the unit and the vehicle the unit was in are gone. Their names are gone too, aswell as any objects they were synched to. Could you please try to work on this? I would be fine if atleast the synchings with objects/modules dont get deleted when the unit spawns/respawns. Or can i work around that issue by somehow magicly using the INIT= variable in the script? PS: The script is great, the first working one that allows me to spawn in AI without having to find every units classname and create it via a script. It is just this issue which limits me in some ways. Share this post Link to post Share on other sites
dreadpirate 173 Posted January 21, 2017 18 hours ago, WurschtBanane said: For example: I want to remove all anti-ground missiles from a jet and maybe use some kind of command in its init to hide objects from it so it does not attack ground targets. To remove bombs and air-to-ground missiles from CAS Buzzard: 0 = [this, "FLYING", "INIT=", "{(vehicle _proxyThis) removeWeapon _x} forEach ['missiles_SCALPEL', 'GBU12BombLauncher_Plane_Fighter_03_F'];"] execVM "Jebus.sqf"; (Note how I use single quotes around the weapon classnames. It won't work otherwise) 18 hours ago, WurschtBanane said: Could you please try to work on this? I would be fine if atleast the synchings with objects/modules dont get deleted when the unit spawns/respawns. Which modules did you have in mind? I will see what is possible..... Share this post Link to post Share on other sites
WurschtBanane 11 Posted January 21, 2017 Its ok, i can work around that. But can you make it not delete the init/the unit name? Or is that simply not possible with a respawn script? Share this post Link to post Share on other sites
dreadpirate 173 Posted January 22, 2017 If you have a unit called a1, you can restore its name after respawn using: 0 = [this, "INIT=", " a1 = _proxyThis"] execVM "Jebus.sqf"; But that will only work with single units / vehicles. Could you be more specific on what you want to achieve? 1 Share this post Link to post Share on other sites
WurschtBanane 11 Posted January 22, 2017 12 hours ago, dreadpirate said: If you have a unit called a1, you can restore its name after respawn using: 0 = [this, "INIT=", " a1 = _proxyThis"] execVM "Jebus.sqf"; But that will only work with single units / vehicles. Could you be more specific on what you want to achieve? I want to sync a F-18 loadout module with a respawning F-18 so it never has AGMS. I also want to hide friendly ground vehicles from it, as it would attack them with the gun otherwise. Share this post Link to post Share on other sites
dreadpirate 173 Posted January 22, 2017 3 hours ago, WurschtBanane said: I want to sync a F-18 loadout module with a respawning F-18 so it never has AGMS. I also want to hide friendly ground vehicles from it, as it would attack them with the gun otherwise. What code are you using to hide vehicles from the F-18? Which F-18 mod are you using? It seems that the easiest way to do this would be: 0 = [this, "FLYING", "INIT=", "[_proxyThis] execVM 'initF18.sqf' "] execVM "Jebus.sqf"; and then having a "initF18.sqf" file that would remove the default loadout, add your preferred loadout and run your hide vehicles code..... 1 Share this post Link to post Share on other sites
WurschtBanane 11 Posted January 22, 2017 20 hours ago, dreadpirate said: What code are you using to hide vehicles from the F-18? Which F-18 mod are you using? It seems that the easiest way to do this would be: 0 = [this, "FLYING", "INIT=", "[_proxyThis] execVM 'initF18.sqf' "] execVM "Jebus.sqf"; and then having a "initF18.sqf" file that would remove the default loadout, add your preferred loadout and run your hide vehicles code..... Thanks man, you were pretty helpful. I will try all of this when i build another mission. Share this post Link to post Share on other sites
WurschtBanane 11 Posted January 23, 2017 Now i am using the SU-35 mod, and i asked the developer of it. He said the only way to remove a respawing SU-35s CAS capabilities is by putting T = [this] spawn { sleep 1; params ["_plane"]; _plane removeWeapon "js_w_su35_kh29Launcher"; _plane removeWeapon "js_w_su35_s8Laucher"; }; Into its init. I tried putting it into your INIT= param, but it did not seem to work... should it? The classnames are correct btw. EDIT: Also, planes with the FLYING attribute are only flying at 200m. Can that be changed? Share this post Link to post Share on other sites
ayoung 29 Posted January 23, 2017 can you please post the code you put in your unit. Share this post Link to post Share on other sites
dreadpirate 173 Posted January 23, 2017 2 hours ago, WurschtBanane said: Now i am using the SU-35 mod, and i asked the developer of it. He said the only way to remove a respawing SU-35s CAS capabilities is by putting T = [this] spawn { sleep 1; params ["_plane"]; _plane removeWeapon "js_w_su35_kh29Launcher"; _plane removeWeapon "js_w_su35_s8Laucher"; }; Into its init. I tried putting it into your INIT= param, but it did not seem to work... should it? The classnames are correct btw. EDIT: Also, planes with the FLYING attribute are only flying at 200m. Can that be changed? Try: 0 = [this, "FLYING", "INIT=", "T = [_proxyThis] spawn { sleep 1; params ['_plane']; _plane removeWeapon 'js_w_su35_kh29Launcher'; _plane removeWeapon 'js_w_su35_s8Laucher'; }; "] execVM "Jebus.sqf"; The flyInHeight script command doesn't seem to work properly, I'll see what I can come up with..... Share this post Link to post Share on other sites
WurschtBanane 11 Posted January 24, 2017 I put 0 = [this, "DELAY=", [600,1200], "FLYING", "INIT=", "T = [_proxyThis] spawn { sleep 1; params ['_plane']; _plane removeWeapon 'js_w_su35_kh29Launcher'; _plane removeWeapon 'js_w_su35_s8Laucher'; }; "] execVM "Jebus.sqf"; into the units init. It still has the agms and rockets when it spawns. TeTeTe told me that the su35/f18s loadout option is being looked at after the init, thats why he put in the 1 second wait. When not using ur script, T = [this] spawn { sleep 1; params ["_plane"]; _plane removeWeapon "js_w_su35_kh29Launcher"; _plane removeWeapon "js_w_su35_s8Laucher"; }; works fine. It must somehow be possible to remove the jets ag weapons after it spawned ffs,,, Trying to figure out this stupid detail for too long... Share this post Link to post Share on other sites
dreadpirate 173 Posted January 24, 2017 My mistake. Should be: 0 = [this, "DELAY=", [600,1200], "FLYING", "INIT=", "T = [vehicle _proxyThis] spawn { sleep 1; params ['_plane']; _plane removeWeapon 'js_w_su35_kh29Launcher'; _plane removeWeapon 'js_w_su35_s8Laucher'; }; "] execVM "Jebus.sqf"; Share this post Link to post Share on other sites
WurschtBanane 11 Posted January 24, 2017 Worked. Finally! Thanks for the help. When changing the spawning height works, please put that in the patch notes or something. Share this post Link to post Share on other sites
Imperator[TFD] 444 Posted February 9, 2017 Hey dreadpirate, sorry if this has been asked before but does the caching component of this script cache all units in a group? Or does it leave the leader active so that the group can continue on a patrol or other activity? Share this post Link to post Share on other sites
dreadpirate 173 Posted February 9, 2017 4 hours ago, Imperator[TFD] said: Hey dreadpirate, sorry if this has been asked before but does the caching component of this script cache all units in a group? Or does it leave the leader active so that the group can continue on a patrol or other activity? Current version just caches everyone, but I've had requests to implement "reduce to leader" instead and I can definitely see the merits of it. Just gotta get my coding mojo back..... 1 Share this post Link to post Share on other sites
Imperator[TFD] 444 Posted February 9, 2017 1 hour ago, dreadpirate said: Current version just caches everyone, but I've had requests to implement "reduce to leader" instead and I can definitely see the merits of it. Just gotta get my coding mojo back..... I know what you mean, I took a little hiatus from Arma a few months ago 'cos I lost the mission making mojo. But now it's back! Share this post Link to post Share on other sites