dreadpirate
-
Content Count
537 -
Joined
-
Last visited
-
Medals
Posts posted by dreadpirate
-
-
My mistake, try this:
[] spawn { for "_i" from 0 to 1000 do { _spawnpos = getMarkerPos "respawn_east"; _spawnpos = [_spawnpos, 1, 20, 3, 0, 20, 0] call BIS_fnc_findSafePos; _grp = [_spawnpos, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfTeam"),[],[],[0.25,0.4]] call BIS_fnc_spawnGroup; { removeAllAssignedItems _x; removeAllWeapons _x; removeAllContainers _x; _x addUniform "U_O_CombatUniform_ocamo"; _x addVest "V_BandollierB_khk"; _x addMagazines ["30Rnd_65x39_caseless_green", 3]; _x addWeapon "arifle_Katiba_F"; } forEach ( units _grp); _wp = _grp addWaypoint [getMarkerPos "moveMarker_east", 0]; _wp setWaypointType "SEARCHANDDESTROY"; _wp setWaypointSpeed "FULL"; sleep 60; }; };
-
[] spawn { for "_i" from 0 to 1000 do { _spawnpos = getMarkerPos "respawn_east"; _spawnpos = [_spawnpos, 1, 20, 3, 0, 20, 0] call BIS_fnc_findSafePos; _grp = [_spawnpos, EAST, (configfile >> ""CfgGroups"" >> ""East"" >> ""OPF_F"" >> ""infantry"" >> ""OIA_InfTeam""),[],[],[0.25,0.4]] call BIS_fnc_spawnGroup; { removeAllAssignedItems _x; removeAllWeapons _x; removeAllContainers _x; _x addVest "V_BandollierB_khk"; _x addMagazines ["30Rnd_65x39_caseless_green", 3]; _x addWeapon "arifle_Khaybar_F"; } forEach ( units _grp); _wp = _grp addWaypoint [getMarkerPos "moveMarker_east", 0]; _wp setWaypointType "SEARCHANDDESTROY"; _wp setWaypointSpeed "FULL"; sleep 60; }; };
_x is a "magic" variable that is used inside a forEach loop. So the first time the loop runs, it edits the first unit of the group, the second time the loop runs, it edits the second unit of the group and so on.....
-
I've decided to release 1.38 "as is" for people to try out.
v1.38 (2017/2/26)
- Vehicles will respawn in editor positions
- "REDUCE=" added. Reduces a group to just the leader until players are within range (infantry only)
Download
- 1
-
A quick update:
I have "reduce to leader" working for infantry only groups, just need to work on vehicles.
At present, it just hides and disables simulation on units, rather than completely despawning them. Not sure if that's the best way or not.
When they are activated, the other group members just teleport to the leader, which complicates things for vehicles.
I've made it so vehicles in groups respawn in their editor positions to avoid collisions (um, reduce collisions, it's still Arma).
However, that conflicts with "RESPAWNMARKERS=", so I'm still looking for a solution I'm happy with.
- 1
-
Just now, HeroesandvillainsOS said:Thanks I'll take a look. I appreciate it but I think I must be confusing you guys with my question. I don't need anything fancy, or need the player unit to be something specific. I just want to the player unit to spawn the same way the AI units do. They don't need any special codes so I don't understand why being the player makes the process different.
AFAIK, the profile identity always overwrites the editor identity, so you'll probably need to do it this way.....
-
Here's a demo mission that makes a BLUFOR unit look and sound like a CSAT unit.
Check out the description.ext and the init line of the unit.
It turns out you do need to setIdentity again on respawn, which is what the onPlayerRespawn.sqf does
https://drive.google.com/open?id=0B-gOD7yyJ9VJYmhhU2lCNWNmcTg
Look at all the identity options here:
https://community.bistudio.com/wiki/setIdentity
If you're using mods with different faces and voices, you'll have to find the classnames.....
-
26 minutes ago, HeroesandvillainsOS said:Ugh. I think I'm misunderstanding you. Faces have classnames? I just want to look like the unit classname. I'm sorry man but the wiki confuses me and an example of written functioning code would help me a lot.
You need to set an identity in your description.ext
https://community.bistudio.com/wiki/Description.ext#CfgIdentities
and then, in the player's init:
this setIdentity "myIdentity";
You might need to set the identity again if you respawn, not sure.....
-
-
54 minutes ago, Mr. Birdman said:@ dreadpirate Working great with UPS however can't get UPMONS to work now. Do you see any errors and does your script work with UPMONS ?
0 = [this,"DELAY=",300,"LIVES=",3,"INIT=","[_proxyThis,'UPSwater1'] execVM 'scripts\upsmon.sqf'"] execVM "Jebus.sqf";
Remember that for UPSMON, you have to add some lines to your init.sqf
Quote//Init UPSMON script
call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";I got it working on land, but I assume from your marker name you're using it on water?
When I used it with a boat, it spawned but just sat there.
When I used debug it said "MON_disembark started".
11 hours ago, Imperator[TFD] said:Caching all but the leader would be amazing as it would still allow random patrol scripts and functions to execute.
Yeah, I'll work on this for the next version.
- 2
-
38 minutes ago, Mr. Birdman said:attempted to use 0 = [this, "INIT=", "[_proxyThis, 'upswater1] execVM 'UPS.sqf'"] execVM "Jebus.sqf";
the boat will not move to upswater1. I put the code in the leader init and have the boat trigger. The boat spawns in but only sits a the spawn in site not movement towards the zone. help.
You are missing a single quote after upswater1
-
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
-
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";
-
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.....
-
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
-
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
-
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.....
-
1 hour ago, Trinket said:Thanks!
Would that also work for other types of vehicles with 3+ textures?
Just change texture to 0,1,2,etc. ?
Yes. I think some vehicles have 4 textures.
-
You're setting texture 0 twice. Try:
Quotethis SetObjectTexture [0,"plane_cas_01_ext01_co"];
this SetObjectTexture [1,"plane_cas_01_ext02_co"]- 1
-
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.....
-
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?
-
1 minute ago, Catchdog64 said:Is anything required in the activation field of the trigger?
No, just sync it to the SL and you're done.....
-
15 minutes ago, Catchdog64 said:I debugged the squad leader's init, and when I enter the trigger area I get a wall of text (which goes away before I can really see anything) and nothing spawns. I put 0 = [this, "DEBUG"] execVM "Jebus.sqf"; in the SL's init and the triggers activation.
You don't need to run JEBUS from the triggers activation, just the SL init
-
4 hours ago, Catchdog64 said:Now it's returning to much for me to catch at a time, unless there's somewhere to view an error that I don't know about.
You'll have to give more details on what you're trying to do because I'm not sure what's going on.
-
4 hours ago, Catchdog64 said:Keeps coming up with " Waiting for trigger activation"
If you want the group active at the start of the mission, just delete the trigger.
Otherwise, JEBUS will wait until the trigger condition is true before starting.....
Need help with a 'Wave spawn' script with custom loadouts
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
In my code, I have:
{ removeAllAssignedItems _x; removeAllWeapons _x; removeAllContainers _x; _x addUniform "U_O_CombatUniform_ocamo"; _x addVest "V_BandollierB_khk"; _x addMagazines ["30Rnd_65x39_caseless_green", 3]; _x addWeapon "arifle_Katiba_F"; } forEach (units _grp);
It's the forEach command at the end that uses the _x variable.....