#arma3_scripting
1 messages ยท Page 746 of 1
I believe it can also be found in the virtual arsenal from the main menu
just click the garage icon once you're in it
nto quite what i meant. im looking for the pylon editor thing
oh
i used it before but i cant remember how to get there
is it not in the right-click context menu?
of the #den editor?
yeah
im dumb
its been in the attreibutes
i cant read with a headache, sorry
is there any way i can copy the heli to a clipboard to use in a script
assign it to a variable, use the object's init field
HELICOPTER = this;
or assign it a variable name
ok so heres my dilema now. how can i attach missile_at_03_fly_f.p3d to a heli to act as a dummy rocket so i can detect if it is hit by a bullet to make it blow up to take the helicopter down in the mission that i am making
correction. if i create M_Scalpel_AT with create vehicle it creates A LIVE MISSILE and i dont want that. how can i make it an inert object?
it might not allow you to attach it to and move it with the helicopter
where did you get the model info?
sorry, model name
from the config veiwer
what vehicle fires it?
To ensure that the path generated by calculatePath is on the street, can I combine forceFollowRoad command with it?
["missile_at_03_fly_f.p3d","a3\weapons_f\ammo\missile_at_03_fly_f.p3d",true] @grim cliff
I just slapped ```sqf
this addEventHandler ["Fired", {
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
copyToClipboard str (getModelInfo _projectile)
}];
it also attaches and moves
unfortunately because it is a simple object it will not take damage
How would you even combine it? It's not possible
You have to create an agent yourself and issue the path to this agent instead, and use PathCalculated EH
@little raptor can i pushback the results of weaponitemscargo into the first slot of this array:
[[],[],["hgun_Pistol_heavy_01_green_F","muzzle_snds_acp","acc_flashlight_pistol","optic_MRD_black",["11Rnd_45ACP_Mag",11],[],""],["U_B_FullGhillie_lsh",[["FirstAidKit",3],["11Rnd_45ACP_Mag",3,11]]],["V_PlateCarrierGL_wdl",[["HandGrenade",2,1],["130Rnd_338_Mag",2,130]]],["B_Bergen_tna_F",[["Medikit",1],["optic_NVS",1],["HandGrenade",4,1]]],"H_HelmetO_ViperSP_ghex_F","",["Laserdesignator_03","","","",["Laserbatteries",1],[],""],["ItemMap","B_UavTerminal","ItemRadio","ItemCompass","ItemWatch",""]]
so that i can use results in setunitloadout
nevermind. i used the set command to pushback the items i need after filtering them through a switch.
in the interest of simplifying the cod, is there a way that i can flat out check if a weapon goes in your primary or tirtiary weapons slot
this code runs on Killed event so i want it to be seamless. currently just collecting the players weapons off the ground takes 33 lines and 901 characters
i want to know if i can cut about 20 of those lines
please somebody tell me that i can delete a body from a vehicle
Read what the documentation of the default command for deleting stuff says about that: https://community.bistudio.com/wiki/deleteVehicle
Anyone know how to disable Ace fall damage?
Thanks
Thanks
https://community.bistudio.com/wiki/BIS_fnc_taskDescription states that the return value's format is ["description", "title", "marker"] but i am getting [["description"], ["title"], ["marker"]]. can someone confirm and/or explain why it is a 2D array?
was thinking the same thing
Got a quick question, within an array say i have 3 classnames so [classname1, classname2, classname3] . Is there a way that for any given classname I can select between an arbitrary amount of classnames?
For example something like this [classname1 OR classname 2, classname3, classname4] so that way for the first element it'll pick between classname1 and 2, but the rest are un affected. For my purposes, simply adding another element is not desired.
You can use commands in arrays too.
[selectRandom ["class1", "class2"], "class3", "class4"]
hi guys, maybe a bit off topic question but i have no experience with game dev. Is it possible to read some info like vehicle speed or something like that from the game without need to somehow modify the game with mods?
what i mean is to process data with external software
all of this information is in vehicle configs which you can access internally as well
Do you mean current speed in game? Or just max speed of vehicle. To be clear i am thinking about making software to read values such as speed rotation and position of vehicles and translate that to visual representation on second monitor. For example when flying heli to show its current speed value with fancy graphics on second monitor.
you can do either
for vehicle max speed use:
(configFile >> "CfgVehicles" >> "vehicleClassNameHere" >> "maxSpeed") call BIS_fnc_getCfgData
for current speed use:
https://community.bistudio.com/wiki/speed
so you think this is possible to make? I have no experience with this so can this be done without affecting game so you can play on any online server without some type of mod?
hello, does anyone know if i can toggle the jump lights in an rhs c130 via script?
no its going to require an extension which will probably void battle eye. idk, haven't worked much with extensions
its possible yes, to send the information out of the game, but to get through battle eye is another issue
ok thank you for help
Excellent!
thank you
so what will you use?
well currently what i have in the debug console that IS NOT working:
player addEventHandler ["Killed", {
body = _this select 0;
[body] spawn
{
waitUntil { alive player };
body = _this select 0;
if (vehicle body != body) then [{
VBDY = vehicle body;
VCHK = VBDY getCargoIndex body;
if (VCHK != -1) then {
VBDY deleteVehicleCrew body;
};
},{};
}
];
why do you have a random {}; in there?
also, don't use global variables like body in this. use private _body = blah
i know, im useing global variables so i can watch what the return is from the debug console while i get this working
its the other end of the if statement where i will be filling in code to reposition the player
the , {}; is what is throwing the error
are you using a linter to look at your code?
cause that's what its throwing for me
this addEventHandler ["Respawn", {
params ["_unit", "_corpse"];
if (vehicle _corpse != _corpse) then
{
vehicle _corpse deleteVehicleCrew _corpse;
}
else
{
deleteVehicle _corpse;
};
}];
yeah i had that part but i stripped it so i could focus. im high functioning autis, so extra stuff in what im tying to work out is extra noise that make it difficult for me
so vehicle _corpse returns the same as corpse.
so i loed up a command i read a while ago called objectparent.
and now the vehicle is returned
so i can use delete vehicle crew.
if the player is not in a vehicle the return is <Null-object>
not if in a vehicle
but correct, you can use isNull objectParent _corpse
thanks i was going to ask that.
Why do you even use that error prone syntax?
Just use else
Could anyone help me with a equipment randomizing script?
gotta love when the official arma discord doesn't have answers
what you got so far?
or have you not started yet?
Thing is, I don't know much about (next to none) scripting, but I got an idea about what kinda thing I'd like to do
do you want someone to do it for you? or do you want to learn it. Either is okay.
Kinda prefer the first to be honest
ill give you a framework but you'll have to edit what you want in it tho. about to head to dinner though.
Aight, sounds good :)
are you just wanting this for weapons? or what else
Can someone please help me with a flight record path script thing i'd really like some help, and is there a way to show the script without filling up the entire chat cause its a bit long? The error that pops up is as follows
'...= _this select 1;
_totalFrames = (count |#|_capturedFireData);
and theres more code but i dont think its relevant
That's the error position, but what's the error message?
you mean the text that appears after it? sorry i dont usually mess around with this stuff.
_startedTime = time...'
Error Undefined variable in expression: _capturedfiredata
File A3\function_f\scenes\fn_UnitPlayFiring.sqf..., line 36
that it?
I'll need the link to your script on sqfbin first so I can look at it ๐
like a link to the sqfbin with my code
sorry that wasnt right
give sec let me figure out how this works
How To Use Enter or paste your code, click "Save", and then copy the URL. Send that URL to someone and they'll see what you see. To make a new entry, click "New" (or press 'CTRL + N' on your keyboard).
You forgot an underscore here (it should be _firingdata):
[heli1, firingdata] spawn BIS_fnc_UnitPlayFiring;
Having problems with editable objects, trying to remove a list of objects for each curator. It does nothing.
removeObjects = {
{
_x removeCuratorEditableObjects [[objects],false];
} foreach curators;
};
this is just defining a function. did you call the function?
I do call removeObjects under a onEachFrame. I know that portion works because my other functions call just fine
I can send it all, just figured it would fill up the chat
```sqf
// your code here
hint "good!";
```
โ
// your code here
hint "good!";
please use
FrameTick = 150;
frameCounter = 0;
grab_allCurators = {
curators = allCurators
};
grab_editableObjects = {
_list = entities [["Man"], [], false, true];
men = _list select {side _x == east};
{
objects = curatorEditableObjects _x;
systemChat (format ["%1",men]);
objects = objects - men;
systemChat (format ["%1",objects]);
} foreach curators;
};
removeObjects = {
{
_x removeCuratorEditableObjects [["tMap"],false];
} foreach curators;
};
debug = {
{
_x removeCuratorEditableObjects [[objects],false];
} foreach curators;
};
onEachFrame {
frameCounter = frameCounter + 1;
if (frameCounter >= FrameTick) then{
call grab_allCurators;
call grab_editableObjects;
//call removeObjects;
call debug;
frameCounter = 0;
};
};
thanks
what is "tMap"
that was a quick test, I named an object tMap to see if I could remove just it. It didnt work. In that code example there im not actually calling removeObjects, but I am calling debug which has identical code apart from the tMap bit
is it possible that zeus ehanced or achilles or something is interfering with it?
I know one of those mods let you right click and add/remove editable objects, but I cant imagine its adding them every frame or something. So I dont see how that would interfere with it
good night, how are you?
I'm having a hard time putting some weapon codes in my script, can you tell me if the weapon names are correct and up to date?
https://community.bistudio.com/wiki/Arma_3:_CfgWeapons_Weapons
Anyone out there who can help me with my script please call me! thanks
well i got it working. i like it. it does everything i need it to do
player addEventHandler ["Killed", {
_body = _this select 0;
[_body] spawn
{
waitUntil { alive player };
_body = _this select 0;
removeAllWeapons player;
removeAllItems player;
removeAllAssignedItems player;
removeUniform player;
removeVest player;
removeBackpack player;
removeHeadgear player;
removeGoggles player;
_testarray = getunitloadout _body;
{
Content1 = weaponsItemsCargo _x select 0;
Content2 = Content1 select 0;
Content3 = Content2 call bis_fnc_itemtype;
switch (Content3 select 1) do {
case "AssaultRifle";
case "Rifle";
case "SniperRifle";
case "MachineGun";
case "SubmachineGun";
case "Shotgun": {
_testarray set [0, content1];
};
case "Launcher";
case "MissileLauncher";
case "RocketLauncher";
case "GrenadeLauncher": {
_testarray set [1, content1];
};
default {""};
};
} foreach nearestObjects [_body, ["WeaponHolderSimulated"],5];
player setUnitLoadout _testarray;
if (!(isnil {objectparent _body})) then [{
_vbody = objectparent _body;
VCHK = objectparent _body getCargoIndex _body;
if (driver _vbody == _body) then {
objectparent _body deleteVehicleCrew _body;
player moveInDriver _vbody;};
if (Commander _vbody == _body) then {
objectparent _body deleteVehicleCrew _body;
player moveInCommander _vbody;};
if (gunner _vbody == _body) then {
objectparent _body deleteVehicleCrew _body;
player moveInGunner _vbody;};
if (VCHK != -1) then {
objectparent _body deleteVehicleCrew _body;
player moveInCargo [ _vbody, VCHK];
};
},{
player setposatl [getPosATL _body select 0, getPosATL _body select 1, getPosATL _body select 2];
player setdir getDir _body;
deleteVehicle _body;1
}];
player setUnconscious true;
player setCaptive true;
player setDamage 0.9;
player allowdamage false;
}
}
];
Hi!
Sorry to bother everyone but does anyone know any ideas on how to have an enemy group spawn with a waypoint once a blufor unit has entered a trigger area?
I wanna have it so after you talk to an informant he sets you up and you're ambushed.
you could just set a group to be invisible with simulation disabled in the editor
and in the trigger field set to server only and write
{
_x enableSimulationGlobal true;
_x hideObjectGlobal false;
} forEach units _grp;
this will make every unit in the group _grp appear and carry out whatever waypoints they have
what do you mean? its going to take every unit in the group and iterate through the two commands
any ideas why waituntil is barfing out a genirc error for anything i put in it?
waitUntil { stance player == 'prone' };
21:19:56 Error in expression <"lefthand"];
waitUntil { stance player == 'prone' };
detach shield;
shield set>
21:19:56 Error position: <== 'prone' };
detach shield;
shield set>
are you in a scheduled environment?
is the debug console a scheduled environment?
no, not unless you use leo's mod
.....
so you'll have to spawn it
let me guess.... while loops are scheduled too
well, not necessarily, but they are typically in scheduled
they have an iteration cap when they are in non scheduled
just wrap your code in a spawn
if you want to use debug
or use Leo's Advanced Developer Tools mod
and hit the start in scheduled button
if i use, say.....
[player, _object] spawn {
params {"_player","_object"};
some code here
waituntil { stance player == 'prone' };
some more code
};
would this get my rocks in any environment?
you want waitUntil {stance _player == 'prone'};
since you already are feeding it in there elsewhere
but yes, that's a correct way to spawn it for your debug menu
params needs []
not {}
@grim cliff
thanks
player addEventHandler ["Respawn", {
params ["_unit", "_body"];
removeAllWeapons _unit;
removeAllItems _unit;
removeAllAssignedItems _unit;
removeUniform _unit;
removeVest _unit;
removeBackpack _unit;
removeHeadgear _unit;
removeGoggles _unit;
_testarray = getunitloadout _body;
{
Content1 = weaponsItemsCargo _x select 0;
Content2 = Content1 select 0;
Content3 = Content2 call bis_fnc_itemtype;
switch (Content3 select 1) do {
case "AssaultRifle";
case "Rifle";
case "SniperRifle";
case "MachineGun";
case "SubmachineGun";
case "Shotgun": {
_testarray set [0, content1];
};
case "Launcher";
case "MissileLauncher";
case "RocketLauncher";
case "GrenadeLauncher": {
_testarray set [1, content1];
};
default {""};
};
} foreach nearestObjects [_body, ["WeaponHolderSimulated"],5];
_unit setUnitLoadout _testarray;
if (!(isnull objectparent _body)) then {
_vbody = objectparent _body;
VCHK = objectparent _body getCargoIndex _body;
if (driver _vbody == _body) then {
//issue is here
_unit moveInDriver objectparent _body;
objectparent _body deleteVehicleCrew _body;
};
if (Commander _vbody == _body) then {
objectparent _body deleteVehicleCrew _body;
_unit moveInCommander _vbody;};
if (gunner _vbody == _body) then {
objectparent _body deleteVehicleCrew _body;
_unit moveInGunner _vbody;};
if (VCHK != -1) then {
objectparent _body deleteVehicleCrew _body;
_unit moveInCargo [ _vbody, VCHK];
};
};
_unit setposatl [getPosATL _body select 0, getPosATL _body select 1, getPosATL _body select 2];
_unit setdir getDir _body;
deletevehicle _body;
}
];
having an issue with this..... _unit wont get in as driver and there is no error in the .rpt
same for commander and gunner
is it just me or is attachtorelative super buggy
i don't remember it being this buggy, and it causes a lot of lag too
Depends what you attach to what
Also the farther the attached object, the more visible the movement gap (if that's what you mean by "lag")
anyone know a script so I can make a Vehicle more resistant? especially to AT. im trying to make a titanfall mission but the titans die in one hit from AT. As well im using Ace3 if it matters.
Preferably i would like maybe 6-8 shots to take it down as they are supposed to be menacing.
pls ping me if so XD
you can use the handleDamage EH and reduce the resulting damage
Ive been tryin but i cant rly figure it out, only guide i found was for player dmg
same goes for everything else
_unit setposatl [getPosATL _body select 0, getPosATL _body select 1, getPosATL _body select 2];
why?? just do
_unit setPosATL getPosATL _body
Content1
Content2
Content3
VCHK
all these global vars can be local
Commander
gunner
these are specific seats. general seats in arma are driver, cargo, and turrets (turrets include gunner, commander, and FFV).
_unit wont get in as driver and there is no error in the .rpt
you have to remove the bodies first
removeAllWeapons _unit; removeAllItems _unit; removeAllAssignedItems _unit; removeUniform _unit; removeVest _unit; removeBackpack _unit; removeHeadgear _unit; removeGoggles _unit;
why do you waste so much performance when you're doingsetUnitLoadoutafter?
@little raptor is there some way you can use your Dev tools in the map view and set a global keybind for it to appear? Not sure if I'm missing something potentially obvious there
Nvm, grabbed my glasses and miraculously the "Console Shortcut key" option started showing up under the advanced tab ๐
the shortcut only works in the main game (it's added to Display 46) 
I suppose it doesn't hurt to add it to display 12 as well
Would be nice to have debug console in briefing.
It might not be 12 despite being a map too.
it also works in map ๐
"It just works" when unexpected is always nice
To be fair... its not perfect (Cant drag the map around and all that) but its good enough for what i need so no worries. Map doesn't block IDD 46 keybinds
Just use modded keybinding ree
I don't thing they will
unlike CBA keybinding, modded keybinding needs config modification
Is there a forum or somewhere I can request help building a script?
Spent too many hours trying different things, so I need some help with it.
#creators_recruiting ๐
CBA's keybinding offers combos with ctrl, shift and alt, whereas the modded keybindings don't, do they? I checked during on the 2.06 dev branch and couldn't get it to work with a combo of ctrl+alt+anyKey, but I might have done it wrong.
modded keybinding supports all combos plus joystick and analog input, it supports all that vanilla supports
Appreciate that!
btw where are modded keybindings saved? profileNamespace? or arma3.cfg or something?
@limber aurora if you post some stuff here about what you're having issues with I can help out
just ping me w/ it
@brazen lagoon will do!
are there any easy ways to determine if a classname is a backpack?
I think there is isBackpack=1 config entry?
isKindOf "Bag_Base"
or isBackpack=1 entry in CfgVehicles
dunno, look on wiki
yes you can
there's also https://community.bistudio.com/wiki/BIS_fnc_itemType
initplayerlocal.sqf
i want to transfer from virtual arsenal loadout system to ace arsenal on my mission
[missionNamespace, "arsenalClosed", {
profileNamespace setVariable ["Saved_Loadout123",getUnitLoadout player];
saveProfileNamespace;
hint "Selected gear saved!"
}] call BIS_fnc_addScriptedEventHandler;
onPlayerRespawn.sqf
_plr setDir (player getDir centerZONE);
0 = [_this select 0] spawn {
params [["_player",objNull,[objNull]]];
waitUntil {sleep .2; alive _player};
_player setUnitLoadout (profileNamespace getVariable ["Saved_Loadout123",[]]);
player setUnitLoadout (player getVariable "Saved_Loadout123");
};
so i change "arsenalClosed" to "ace_arsenal_displayClosed" and some error present, scipt don't working
Question. Instead of using thisList (returns everyone inside the trigger) how can I return just the players in the player's group?
_playersInThisList = []
{
if (isPlayer _x) then {_playersInThisList pushBackUnique _x}
} forEach thisList;
something like this?
select
Here, some context will probably help us. What I have now is
call{_loadoutWeightsInfo = thisList apply { format ["<t align='left' color='#BADA55'>%1: </t> <t font='PuristaMedium' size='.8' align='left' color='#32CD32'>%2</t> <t font='PuristaMedium' align='left' size='.7' color='#696969'> %3lbs</t>", name _x, roleDescription _x, (round ((loadAbs _x) * 10)) / 10 ^ 2] };
_loadoutWeightsInfo joinString "<br/>"};
But this lists all players inside the trigger area. I want each player to only see the other players that are in their group. I hope that makes sense.
Then I take that and turn it into a hint, but that part is irrelevant lol
you can simply add a select {group _x == group player} after thisList
For real?? I'm going to give it a try and get back to you in about 15 mins
Thank you
good to know thanks
what error
no error in rpt, just previous loadout doesn't load
ace doesn't use BIS scripted EHs
That worked perfectly!
Hi! Can I create ropes with different 3ds for each? I had seen the possibility in a changelogue, or I misunderstood
https://community.bistudio.com/wiki/ropeCreate you can change the ropeStart, End and parts
Hi, i need a helmet with heli extraction
I want to make a heli whitch could take me whenever I am to point on map, like arma 2 red harvest campaign
Enyone know how can I do?
What do you mean by a helmet in this context?
You could add an AI pilot to the heli, and when you get in, have some kind of option to select which point you want to go to, then add a waypoint/task for the pilot's group to go to that location and drop you off
I want to make much more clean, I don't want to have a pilot in my team
Anyone aware of a way to attach items to a tanks turret?
Similar to the attachToRelative function but turning with the turret. I'm not too fussed about it elevating with the gun though.
how do you want to mark the extraction? You could write a function to create a invisible helipad and mark a waypoint like mcoffin said
I want to use a map to create extracion
that can be complicated
someone else can probably give you a better method, I would add a custom radio "extract" line, then create a function so that when the unit that used the radio call clicks on the map a marker is placed and the helicopter comes and lands
this would take some effort regardless of how you go about it
anyone able to give me some insite into the incoming missile event handler, we used to thing it was always called twice so we cancelled one of them, but recently are having issuies were its anyware from 1-3
i have this code in a condition statement for an addaction
vehicle _this == _this && alive _this && lifeState cursorObject == 'INCAPACITATED' && group _this == group cursorObject && _this distance2D cursorObject <= 2.5 && ((typeof _this) == 'B_medic_f' && !('Medikit' in itemcargo _this))
and it works just fine, until i add the last part that is in the ()
is there any way that i can check to make sure that the medic doesnt have a medikit while still having the players that are not medics be able to use the action too?
(
((vehicle _this) == _this) &&
(alive _this) &&
((lifeState cursorObject) == 'INCAPACITATED') &&
((group _this) == (group cursorObject)) &&
((_this distance2D cursorObject) <= 2.5) &&
((typeof _this) == 'B_medic_f') &&
!('Medikit' in (itemcargo _this))
)
does this work?
So this works just fine. It's in the init of a crate. But rather than have to name multiple crates and change the variable name in this code (supply1, supply2, etc), is there instead a generic way to write this so I could make an unlimited number of crates with the same code? I tried replacing supply1 with this but it didn't want to work. =)
addMissionEventHandler ["Draw3D",
{
if (supply1 distance player > 2) exitWith {};
if ([supply1, "VIEW", player] checkVisibility [eyePos supply1, eyePos player] < 0.3) exitWith {};
drawIcon3D ["", [1,1,1,1], visiblePosition supply1 vectorAdd [0,0,.3], 0.2, 0.2, 45, "Supply", 2, 0.03, "PuristaMedium"];
}];
create an array of crates and feed it to the handler via a variable
and then iterate through it
Unfortunately there's no straightforward way to, say like โsupplyXโ (there actually is tho). What Hypoxic says, also this won't work in a EH
Thank you!
I have a set of points and I would like to calculate a smoothed line passing through them. How can I do this?
Smoothed, like bezier?
Yes
thanks
From the top of my head:
Player-launched projectiles: It only fires for guided missiles that have locked onto the target.
AI-launched projectiles: It fires when the AI launches a guided or unguided projectile aimed for the target vehicle. After the launch of a guided missile by AI it usually fires twice: Once for the AI launching the missile and once for the missile locking on.
Hey guys, so i've created a rope from vehicle to my character code:
myRope = ropeCreate [veh, [0,0,0], me, "lefthandmiddle1"];
ropeUnwind [myRope, 3, 50, true];
me enableRopeAttach true;
and somehow my character is with the rope much faster than without. Any fix?
Use the follow bone parameter of attachTo command
riiight, and use a memory point like one of the below?
"MainTurret",
"mainTurret",
find the right bone probably
oh yes memory point
Thx dude ๐
Iโm learning scripting I got a helicopter crash but the one thing I want is smoke and fire effects anyway to add this?
Hey I am curious if it would be possible to change the description.ext during game to change respawn=3; to respawn=1;
you can handle your own respawn with onPlayerKilled and onPlayerRespawn scripts
trying to spawn a drone a bit above a position, but
_veh=
createVehicle ["B_UAV_01_F", [(getPosATL _this) select 0, (getPosATL _this) select 1, ((getPosATL _this) select 2) + 10], [], 0, "FLY"];
};
``` throws
```Error in expression _veh=
createVehicle ["B_UAV_01_F", [(getPosATL>
Error position: _veh= |#|createVehicle ["B_UAV_01_F", [(getPosATL>
Error Type Any, expected Number```.
Far as i can tell this is correct syntax, can anyone see/tell me what i'm missing?
_this is not defined
its being called from another object, shouldn't it be?
weird. guess _this isnt availeable here then. huh. thanks!
depends how it's called and from where
any commands to determine what the current target for an AI unit is?
could someone check on this code real quick?
{[objNull, _x] call ace_medical_treatment_fnc_fullHeal} forEach thisList
i am trying to get it to heal anyone who enters the trigger zone, but it's not doing so
I donโt use ace much but couldnโt you use
setDamage 0;
^ no
you need to use [object] call ace_medical_treatment_fnc_fullHealLocal on the local client
Has anyone ever used: https://community.bistudio.com/wiki/onBriefingPlan ?
Couldn't get it to work. There's no documentation on the BIKI, nor any mention of it (in Arma 2) on the BI forums.
Not even sure if it works at all
Most likely this is just for Operation Flashpoint
What exactly is your goal?
My aim is to have players listen to the briefing, instead of having to read a block of text.
I've made a soundfile that narrates part of the briefing. And I'd like to play it, preferably, when the player clicks the appropriate briefing (eg Mission, Situation, Notes).
Any help with trying to merge these two together? The objective is to have the obj complete with the text to show as well in system chat.
this addAction ["Inspect", {
params ["_object","_caller","_ID"];
["task1","SUCCEEDED"] call BIS_fnc_taskSetState;
_object say3D "01";
}];
this addAction ["Interact", {systemChat (selectRandom
[ "Text1", "Text2", "Text3", "Text4" ])},
nil, 1.5, true, true, "", "alive _originalTarget", 4, false, "", ""];
This of course in a MP Dedicated setting (although I suspect whatever the script is, can easily run initplayerlocal)
Is there any way to draw custom overlay in Zeus view, like is done for Squads/Teams (line and e.g. BLUFOR icon on top)? I could not find any information on whether this is possible using a mod/script and what to hook into, I'd appreciate any pointers
hello people I have an addaction on a laptop that switches off the lights in the ship for the briefing
but that apparently doesn't work in multiplayer
I found no examples on how to execute a .sqf file with addaction in a way that it works globally on a server
ยดยดยด
this addAction ["<t color='#FF0000'>On</t>",{player execVM "ln.sqf";}];
this addAction ["<t color='#FF0000'>Off</t>",{player execVM "lf.sqf";}];
ยดยดยด
this is what is what in the init now, how do I make that work in multiplayer?
I don't get how it works
with addaction
https://community.bistudio.com/wiki/addAction
addAction article has more straightforward example, see Example 3
tldr: remoteExec and remoteExecCall do some scripts in every connected computers (you can adjust the range if you need to)
sorry to butt in,
having a blank here,
How to efficiently determine the number of specific items a player has?
tried,
_intelCount = {_x isEqualTo _intelItems} count _playerInv;```
```sqf
_intelCount = {_x in _intelItems} count _playerInv;```
_intelItems is an array of classnames
what's the issue exactly?
you're adding the action to this which makes me think init fields(which are run on every machine already), do you want to run the execVM on every machine or what?
[this, ["Lights on", { execVM "lo.sqf"; }]] remoteExec ["addAction"];
would putting this on the init of the object work?
the lo.sqf turns on the specific lights
i just told you it's useless
you'd add 5 actions for every player if server had 5 players
what do you do in the sqf file exactly?
l1 switchLight "ON";
l2 switchLight "ON";
l3 switchLight "ON";
l4 switchLight "ON";
l5 switchLight "ON";
l6 switchLight "ON";
l7 switchLight "ON";
l8 switchLight "ON";
l9 switchLight "ON";
then lf is the same but with off
so remote exec the execVM
I get generic error in expression
not the addAction
but I wanna exec the file with a scrollwheel action
what is _playerInv?
so? it's fine
items player
i don't see anything wrong then ๐ค
the same way you did with addAction, but instead execVM
see pinned messages, #arma3_scripting message
[this, ["Lights on", { addAction; }]] remoteExec ["execVM ln.sqf"];
no, don't make stuff up
you just have to edit the execVM part in your initial code
look at the message link i sent, example with unary command
neither
Thanks for trying ๐คฃ
error is elsewhere probably
script runs fine if I just do {_x == "Item_Radio"} count _playerInv;
๐คทโโ๏ธ , so quite confused
_intelItems is an array of classnames
are you sure then?
_playerInv = items player;
_intelItems = ["ACE_Banana", "ACE_morphine"];
if ( _intelItems findIf { _x in _Inv} > -1) then {
hint str _inv;
_intelNum = (_x in _intelItems) count _playerInv;
systemChat (format ["You have %1 intel items to handover", _intelNum]);
} else {
systemChat "You have no intel items to handover";
};
(_x in _intelItems) count _playerInv
BOOL count ARRAY does not exist https://community.bistudio.com/wiki/count
this addAction ["<t color='#FF0000'>On</t>",{[player, "on"] remoteExec ["execVM ln.sqf ", player]; }];
like this?
[player, "on"] execVM "file.sqf" >
[[player, "on"], "file.sqf"] remoteExec ["execVM"]
or, for example, unary execVM
execVM "file.sqf" >
"file.sqf" remoteExec ["execVM"]
this addAction ["<t color='#FF0000'>On</t>",{[[player, "on"], "file.sqf"] remoteExec ["execVM"], player]; }];
?
file.sqf was literally an example, it's supposed to be whatever file you want to execute
also you said that your script just switches lights, so passing arguments is completely useless as they don't get used
so you can get rid off them
I just assumed I needed to fill the arguments with something
no
https://community.bistudio.com/wiki/execVM as you can see it has two syntaxes
the alternative takes no arguments, arguments passed to the script (on the left)
this addAction ["<t color='#FF0000'>On</t>",{"file.sqf" remoteExec ["execVM"];}];
so it is as simple as this then?
no
originally you had: player execVM "ln.sqf";
we've found out that you don't need to pass arguments
which means, execVM "ln.sqf";
then we need to remoteExec this
execVM "file.sqf" >
"file.sqf" remoteExec ["execVM"]
so
"ln.sqf" remoteExec ["execVM"]
i really hate just giving straight solutions to people, as this usually doesn't make them learn anything ๐
but hope you understand all of that
I understand why, I coach people a lot
just need to put both of my braincells together and process this for a second
Result:
0.0646 ms
Cycles:
10000/10000
Code:
_Inv = Magazines player;
_intelItems = [
"FlashDisk",
"SecretDocuments",
"SecretFiles",
"Files",
"Laptop_closed",
"Money",
"ItemRadio",
"Wallet_traitor",
"SatPhone",
"SmartPhone",
"MobilePhone"];
if ( _intelItems findIf { _x in _Inv} > -1) then {
_a = {_x == "FlashDisk"} count _Inv;
_b = {_x == "SecretDocuments"} count _Inv;
_c = {_x == "SecretFiles"} count _Inv;
_d = {_x == "Files"} count _Inv;
_e = {_x == "Laptop_closed"} count _Inv;
_f = {_x == "Money"} count _Inv;
_g = {_x == "SatPhone"} count _Inv;
_h = {_x == "SmartPhone"} count _Inv;
_i = {_x == "MobilePhone"} count _Inv;
_total = _a + _b + _c + _d + _e + _f + _g + _h + _i;
systemChat (format ["You hand over %1 Intel items.", _total]);
} else {
systemChat "You have no intel items to handover!";
};```
It ain't pretty but it works, I'm sure there's a more line efficient method, but I'll leave that for a later date
?
use in
(_x in _intelItems) count _playerInv you used wrong brackets here, your left argument evaluates into a boolean, not code
Hi, having trouble with the following:
null = Stone addAction
["<t color='#FF0000'>START MUSIC!</t>",
{playSound3D [getMissionPath "sfx\Music.ogg", [S1, S2, S3, S4, S5, S6, S7, S8, S9, S10]]; Stone removeAction (_this select 2);}]
spawn BIS_fnc_MP;
I'm not getting any errors, the description.ext is sound:
//Custom Sounds
class CfgSounds
{
sounds[] = {};class Music { name = "Music"; sound[] = { "sfx\Music.ogg", 10, 1, 100}; titles[] = {}; };};
and the folder in the mission file and the file are named correctly and in the correct .ogg format.
For some reason when the addAction is activated, nothing happens...
Not even RPT? Many people (including me) make errors with the play3D command. But you don't always get ingame feedback. The startup parameter -showScriptErrors (check the box in the launcher) also helps.
I didn't have that on, let me restart real quick
What you wrote is wrong
what is wrong?
1st of all what on earth is that BIS_fnc_MP?
2nd of all, as far as I remember the playSound3D syntax, yours is wrong
the same as remoteExec and remoteExecCall
I know what it is
What you wrote is wrong
care on being more specific?
As for the Syntax, I'm using what's available on the biki as a template
nope
And again, didya open the RPT file when you fired it in Eden Editor Debug console?
where do I find the rpt?
what? where on the wiki do you see something even remotely like that?
the syntax is wrong
as for BIS_fnc_MP, you're doing: Stone addAction [...] spawn BIS_fnc_MP
which is wrong

geez...
playSound3D [getMissionPath "sfx\Music.ogg", [S1, S2, S3, S4, S5, S6, S7, S8, S9, S10]];
the syntax is:playSound3D [string, object, ...]
not playSound3D [string, array], which is what you have
it's not supposed to be an array, it's supposed to be multiple objects
I'd rather help from someone else, you're not even trying to be constructive.
still looking for it, give me a minute. Sorry
i guess insulting people that use their time giving you tips about solving your problems is never the right way.
if he wouldnt try to help you he wouldnt even talk to you
being insulting isn't helpful either.
my friend you are the one insulting others and no one else here
doesnt make a good impression of you
I don't think it's that black and white. But if people wanna talk anything else than scripting, we'll go to another channel.
You find the RPT yet?
no, sorry. I've never done that before so I haven't even found the debug console yet
I did enable the log thing in the launcer, like you said
Ha! Bub, you are jumping into the deep end with playing sounds and multiplayer scripting.
quickest way to learn, right?
lol, true
I've never had to use the debug before because usually I'd have a friend help me
but he's on deployment so I can't really ask him anymore
is the debug the console when I run the mission and press esc?
Before bumping into other people on this channel and getting another headup from the wizards, I'd recommend two sources for popular things (like ingame sounds)
- Youtube
- The BI forums (for example code you can copy+paste)
Sorry about the timing but I gotta run. Goo dluck
yeah... I'll keep searching
thanks
thanks for the time
yeah debug console and unit init are the ways to go iirc
otherwise @mystic shell there are a few interesting links and so on in the pinned messages if you havent seen them yet
exactly. using the debug console will most likely end in some more scripting and sqf is the way to go for that
I want to attach a "Killed" event handler to any OPFOR unit, no matter how it was spawned in (MP; Zeus can spawn, scripts may spawn). What is the best way to go? One solution I tried was using a loop every couple of seconds, getting all units via units opfor, but that would repeat the event handler addition on all non-new units. I could not find unique IDs or similar for non-player units.
Why not check the side of the killer in the event handler?
Sure, also possible, but I still first need to attach the event handler exactly once to every unit (or am I wrong and they would overwrite and not execute multiple times?)
if you use CBA you can use its extended event handlers
if not, you can keep doing what you do. to prevent duplicates, store a variable on the unit. see getVariable and setVaribale
you might want to use MPKilled. Killed doesn't fire when unit changes locality
Ah thanks, I had not thought about get/setVariable in this context. And of course you are right, I need to use MPKilled. Very helpful! ๐
how long does it take to learn scripting? or just to learn and create 1, or 5 working scripts?
Depends on how good you are at learning and what prior experience you have
between an hour or two, and weeks (including hospital visit because you banged your head against your table too hard)
Also "1 or 5 working scripts" is so unprecise. What scripts?
A script can be a one-liner teleport player to other position script. Or a 2000 liner MP gamemode.
lifetime.
player setDamage 1
```do it 5ร and you're good to go
I can not find any functionality related to this, I guess it is an engine feature? I would have liked to draw group health information on top of the group icons
it is possible via RscTitles
Do you know of any mod using that of the top of your head? I will dive deep, thank you!
no
if you've ever created GUIs before the basics are the same
I did, but I have no mental model of how to have an element "connected" to an on-screen element (do I have to move/set position or is there a mechanism), instead of having it static on screen
you have to create the controls dynamically, probably as RscProgress, and move them with ctrlSetPosition
you can convert world coords to screen coords via worldToScreen
Okay, that makes a lot of sense actually. Will try!
what's the way of programmatically get units in an existing trigger?
list _trigger/thisList
thanks list seems usable. I wonder how you would use the magic variable in a script since the wiki does not really state if thisList can be directed towards a specific trigger
thisList is only available inside trigger activation statements (set in eden or via script)
Hmm.. I've been trying to have a trigger condition with OR value, so the trigger can activate when any of the three variables (units) are present. I put:
(sl1 in thisList OR sl2 in thisList OR sl3 in thisList) and also tried it without the () and with two | instead of "OR". Isn't working
Any clues? Probs something very basic
Can I use BIS_fnc_stringToMarker in Eden?
have you set the trigger activation?
also using inAreaArray might be faster here
this && {count ([sl1, sl2, sl3] inAreaArray thisTrigger) != 0}
what's the point? 
getting players to mark things in-game and seeing/editing them in 3den
part of a persistence script I made, trying to make it into Eden to change the procedures a bit
As I'm bound to a dedicated server and cannot save operations, and it's cool to be able to change the progress or adapt the mission to it in Eden
well I still don't get the use case, but you can test it. I doubt it'll work tho
you might see the marker in Eden, but not in mission
That makes sense
you can write your own script based on that function that works in 3den
allUnits inAreaArray thisTrigger
Does anyone know of a way to ignore weight carry limit with ACE?
Found a function that does excatly what I'm looking for
[_resupplyCrate, true, [0,2,1], 0, true] call ace_dragging_fnc_setCarryable;
Revisiting this, I cant seem to figure out whats wrong with it. Its grabbing all the editable objects for each curator, then subtracting anything with the class "Man" and then it should be removing the objects from the list of editable objects, but the objects remain editable via zeus.... Any help is greatly appreciated. So far all I can think of is a conflict with Achilles or eden enhanced or something
FrameTick = 150;
frameCounter = 0;
grab_allCurators = {
curators = allCurators
};
grab_editableObjects = {
men = entities [["Man"], [], false, true];
{
objects = curatorEditableObjects _x;
systemChat (format ["%1",men]);
objects = objects - men;
systemChat (format ["%1",objects]);
} foreach curators;
};
removeObjects = {
{
_x removeCuratorEditableObjects [[objects],true];
} foreach curators;
};
debug = {
};
onEachFrame {
frameCounter = frameCounter + 1;
if (frameCounter >= FrameTick) then{
call grab_allCurators;
call grab_editableObjects;
call removeObjects;
//call debug;
frameCounter = 0;
};
};
Unfortunately that doesnt seem to be it, it looks like that line was working correctly even without the ; which is weird...
The systemChats I use in this code both output the correct data, so I know the items are added to objects correctly
also the _objects will only contain the objects of the last curator in the array
hmm thats true, I only have one curator right now so that shouldnt affect it for the time being. If a curator adds an item to editable objects, doesnt it get added for all curators? Making the list the same?
as far as im aware its local otherwise you could just do
objects = curatorEditableObjects _x#0;
^what does the #0 do?
selects the 1st index in the array
here
FrameTick = 150;
frameCounter = 0;
grab_allCurators = {
curators = allCurators;
men = entities [["Man"], [], true, true];
{
objects = curatorEditableObjects _x;
objects = objects - men;
_x removeCuratorEditableObjects [objects,true];
} foreach curators;
};
onEachFrame {
frameCounter = frameCounter + 1;
if (frameCounter >= FrameTick) then{
call grab_allCurators;
frameCounter = 0;
};
};
that will work with multiple curators
that being said that would need to be initialized local on all clients with curator
Im not familiar with scripting for servers, I know some things can be different. Why does it have to be initialized local?
because the grab_allCurators will only be local to were it was init
1 sec
changed it
you can stick that anyware and that should work
making the function public makes it work for calling on the server?
if you stick that script in the mission init that should work for all curators
or anyware really
it makes the script available to all players
And it would work on a dedicated server for example?
actualy you dont evan need that bit
stick it in the mission inti should work
this script itself isint that intensive either you could have that run every frame
Thanks for your help, im making these in singleplayer and then will be converting it to work in a multiplayer environment. Now I just gotta figure out why the actual script isnt working haha
grab_allCurators = {
curators = allCurators;
men = entities [["Man"], [], true, true];
{
objects = curatorEditableObjects _x;
objects = objects - men;
_x removeCuratorEditableObjects [objects,true];
} foreach curators;
};
onEachFrame {
call grab_allCurators;
};
no idea
i just reformated
well thankyou again, you've been incredibly helpful!
ooo thats a useful piece of info, where do I check its time
Im clearly new to scripting lol
in debug menu on the left is a perf button to evaluate script
so you have the local button, 3 buttons to the left
would the time it takes to perform it be a accurate way to measure the performance cost of running the script?
not always
because it uses values at that moment which for eg
1 curator
and only a handfull of objects
mine took 0.003ms haha
in a mission 3-4 curators & thosands of objects maybe
understandable
that being said since your removing them 99999/100000 times the object count is only the players
Im just calling the script like I do in a trigger for example in that debug console right?
mission init would work fine
I mean to check its run time
dont know how to check time on a server
this is what ive written in the debug console "call J3FF_fnc_editableObjects"
but you shouldnt need to
in any init field place the script, it only needs to be called once
but for a mp mission, should be placed in mission.init
no, it didn't
no
you're not really running anything. that's why
Can you elaborate on that?
you're only measuring the performance of:
- creating a global var
grab_allCurators - creating the each frame loop
ofc it practically takes no time
oh ok, is there a way to see how long it actually takes?
ah ok, and id have to do that for each and then add them up to get the total time?
just write them one after the other
writing just "call grab_allCurators;" came back with 0.0007ms
you hadn't defined it then
im not sure what you mean
the var wasn't defined
oh, hold on, I made a mistake
ok it came back with 0.0328 this time
For this:
remove_Objects = {
//Gets curators and gets seperate lists of all vehicles and men
curators = allCurators;
men = entities [["Man"], [], true, false];
veh = entities [["allVehicles"], [], false, false];
veh = veh - men;
occupiedVeh = [];
//Determines if vehicles have crew in them to decide if they should be hidden or not
{
manPresent = fullCrew [_x, "", false];
if !(manPresent isEqualTo []) then{
occupiedVeh pushback _x;
};
} foreach veh;
//Adds all men and all occupied vehicles to new array to make them exempt from list of objects to hide
voidObjects = men + occupiedVeh;
//Checks which objects the curator can currently edit and then makes them uneditable (keeping occupied vehicles and player editable)
{
objects = curatorEditableObjects _x;
objects = objects - voidObjects;
_x removeCuratorEditableObjects [objects,true];
} foreach curators;
};
Why do you use so many global vars...oof 
do they have any affect on performance or something?
Could be easily overwritten, unexpectedly and accidentally.
I normally have multiple functions being called with variables between them, so using globals has been useful for that
Also if you want units, just use allUnits
Why do you use entities?
hmm I guess I didnt think of it, It looks like it doesnt include dead units though, which I need
Trying to make a custom sound click for a gui but the sound simply does not play
class settingsButton: CBX_RscButtonInvisable
{
idc = 2404;
onButtonClick = "[] call life_fnc_settingsMenu;";
soundEnter[] = {"",1,1};
soundPush[] = {"",1,1};
soundClick[] = {"\sounds\pbclick",1,1};
soundEscape[] = {"",1,1};
x = 25.15 * GUI_GRID_W + GUI_GRID_X;
y = 19 * GUI_GRID_H + GUI_GRID_Y;
w = 2.54433 * GUI_GRID_W;
h = 2 * GUI_GRID_H;
};
Here's one of the classes and pblclick is a .wss in the sounds folder
With/without the first \ and .wss extension?
this is the default
soundEnter[] =
{
"\A3\ui_f\data\sound\RscButton\soundEnter",
0.09,
1
};
soundPush[] =
{
"\A3\ui_f\data\sound\RscButton\soundPush",
0.09,
1
};
soundClick[] =
{
"\A3\ui_f\data\sound\RscButton\soundClick",
0.09,
1
};
soundEscape[] =
{
"\A3\ui_f\data\sound\RscButton\soundEscape",
0.09,
1
};
These are .wss's in the files
Make sure the name is correct. pbclick or pblclick?
pbclick
Double check time
ree cant post image
You don't need to. I didn't asked you to post it
but yeah is correct for the mission file
It is possible that the sound is playing with just a low volume perhaps
I've cranked my volume to max and not even a fairy's fart of audio
How did you make the wss?
I wonder
Is it cause the UI changes so fast
Is there anyway to make it sleep before it executes the function
put sleep 1; in the function will see how it works
grrr didnt work
why wont it just be simple AND DO THAT THING
Even resetting it to defaults, the sound doesnt work
Itโs ArmA
Hey guys, could anybody who is fluent in RPT tell me what this might be alluding to?
9:37:18 (CAV) [RANGES] LOG: UpdateUI: ["rr","shooter"] - [] - C:\Users\44746\Documents\Arma 3 - Other Profiles\Stirling\missions\AsDesigned.VR\cav_ranges\fnc\fn_updateUI.sqf:195
9:37:18 Error in expression < 1]]} else {
_shooter = _shooterPlayers select _forEachIndex;
if(!isNil "_shoote>
9:37:18 Error position: <select _forEachIndex;
if(!isNil "_shoote>
9:37:18 Error Zero divisor**
_shooterPlayers select _forEachIndex โ _shooterPlayers may not be big enough
That would make sense, the visual error caused by the script error means the GUI that displays _shooterPlayers is not as big on screen as it needs to be
Error Zero divisor can happen when the select operation tried to look a bigger number than the array's count
...But the Zero divisor part doesn't make sense to me, actually. It's a badly named error
Is it supported to define multiple sounds in description.ext CfgSounds from a single (.ogg) soundfile? I'm trying to vary the volume of a sound played client-side.
if you mean multiple entries using the same oggfile yes, otherwise no
Yes I meant the first one ๐
Trying to achieve my question in the #arma3_audio channel. Figured that varying playback volume of an original and static sound played simultaneously would be simplest. I wonder how other mods/scripts make signal attenuation audio effects. ๐ค
anyone got suggestions for a loadout shop type thing? Basically I want to have a shop where you can unlock vehicles and respawn loadouts. does something similar to this exist (you have a bunch of classnames shown with prices, and then you can execute code on them when purchased) or am I going to have to do it myself?
Hi, i'll have a little question:
I want to spawn the USS Liberty via Script, but for some reason, it keeps getting spawnd at the ground of the See, is there some special trick to spawn it?
I'll spawn it like this:
_data = [
["Land_Destroyer_01_base_F", [18169.2,28919,0], [[-0.334915,0.942248,0],[0,0,1]]]
];
private _objects = [];
{
_object = createSimpleObject [(_x select 0), (ASLToAGL(_x select 1)), true];
_object setVectorDirAndUp (_x select 2);
_object setPosASL (_x select 1);
_objects pushBack _object;
} forEach _data;
tryd that already, it still sits on the ground of the see
I don't get it. if you do _obj setposasl [18000, 28000, 0] that should work?
i thought so to, but for some reason i doesn't...
you tried in the editor using commands in game?
ok, gimme a sec, gonna try it rl quick
yes, that is also already changed, because it needs to be simulated for the ladders XD
lol oops
nope, still a u-boot
Thats the code right now
_data = [
["Land_Destroyer_01_base_F", [18169.2,28919,0], [[-0.334915,0.942248,0],[0,0,1]]]
];
private _objects = [];
{
_object = (_x select 0) createVehicle (_x select 1);
_object setVectorDirAndUp (_x select 2);
_object setPosASL (_x select 1);
_objects pushBack _object;
} forEach _data;
heli = [getMarkerPos "marker", 0, "CH_47F_EP1", west] call BIS_fnc_spawnVehicle; wp = (heli select 2) addwaypoint [getMarkerPos "Hpad", 10]; wp setWaypointType "UNLOAD"; wp setWaypointStatements ["true"," heli land 'LAND';"];
Can somebody please tell me what am I doing wrong? I just want to spawn a heli on trigger and make it move to "Hpad" marker and land there. It will spawn and move to Hpad but just hovers there not landing :(( I do this scripting as practice, this is my very first arma 2 script >.<
it depends where you spawn it. an ASL height of 0 doesn't necessarily mean surface of water
private _data = [
["Land_Destroyer_01_base_F", [18169.2,28919,0], [[-0.334915,0.942248,0], [0,0,1]]]
];
private _objects = [];
{
_x params ["_class", "_posASL", "_vDirUp"];
private _object = _class createVehicle _posASL;
_object setVectorDirAndUp _vDirUp;
_object setPosASL _posASL;
_objects pushBack _object;
} forEach _data;
you need an invisible helipad for landing to work
oh I thought just marker do the job, thanks ^^
also not sure if setWaypointStatements takes a script. iirc it needs a script file
urm... I need to make another script file and use execVM?
no
nvm it does support scripts
Still underwater... and you missed a ; ๐
like I said it depends where you spawn it
placed it now in Editor, gonna take the position via getPosASL and see what it gives me...
still this: [18169.2,28919,0]
18:00:40 "### [18169.2,28919,0] ###"
thats the code i used to get the pos:
diag_log Format["### %1 ###",getPosASL ship];
and what you mean by "where you spawn it"? i mean you got the position...
like I said, an ASL height of 0 doesn't necessarily mean surface of water
try getPosWorld and setPosWorld
uuh, gimme a moment
Code used
diag_log Format["### %1 ###",getPosWorld ship];
What it gave me:
18:04:58 "### [18169.2,28919,0] ###"
Ship still undersee... so how do i get the see level if ASL (Arma See Level) does not go from See level???
Code used to spawn:
["Land_Destroyer_01_base_F", [18169.2,28919,0], [[-0.334915,0.942248,0],[0,0,1]]]
];
private _objects = [];
{
_object = (_x select 0) createVehicle (_x select 1);
_object setVectorDirAndUp (_x select 2);
_object setPosWorld (_x select 1);
_objects pushBack _object;
} forEach _data;```
it makes no sense
are you spawning the ship in eden?
i placed it in the editor where it is supposed to spawn, gave it the variablename "ship", startet the mission, executed the code
diag_log Format["### %1 ###",getPosWorld ship];
I see no reason why it would spawn under the sea then
where are you running this code?
i'll start up an empty mission, go into the Debug-Console and run it there
well some of stuff you say just makes no sense to me:
- you say the getPosASL and getPosWorld result is the same. which is not true for objects that have a land contact (and afaik the USS Destroyer does have one)
- you say it spawns under the water, yet that's impossible if it's the same pos you got from editor
i can stream it to you if u want, i'll just tell u what i gives me
but you're mor than welcome to try it out yourself ๐
yeah it seems you're right
but the reason it spawns like that is something else
what i found out, getPosATL and getPos give you diffrent Values thou
i used this code now:
diag_log Format["### %1 ###",getPosWorld ship];
diag_log Format["### %1 ###",getPosASL ship];
diag_log Format["### %1 ###",getPosATL ship];
diag_log Format["### %1 ###",getPos ship];
and got this:
18:22:45 "### [18169.2,28919,0] ###"
18:22:45 "### [18169.2,28919,0] ###"
18:22:45 "### [18169.2,28919,185.97] ###"
18:22:45 "### [18169.2,28919,0.106325] ###"
ofc they do
the reason is the object's init
the base doesn't influence the parts
so even if you do setPosXXX on the base, it won't affect the parts
what you should do is grab the parts first, and then move them relative to the base:
_data = [
["Land_Destroyer_01_base_F", [18169.2,28919,0], [[-0.334915,0.942248,0],[0,0,1]]]
];
{
_object = (_x select 0) createVehicle (_x select 1);
_base = _object;
_parts = _base getVariable ["bis_carrierParts", []] apply {_x#0};
_relpos = [];
{
_relpos pushBack [
_base worldToModel ASLtoAGL getPosWorld _x,
[_base vectorWorldToModel vectorDir _x,
_base vectorWorldToModel vectorUp _x]
]
} forEach _parts;
_object setVectorDirAndUp (_x select 2);
_object setPosWorld (_x select 1);
{
_relpos#_forEachIndex params ["_pos", "_dirAndUp"];
_x setPosWorld (_base modelToWorldWorld _pos);
_x setVectorDirAndUp (_dirAndUp apply {_base vectorModelToWorld _x})
} forEach _parts;
_objects pushBack _object;
} forEach _data;
@swift gale
wp = (heli select 2) addwaypoint [getPos Hpad, 0];
hint "waypoint added";
while ((alive heli) && !(unitReady heli)) do {
hint "while scope is crossed";
sleep 1;
};
if(alive heli) then{
heli land "LAND";
hint "Landing command executed";
};```
I'm still trying to get that heli on ground ๐ฅฒ it flies over heli pad but only hovers there. I put that hint commands to see if it goes through "If" and "while" scopes but it seems like these scopes are being skipped because I don't see messages from hints.
SQF while-loop conditions are enclosed in curly brackets, not round brackets.
{} this? opsy so sorry, this is my first day of scripting >.<
wp = (heli select 2) addwaypoint [getPos Hpad, 0];
hint "waypoint added";
while {alive heli && !unitReady heli} do {
hint "while scope is crossed";
sleep 1;
};
if(alive heli) then{
heli land "LAND";
hint "Landing command executed";
};```
still doesn't execute while-loop :((
Try using systemChat instead of hint (then the hints don't overwrite each other) and let us know what output you see.
oh okay, gimme a second
okay, it displays "waypoint added" with grey color font in chat but that's it.
Then unitReady is true
Or heli's dead 
Are even running that scheduled?
hmmm... it's not dead I can see him flying.
um... assume you're talking to a very newbie. what does that mean? :))
Ah, yes. heli is an array ๐
Try this:
private _res = [getMarkerPos "marker", 0, "CH_47F_EP1", west] call BIS_fnc_spawnVehicle;
_res params ["_heli", "", "_group"];
private _wp = _group addWaypoint [ASLtoAGL getPosASL Hpad, 0];
systemChat "waypoint added";
while {alive _heli && !unitReady _heli} do {
hint "while scope is crossed";
sleep 1;
};
if (alive _heli) then {
_heli land "LAND";
hint "Landing command executed";
};
shouldn't unitReady be true when the unit is moving toward a waypoint? I've read that in wiki
ooooohhhh I see!!!
thank you I'm gonna copy-paste it
just one side-question... why did you define _res and _wp private?
For all I know right now, those variables are not used outside of this code, and then it's good practice to make local variables private. Of course, if you do need them to be global, you can make them global again ๐
thx ^^
Guys is there a way to spawn half empty magazines for rifle somehow? Basicly i want box of magazines wich will have 10 rounds instead of 30.
ty a lot
how can I attach an object relatively and to a bone?
I know how to do those individually but combined?
So I am currently spawning an explosion through the line:
"R_60mm_HE" createVehicle getPosATL _this;
Which works and is fine, Yay!
.... However, when I include it in the following:
_ExploBar addEventHandler ["HandleDamage",{0}];
_ExploBar addMPEventHandler ["MPHit", { params ["_unit", "_causedBy", "_damage", "_instigator"];
if !(_instigator in allplayers) exitWith {false};
private _hitCount = (_unit getVariable ["you_hitCount", 0])+1;
_unit setVariable ["you_hitCount", _hitCount];
if (_hitCount >1) then {
_unit removeMPEventHandler ["MPHit", _thisEventHandler];
_unit spawn {
private _emitter = "#particlesource" createVehicle position _this;
_emitter setParticleClass "MediumDestructionFire";
sleep ((round random 3) +3);
sleep 0.1;
"R_60mm_HE" createVehicle getPosATL _this;
sleep 0.1;
{
deleteVehicle _x;
} forEach [_emitter, _this];
}
}
It creates the desired explosion, but without any damaging properties. I.e. if set off next to a player/AI no damage occurs.
Why?
Am I doing something idiotic?
Too add extra flavour, this was fine before the Major base game update a few months back
what do you mean combined?
just run them one after the other
on the same object?
will it work?
I need to attach an object to a specific position onto a bone
yes. you can attach multiple objects
mhm doesn't seem to work
to be clear
its just one object that I need to attach to a bone in a relative way
hello! Can someone suggest me a suitable script please? Let's say a player comes to an object and uses addaction that is on that object. The addaction gives him 1 specific item into his inventory. Later, somewhere else the player drops that item from his inventory on the ground. Is there any script, that can execute an action when this item gets dropped on the ground?
basically when player drops that, something will happen
what doesn't work?
runnin one after the other
it does work
how should I run it exactly?
_obj1 attachTo [_obj, _pos, _bone];
_obj2 attachTo [_obj, _pos, _bone];
...
as I asid
its only one object
then what do you mean by combined?
I know how to do those individually but combined?
the object needs to be attached to the bone (so attachto) but in a relative way (attachtorelative)
you have to do some vector math then
use selectionPosition and selectionVectorDirAndUp
yeah thats what I ended up doing
was hoping there was a less stressing way for next time
is inventoryClosed event handler a reliable way to check for inventory updates?
I see it working when using wiki example, but when trying to do anything else it just doesn't do anything at all.
Does it has a limitation or condition to trigger?
Im trying to test it via console and script and neither work
I'm using "setVelocityTransformation" locally in the player and the result was perfect, but on other machines what happens is totally crazy. Why?
a reliable way to check for inventory updates?
only when player opens inventory. scripted inventory changes won't be detected ofc
do you use a velocity or do you just set the velocity to [0,0,0]?
So how is the event handler supposed to work?, lets use this as an example:
player addEventHandler ["InventoryClosed",
{
hint "Should this actually do something?";
}];
Do closing my inventory should show this hint?
Im sorry if this seems obvious, but i got no clue sometimes how to interpret the wiki
yes
Does someone know if you are able to disable the time sync on a mp server ?
you cant
not even with mods ?
no. time is always synced
idk about mods. But wiki suggest you can cause a temporary desync until it syncs again
there is some delay between syncs but that's the only thing you have
you can desync time if you keep spamming the command. Server sync happens approx every 5 seconds.
Is there a other way around to make it dark for a player to achieve the underground bunker feeling
yea I will try that, but I assume it will get day for a second
setAperture maybe
There are PP effects but not as good as both solutions applied
yea tried that, but it looked horrible
Really depends on your setup though
PP no good, i've tried that too :p
PP + time change is the only solution for a good effect.
That is how I achieved at least.
it would be actually really nice if they would add a command to stop the time sync until you turned it back on
I have so many ideas
a long time ago desync was possible
does getPosASL get the position of an ai's feet, or their center?
feet
Thankyou!
Any way to make a building hostile to a side? Like i would love to see vehicles engage and destroy buildings if they came near it. Any idea's?
put some invisible targets on it
That sort of works i suppose.
Lets say i wanted to do exactly that. But on zues spawned objects. Where the zues places it down and then it is auto assigned to the house placed. private _vehicle = "CBA_O_InvisibleTargetVehicle" createVehicle position zuesplacedobject;
How can i do that?
auto assigned to the house placed
What do you mean?
I was digging into a save problem for my server, and noticed that the date is [1945,9,31,18,27] ๐ตโ๐ซ
Seems like a bug?
Like if zues creates said house, can i have it so it auto calls a script and assigns it to that house?
@unreal scroll Man thats wierd
using CBA yes
class event handlers
with "init"
@fair drum can you help me out with that? I have no idea where to even begin.
give me a house class name you want
[
"Land_i_Shop_01_V1_F",
"init",
{
//insert code here
},
true,
[],
false
] call CBA_fnc_addClassEventHandler;
now any time "Land_i_Shop_01_V1_F" is created, it will run that code
@fair drum Thank you for your help. I found this instead. https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#CuratorObjectPlaced
I will also use yours in the future for another project.
currently doing a teleport of an object unconditionally, but would like to add a check if the area is sufficiently empty. Not sure if this is a dead end - maybe it would be better to have some 'transparent' teleport menu in which the player places the object (most likely plane) himself and takes responsibility for the explosions ๐ current code (for completeness) sqf _vehicle setPosASL (_vehicle getVariable "ttt_cva64_hangarOut");
you can check for vehicles near the teleport pos (vehicles command) or use BIS_fnc_findSafePos
something like sqf count (vehicles select {_x distance _pos < 15} ) == 0 maybe? Is this better or faster than nearEntities or nearObjects?
@round scroll Can you provide more info on your algorithm? What kind of vehicles, what kind of surface you want to put it on? I wrote a large function which is very stable (can spawn hundreds of vehicles in many conditions), but I don't think you need it as is ๐
yes but the syntax is :
condition count array
actually nvm I see now what your doing
it's the elevator of a static aircraft carrier, so basically a roof top, kind of vehicles should be primarily planes. It's a rather small area, maybe 15x15 meters
thanks, totally forgot that count can have a condition as well
Don't you want to set up pre-adjusted places for planes?
no, my current approach is to define a ViV capable vehicle, attach it to the hangar, and teleport objects from elevator to the ViV vehicle. The path back is what bothers me, as I need to check that the elevator is free of obstacles
And if it is not free?
then a message to clear the elevator before retrieving vehicles from hangar shall be displayed
Ah, it is simple ๐
Just count appropriate objects in some area.
If is is clear, use BIS_fnc_findSafePos in cycle, increasing the radius step by step, until position is found.
But need to make a test function - place different type of objects in area, and check the functions will works well with it. Simple objects, statics, vehicles.
does bis_fnc_findSafePos work on a building, not sure about this
In a building? No, placing in buildings is another story. It is better to use relative coordinates, I believe. Like attachTo + detach
on top of a building, the carrier is composed of building parts
About your algorithm: you better to set it as a whole sequence == the queue. So you can program all moves one by one. In this case you could use pre-adjusted positions for planes (if it is a script, why players need to have an option to ruin it? :)).
You start the queue, and it goes on until the end, placing your plane in appropriate positions. Is it an option? Or you need to interact with something in process?
Using dynamic placing is the source of instability, it is better to avoid such things if possible.
As for me (I did some core mechanics for a modern mod), I just set the needed carrier positions for planes as variables for plane objects, and once it landed, moved it to it - with effects or without. Very simple, very reliable.
not much of an algorithm here, this is the current retrieval code: https://sqfbin.com/itilometapohasonibin
player should be able to roam the flightdeck freely with and without planes
I just want to replace the old manual use of the hangar with something automated
"player should be able to roam the flightdeck freely with and without planes"
Ah, those players... I love AI ๐
BTW, is there only one hangar?
yes, but doe to geo and roadway lod size limit it's compartmentalized into several ViV areas
If so, then, as your code is very simple, you just need to add more precise positioning (with attachTo maybe) - to calculate _hangarOutPos. In this case your plane will be always positioned right.
Load the editor, and experiment with spawning a plane relative to hangar:
[] spawn {
Plane = class createvehicle [0,0,1000];
Plane attachTo [Building, some relative position];
detach Plane;
sleep 5;
deletevehicle Plane;
};
If it is hard for you to find out correct relative coordinates, try to place the plane in editor, name it as well as the hangar, and use https://community.bistudio.com/wiki/worldToModel
Hangar worldToModel position Plane (I could be wrong in order)
hangarOutPos is the place taken by getPosASL when the vehicle was stored in the hangar: ```sqf
private _vehicle = ttt_cva64_elevator3_vehicles # _row;
_vehicle setVariable ["ttt_cva64_hangarOut", getPosASL _vehicle];
private _success = g setVehicleCargo _vehicle;
the idea is that the player drives the vehicle/plane onto the elevator, uses the store function and later retrieves it at the same pos
not sure where attachTo would help there?
In positioning the plane in hangar correctly, without using absolute coordinates.
but the hangar is using vehicle in vehicle
so it's automatically put in an open space available, if any
Does it position the cargo automatically? If yes, then it is ok - I didn't have an opportunity to use it ๐
Then, you need only to place a plane on a elevator correctly, right?
the player drives it there
Ok, it becomes complicated for serial transmitting ๐
Probably I'll have some time this weekend, and you can share your mission template with the needed algorithm. Maybe I could provide more simple solution.
thanks for your interest, but the carrier is not released yet
Oh. Then can you provide a "datasheet"? ๐ For me it is much better to see the process before my eyes, even on paper. There also could be some problems that you can encounter later, but I could be aware of.
It would be much easier to right a pseudo-code, and start from it.
you can check the current code at https://tetet.de/arma/arma3/Download/viv-init.sqf - do not be bothered by the use of globals
Unfortunately, usually I can't completely see the main idea from the code (even if the author can), and it is normal.
But the overall script is very basic, and you can test it out without problems.
From what I see, you can encounter some problems with obstacles detection, vehicle collision on spawn and script fails in MP due to local variables, but all of it is not algorithmic issues, and can be easily fixed. I just need to know what problems do you have during testing.
Your goal is just to detect obstacles, and restrict a plane moving, so focus on it. Add appropriate messages to players ("Oh man, there is a big kaboom and local armageddon on the deck, do you really want to lift the plane?").
If it would be a task to find an empty space for the plane on a deck by any cost, then it is much more complex ๐
I tried using speed before and after first, then I tried using [0,0,0]. In both cases what happens outside the local machine is quite different from what happens locally.
@little raptor this is the code:sqf waitUntil { private _deltaTime = diag_deltaTime; //last frame time private _newASL = ... private _newDir = ... private _newVU = ... private _stop = ... player setVelocityTransformation [ //POSITION ASL getPosASL player, _newASL, //VELOCITY [0,0,0], [0,0,0], //VECTOR DIR vectorDir player, [sin _newDir,cos _newDir,0], //VECTOR UP vectorUp player, _newVU, 1 ]; _stop };
You must provide a correct velocity. In MP the position of objects is interpolated based on their speeds
Anyone who edits altis life could you tell me why its barking this
"You are not allowed to access this storeage container without the owner opening it." but I placed it down.
It is registered in the database and everything
I see it there
Preferable pont me to where I can get rid of this
iirc isnt vehicles going to select all vehicles in the mission?
and then a select statement evaluates on every item in the array
so I would think nearEntities or similar would have to be faster
It's not
Yeah
A sqf loop is never faster than an engine loop
I don't know if nearEntites is a loop over all entities or if it uses grid search tho. But either way it's faster
so this is preferred over the vehicles loop: sqf _hangarGaragePos nearEntities [["Air", "Car", "Tank", "Motorcycle"], 15] plus the select on not being a ttt_constellation_wire_anchor
Well you can always check the performance using the debug console
what would be a typical number of vehicles and units in a mission then? Clearly with the three test vehicles and units it would not be a good result, or?
@round scroll that looks like it would be pretty fast at selecting only the nearby vehicles yeah
and then an sqf loop over them seems inevitable
bruh, have stretched my learning capabilities on this project in regards to timeframes, cant learn anymore without it being unproductive to project, but its something i want to work towards, can you learn to script and code at the same time easily?
script and code is the same thing?
made a small mission and compared the nearEntities vs vehicles approach out of interest. nearEntities wins, details in: https://tetet.de/arma/arma3/Download/perfTest.Altis/readme.txt - mission zipped avail on https://tetet.de/arma/arma3/Download/perfTest.Altis.7z , needs Jets DLC or change the plane type spawned
f.e. 50 planes flying, nearEntities took 0.0028 ms and vehicles took 0.0716
does anybody knows a good syntax highlight package sqf for Sublime text?
https://community.bistudio.com/wiki/enableDynamicSimulation
Enables or disablesย Arma 3: Dynamic Simulationย for given non AI object.
But is there any way to do this for an AI object?
For AI I think you have to do it per group
Can someone explain the script that Gives a Unit more health ๐ฌ
there is no "more health". all you can do is reduce damage
https://community.bistudio.com/wiki/ropeCreate/transport
Do we have any idea of what property(ies) leads to ropeCreation happily working ? What's the common point with all these vehicles ? Obviously not having seats, because of RoadCone_L_F.
Is that PhysX support ?
one of them is PhysX support. I guess the other is slingload mem point
soooo.... One could do a custom object with PhysX support and this mem point, and use is as helper, instead of spawning/hiding a full blown AA turret ?
I think so yes
mh
ask in #arma3_config
Yeah I was hesitant to do so, due to ropeCreatebeing a script command
I think PhysX is the only requirement
since iirc you can attach a rope to Land_Wrench_F
can I setDamage 1 a helo without the explosion? I only want the wreck that is available afterwards
there's a syntax that skips the explosion effects
but I think the smoke and stuff are still there
that's would be fine. Thanks the wiki showed me how
So I'm trying to figure out the evenhandler damage Number.
What a good number to be able to take a few extra hits?
are you referring to HandleDamage?
Yea
just reduce the taken damage, using a multiplier
no need to use an arbitrary number
Give me a example?
0.1 * _takenDamage
An event handler tells the game to execute code whenever a specific thing happens
there's no negative damage
so whatever goes in {} is what you're telling the game engine to do
so right now you're just telling it -5 which is just a number, not a command
now the way it works is if you look at https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage it'll give you a list of parameters you can work with
unit: Object - Object the event handler is assigned to.
selection: String - Name of the selection where the unit was damaged.
"" for over-all structural damage
"?" for unknown selections
damage: Number - Resulting level of damage for the selection.
source: Object - The source unit that caused the damage.
projectile: String - Classname of the projectile that caused inflicted the damage. ("" for unknown, such as falling damage.)
why does it have to be a command?
it does not
_takenDamage is not defined
well it was a rhetorical question...
i was just saying a command would be a way to get an eventhandler to change something
What you mean?
no. you can just return 0, which means no damage
or 1, which means full damage
If code provided returns a numeric value, this value will overwrite the default damage of given selection after processing.
right on
I was wrong about HandleDamage you can just input a number
I'm not getting the hang of this at all
i gave you fake news
HandleDamage can just take a number
so if you write 0.1 damage taken would be 10% every time
but if you write 0.1*_damage it would multiply the damage taken by 0.1
so it's proportional
I'm dying with one hit tho
ofc you do. you're returning damage for something that may have been 0
like I said, it has to be proportional, using a multiplier
this addEventHandler ["HandleDamage", {
params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"];
0.1*_damage;
}];
this is wrong tho
so correct me if im wrong leopard because i was wrong just now
yep
you have to first calculate the taken damage, then multiply that by a multiplier to reduce the taken damage
i have a nasty habit of writing this stuff before reading the docs
then add it to the current damage and return it
๐
something like this:
this addEventHandler ["HandleDamage", {
params ["_unit", "", "_damage", "", "", "_hitIndex"];
_currentDmg = if (_hitIndex < 0) then {damage _unit} else {_unit getHitIndex _hitIndex};
_takenDmg = _damage - _currentDmg;
_currentDmg + 0.1 * _takenDmg;
}];
is _currentDamage a typo
yeah 
So I have to do math ๐ตโ๐ซ
Oh
this is like 5th grader math (maybe even less)...
All this for abut of plot armour ๐
dont be deceived by my fucking it up it's not all that complicated
once you take some time to mess around with it and compare with the wiki it'll make sense
So is that script working. Or do I need to fill in parts of it?
it should just work as-is
this should work
oh yeah params helps
this addEventHandler ["HandleDamage", {
params ["I_NORTH_NOR_R_Rifleman_3", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"];
_currentDmg = if (_hitIndex < 0) then {damage _unit} else {_unit getHitIndex _hitIndex};
_takenDmg = _damage - _currentDmg;
_currentDmg + 0.1 * _takenDmg;
}];
it didnt do anything tho
params ["I_NORTH_NOR_R_Rifleman_3",
just copy paste this
"_unit" is taken from this
no
it's taken from _this
i tried your script i still died very quick
where are you even trying it?
which is derived from this, or whatever you assign the eventhandler to
single player?
yea
what does that mean
a unit from a mod
so?
it does work
as long as you don't use a mod that adds its own handleDamage it should work
yea it decided to start working lol
does this even work??
we are substracting the current unit damage to the reported damage of the event handler then summing .1 to the current damage and multipliying it byt the previous operation xD??
Shouldn't it be ```sqf
this addEventHandler ["HandleDamage", {
params ["_unit", "", "_damage", "", "", "_hitIndex"];
_mitigatedDamage = _damage * .1;
_currentDamage = (getDammage _unit)+ _mitigatedDamage;
}];
??
thanks for the help at least im not a god aswell but can survive a few more hits
no
if you want to take more damage use a lower number than 0.1 (not negative tho)
like 0.50?
0.5 > 0.1
anything > 0 and <1
0.05 < 0.1
helicopterThing addEventHandler ["HandleDamage",{getDammage (_this select 0) +((_this select 2)*.07);}];
just do this
this addEventHandler ["HandleDamage", {
params ["_unit", "", "_damage", "", "", "_hitIndex"];
_currentDmg = if (_hitIndex < 0) then {damage _unit} else {_unit getHitIndex _hitIndex};
_takenDmg = _damage - _currentDmg;
_currentDmg + _takenDmg / 10;
}];
use something bigger to reduce the damage
e.g. 20 instead of 10 means 2x better damage reduction
that will just kill
or not damage at all
ok what im saying is you got _damage wrong
will increase it
thanks Leo
np
try it. I use it and it does work. create nice bosses
well the algorithm is wrong tho
this is the correct way to do it
it doesn't account for hitpoints either
yeah it's probably just applying a lower damage (from hit points) to whole body, thus reducing the damage
or maybe the other way around
the greater the overall damage the more damage is done to hitpoints
ding
that's on purpose?
yes
yes. but the whole body damage is lower than max hit point damage
he asked for a resistant helicopter, not a helicopeter that resist consistently
Just curious. How does one actually make thier own script?
Are they like hidden in the base game or something or entirely new?
you can write functions or just execute .sqf files with execVM
you use scripting commands, and combine them to form an algorithm that does what you want
e.g. getHitIndex , addEventHandler and damage in what I wrote were scripting commands
so you could make yourself turn into a nuclear bomb upon death?
sometimes i just click through random wiki pages and go "oh that's a thing?"
^
well not "nuclear bomb" per se, but a powerful bomb
something i do to kill time sometimes is just load into the editor and fuck around with the console like that
you can script a nuke but it would just need to be piece by piece (light, sound, particles, damage, etc)
i lack the brain power to do any complex stuff lol
i added a "geiger counter" to one of my missions by just having a "pop" sound play at varying intervals
i lack brain power as well but i just give something a shot, post here, and have someone tell me specifically where my lack of brain power came into play
it took me 8 hours to workout how to delete my airplanes via a trigger. and someone helped me on here in the end lol
i did some weird gremlin mission making starting out
instead of writing a couple sqf files I had everything go off of trigger conditions and timers
and it was a mess
altho that arty trick you showed me as helped me out a huge amount in other areas
well you have to start simple:
this addEventHandler ["Killed", {
params ["_unit"];
_bomb = createVehicle ["Bo_GBU12_LGB", [0,0,0]];
_bomb setPosWorld aimPos _unit;
triggerAmmo _bomb;
_bomb setDamage 1;
}]
put that in the init of some unit
and kill them if you dare ๐คฃ

im still a lvl 1 crook and i still get oohs and aahs just by writing something goofy like what leopard pasted and showing it off
@open fractal ive been able to do firing squads and all sorts of things with your help
actually @little raptor do you write stuff in another program and paste it here or do you just make a code block and write
out of curiousity
in my D-Day mission your suggestion was a huge help with arty stuff. also i can do kind of fake bombing runs with it aswell
tip of the iceberg, skullblits
I typically type it here
this time I wrote it in the game, since it was already running
oh I stay in my visual studio comfort zone
