#arma3_scripting
1 messages Β· Page 295 of 1
create a diary record and stuff
more importantly how do I get the randomized number to by synced globally
well this is a unique issue
I want the passcode to be 8 digits, but randomly getting a number that long will change it to scientific notation
looks like I'll just have to concatenate numbers together
from a string
Hi guys, just a quick question. When someone climbs into the driver seat of a vehicle. Locality of the vehicle is transfered to the driver correct? So if I use allowDamage command I need to execute it on the client who is the driver correct?
@leaden knoll yeah. There's various pages around that confirms that, heres an old one for instance https://community.bistudio.com/wiki/Locality_in_Multiplayer
It's a good read
@leaden knoll using remoteexec can handle for stuff like that. i.e target can be object + it will get executed where the object is local.
Thanks guys @thin pine @tough abyss
hi, is there any way to get the player inventory class to restrict vehicles?
and wich is the best way to restrict a vehicle
i mean, how to get this driver and pilot class:
// Description.ext
class CfgRoles {
class Assault { /*codes*/ };
class Support { /* codes*/ };
}
class CfgRespawnInventory {
class Driver { /* codes*/ };
class Pilot { /*codes*/ };
};
Wait, @late gull . Do you know what CfgRoles is for??
@little eagle not at all, any reference pls?
I don't know either. The best way to restrict vehicles to certain slots / roles is to either use a GetInMan eventhandler
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#GetInMan
That uses the GetOut action.
https://community.bistudio.com/wiki/Arma_3_Actions#GetOut
If you want to handle the cargo space of transport helicopters and make that available for non pilots, then maybe use this too:
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#SeatSwitchedMan
It's scripting.
playerInitLocal.sqf is the best place to start with this imo.
Roles are for loadouts, I don't think you can handle vehicles with it
umm
Any details, Greenfist?
Documentation respawn menu, ok.
All the loadouts available in a mission are now divided into various roles.
Mission designer can use roles already created in the game config
My German soldiers don't have the role config entry. I was considering adding it, but had no idea what it meant.
Now I know that it's kinda important for mission makers. Will add it.
where u find this?
It's in the cfgVehicles, but is it connected to the description.ext roles? I can't see how. π€
so, there is no way to get wich role or inventory is assigned to the player?
The addon config has the default value of the role for each classname.
so, i can use the default role for loadouts?
See:
class WEST1 {
vehicle = "B_soldier_AR_F"
role = "test1";
};
vehicle?
men are vehicles too.
ohh
I edited it. This would assign role "test1" to the "B_soldier_AR_F" class soldiers.
By default (addon config) they are "MachineGunner".
No, role is the CfgRoles entry, not the classname
classname is vehicle =
Currently all my Bundeswehr soldiers are "Rifleman", because I never set the entry for each classname.
but i have to add lobby class? all my slots are VR xD
yes the same, i'm startring mp coop mission
from scratch
ohh, i'm talking about playable units, all of them are VR entity, so i will need to add the correct unit like "B_soldier_AR_F" or ?
nvm, will test it
I never used this. I just told you that I learned about this 1 5 minutes ago.
jeje oki, ty for helps :p
hmm, using "vehicle" will override all your own loadout
also the role
and yes, you need the slot linked to the class
Yeah of course.
That is how it's determined. Slot's classname.
Either via the "role" entry of the class in the addon config.
Or the classname directly ("vehicle" entry) in the mission config.
I think this is a band aid solution tbh. They should've made something more general.
w/e
but if i make my own string in vehicle = "my_power_name" ? this will give a kernel panic? :p
Probably just sits there in memory, because no classname searches for that.
Matches no classname = unreachable code.
//--- Grid and elevation next to cursor
CONTROL ctrladdeventhandler [
"mousemoving",
format [
"
_map = _this select 0;
_text = (ctrlparent _map) displayctrl 1016;
_over = ctrlMapMouseOver _map;
_isTask = if (count _over > 0 && {_over select 0 == 'task' || {_over select 0 == 'taskTooltip'}}) then {true} else {false};
if (_this select 3 && {!_isTask}) then
{
_mapPos = _map ctrlmapscreentoworld [_this select 1,_this select 2];
_textPos = ctrlposition _text;
_textPos set [0,(_this select 1) + 0.02];
_textPos set [0,(_this select 1) + (_textPos select 2) / 4];
_textPos set [1,(_this select 2) - (_textPos select 3) / 2];
_text ctrlsetposition _textPos;
_text ctrlsettext format [
'%2\n%3 m',
mapgridposition _mapPos,
round getterrainheightasl _mapPos
];
_text ctrlsettextcolor %1;
_text ctrlsetfade 0;
_text ctrlenable false;
_text ctrlcommit 0;
}
else
{
_text ctrlsetfade 1;
_text ctrlcommit 0;
};
",
_trackColor,"%1","%2","%3"
]
];
Its a part of the UI, I'm trying to make the grid number and attitude next to the map cursor bigger. Any idea what part sets formating for the font size of the grid number and ASL?
@zenith bramble
Your only chance to change the font size with scripts is structured text, but I'm not sure the control supports TEXT and not only STRING.
Is there any good commands to add a magazine to a unit (ideally vest) bypassing the size restrictions ?
Overloaded vest?
I just need a temporary add, so the equipped launcher comes loaded at start
Add magazine (overload), add launcher, magazine goes into launcher and vest = fine
_unit addItemToVest _item; thought this did it, but nope
(vestContainer _unit) addMagazineCargoGlobal
@little eagle I just want to change size, I already made a little mod that change the font sizes using config, but I was unable to find the grid number next to the cursor. 041019, 35m
http://i.imgur.com/o8HnM55.jpg
try this. The cargo commands usually don't check for overloading, which is probably a bug
its all vanilla Arma 3 stuff
It's not vanilla anymore if you make a "little mod".
Works, thanks commy π
yw
_x params [["_item", "", [""]], ["_itemQty", 1], ["_forceAddToVest", 0]];
if (_forceAddToVest == 1) then {
// -- Only add the first magazine to vest
(vestContainer _unit) addMagazineCargoGlobal [_item, _itemQty];
_itemQty = _itemQty - 1;
};
if (_itemQty > 0) then {
_unit addMagazines [_item, _itemQty];
};
π
sizeEx="0.8 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
upscale the 0.8
That should do it. You need to make it for 2 or 3 displays, since there are different maps for SP / MP host and MP client.
class CA_MouseOver: RscText
That one at least uses the same idc, so it must be it as far as I can tell.
Congratz Adanteh. That looks like actual SQF,
How do I change the player's side? The following isn't working. ```SQF
// Player is on west
_eastHQ = createCenter east;
_dummyGroup = createGroup east;
[player] joinSilent _dummyGroup;
createCenter does nothing in Arma 3.
How do you determine if the player changed sides? playerSide will always report "west", because that is what you chose on the slot selection screen.
Stuff like Altis Life and Exile uses playerSide command all over the place instead of the correct side group player, so you cannot change sides in those mods.
Wait, so createCenter is redundant here also? ```SQF
private "_curator";
if (isNil "nev_sideCenter") then {
nev_sideCenter = createCenter sideLogic;
publicVariable "nev_sideCenter";
};
_curator = (createGroup nev_sideCenter) createUnit ["ModuleCurator_F", [0, 0, 0] , [], 0, ""];
player assignCurator _curator;
openCuratorInterface;
I don't see how it work otherwise.
And it wouldn't work if it didn't do anything.
createCenter does nothing in Arma 3, so yeah
In Arma 3, the centers for all sides are created for you. An attempt to create center for existing side is ignored.
I don't see how it work otherwise.
Just remove the if-block and replace nev_sideCenter with sideLogic.
And it wouldn't work if it didn't do anything.
Tautology
As in nev_sideCenter = sideLogic?
Or ```SQF
_curator = (createGroup sideLogic) createUnit ["ModuleCurator_F", [0, 0, 0] , [], 0, ""];
player assignCurator _curator;
openCuratorInterface;
the latter
Yep, just checked, it works. So does checking the player's side with side group player.
Thanks @little eagle!
yw
So is anyone familiar with the gcam mod?
Modified it a while ago, what's up? @rigid plover
@thin pine I have modified it a bit myself but only in the config file :D. I was wondering if you would know how to add a camera speed feature in game?
I don't have a controller and quitting the game to change the camera speed is so time consuming.
also is there a way to smooth the movement? so that you can move in more than 1 direction at a time.
@thin pine That one is for you kind sir π
Simple question here
I'm making a helper function for 3Den to dump the getPosATL without array brackets ([]), how would I go about using a var in this situation? ["example text, @%!@$"] call BIS_fnc_filterString;
use format
Erm
or str I guess
It's the Syntax, specifically lol
π€
To get to each component of the getPosATL array use select _index
["hint 'lololololol', @%!@$"] call BIS_fnc_filterString; returns "hintlololololol" as intended, I'm not sure how to actually use format/variables in it.
or just do what @thick oar says, waaayyyy better
Many ways to solve the thing, it all depends on what exactly you need. π
format (["%1,%2,%3"] + getPosATL _object);
Return getPosATL without the array brackets in text form
Then commys's way is correct.
private _posStr = str getPosATL _object;
_posStr = _posStr select [1, count _posStr - 2];
(str getPosATL _object splitString "[]") joinString "";
How many more?
O:
private _posStr = "";
{
_posStr = _posStr + str _x;
} forEach getPosATL _object;
I guess that's missing the commas.
(getPosATL _object apply {str _x}) joinString ",";
pick your poison.
``'
copyToClipboard ((getpos (get3DENSelected "" select 0 select 0)) call {
_posStr = format ["%1",_this];
format["%1",(_posStr splitString "[]") joinString ""]
})```
Wow I suck at markdown. That's what I ended up using.
you know you can log positions through the right click context menu, right?
Uhh
Yeah, but
[16736.5,17217.3,2.67029e-005] is the result
compared to 16736.5,17217.3,-0.00243187
those are virtually identical
But one hurts my eyes... π¦
@rigid plover you could always rewrite portions of the gcam.sqf - I reckon an easy way to change camera speed without having to quit the game all the time or do any editing to gcam.sqf at all would be to change the defines in gcam_config.hpp. e.g. remove the #define CFMOVE and add a global var instead; CFMOVE = 0.8;
You could easily influence that variable w/ the debug console or write a script that changes the speed using the KeyDown EH.
Regarding smoothing - I cant remember but if gcam indeed does not have smooth movement interpolation like camera.sqs, you'll have to do some maths yourself and modify the gcam.sqf.
@zenith bramble you filth π
camera smoothing can be enabled via:
_camera camCommand "inertia on";
For gcam though?
if it creates a camera using camCreate, then yes.
I've never messed with that actually, does that automatically convert the camera scene/object to freeroam mode? or is camSetPos still needed? edit: tested it, camera is nice and smooth, does require camSetPos. Untested with gcam though
Why does setpos not like putting units in buildings?
setPosATL/ASL
Why does it do this?
because Arma π
just work with either ASL or ATL cositently
Could also try the funky function on the Position page, lol
getPos AGLS
setPos AGL
setPosATL didn't change the building issue..
What are you doing?
Trying to teleport a unit exactly where the setPos/setPosATL is
But it's being offset in most cases to the nearest outside place
you need to getPosATL too
^
Yeah, used getPosATL
This is first floor, lol
This is weird...
player setPosATL([16436.8,17175.3,0.378138]); works as intended
And setPos
Something is mucking up in sqf
?
I'm retarded.
I had findEmptyPosition in use to prevent players spawning on players...
If I want to read the first character of a string, I would do that by converting a string to an array right?
That would definitely be responsible for my problems, lol
oh okay
Would there be a way to make findEmptyPosition work with buildings?
probably not
Could always make a check that looks for nearby buildings first...
havin' a bit of a scuffle with the hold action script, can't figure out how to pass a variable
[
_object,
"Search for Passcode",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",
"_this distance _target < 3",
"_caller distance _target < 3",
{/*started*/},
{_this call bomb_fnc_searchingSound;},
{/*script*/},
{/*interrupted*/},
[],
12,
0,
false,
false
] call BIS_fnc_holdActionAdd;
https://community.bistudio.com/wiki/BIS_fnc_holdActionAdd
now I know the wiki says
_object = this select 0;
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
if (typeOf _object == "Land_Laptop_f" ||typeOf _object == "Land_Laptop_unfolded_f") exitWith {
_filename = selectRandom ["typing1","typing2","typing3","typing4","typing5"];
_soundToPlay = _soundPath + "sounds\"+_filename+".ogg";
playSound3D [_soundToPlay, _object, false, getPos _object, 0, 1, 5];
};
says it can't find _object
What says it can't find object?
well spotted batman
this is only in de eden init code box
Anyone know what the scripting command for the "Show Model" option in Eden is?
hideObjectGlobal
@plucky beacon IS that it? Or are you assuming?
https://community.bistudio.com/wiki/hideObjectGlobal are you assuming I'm wrong or did you check?
I'm ASKING whether you KNOW that's the exact command they're using, or whether you're just assuming based on its behaviour
dude whats with that tone
@indigo snow What? I'm asking a question
its coming accross in a kind of rude way
You're reading too much into it.
did someone spam @ everyone or what
If you use https://community.bistudio.com/wiki/isObjectHidden it'll return true, assuming that it checks the hideobject boolean it's the same command
you're in luck tho, DriftingNitro was entirely correct.
property = "hideObject";
control = "CheckboxReversed";
displayName = "$STR_3DEN_Object_Attribute_HideObject_displayName";
tooltip = "$STR_3DEN_Object_Attribute_HideObject_tooltip";
expression = "if !(is3DEN) then {_this hideobjectglobal _value;};";
defaultValue = "false";
wikiType = "[[Bool]]";
@plucky beacon @indigo snow Good, thanks, that's all I wanted to know
Is .wss a weird bohemia format thing?
Microsoft Windows Sound System file
Bis-proprietary WSS files store Pulse Code Modulated (PCM) sound data. It's format is a variant of RIFF WAVE file format used for .wav
mhm funky
weird Audition doesn't export to .wss
It's BIS proprietary
for most things arma, .ogg is good enough tho
playsound3d isn't taking my .ogg
I wanna see if using a diffrent format works
oof that file size though
@indigo snow Did you extract that from the PBOs or is there some online site with all the eden source?
right
How are you supposed to check how many opfors have died when their side changes to civ when they die?
check their group
doesn't work if they're one man groups
the group changes to civ too when all members are dead
I'm using { side group _x } count allDeadMen
which returns 2 after killing like 7
side group _x == east you mean?
yes
here's my actual trigger condition { side group _x == opfor } count allDeadMen >= 5
okay, it actually works ONLY for men who are alone in a group
If they're in a group with multiple units, they get moved to a new civ group when they die,
oh, and it seems the 1 man groups are removed too after like 10 seconds of them being dead
hmpf
that's counter productive
it is possible to avoid the auto deletion of groups now (since 1.66 or 1.68, not sure)..though I wouldn't recommend that
@thin pine In either case, checking how many are dead is problematic at best
Maybe check how many are alive π
well, that's as bad as making an array when the game starts of all opfor units. If adding more units, the arrays would need to be updated
or the counter, in case of your suggestion
@thin pine π
@compact galleon
I would use a gvar in the onKilled on the unit to add 1 death to the gvar.
much like
OpforTotalDead = OpforTotalDead + 1;
You can use a switch to split up the different sides or groups if you would like to get detailed or have multiple groups in the mission and want to track them all individually
@zenith bramble I can think of enough ways to do it. The problem is, that it's a simple problem that should have a simple solution. Yet you have to deal with events and whatnot, just to check if a couple of enemies are dead
@thin pine Like I say im not well versed in scripting within arma, I have only gone as far as to edit the config.hpp to remove some messages that pop up. I don't suppose you could add a camera speed function for me? I fully understand if you don't want to.
@compact galleon π I feel your pain but if it was too easy, we would be out of a hobby and the game would have clones all over the place
I very strongly disagree with that statement.
Especially because it hasn't always been like that
I looks like playsound3d does only work with wss files, even using BIs file directories only the wss files work
wav and ogg won't play
@plucky beacon This command works well with addon sounds, however getting it to play mission sound files is a bit tricky. Follow this guide -Killzone_Kid
also why do you need it specifically? why not just use say/say3d?
because multiplayer?
so execute it on all players?
remoteExec on all players, you too fast Mulle π
I want to use the volume and isInside parameters
I haven't played arma for like a year. Does it have any query commands?
like _opforUnits = allUnits where { side group _x == opfor };
@plucky beacon You could also create a function on the clients for playing the sounds using playSound3d.
Then use the remoteExec to call that function on the clients π
TFW you're about to test to see if you can hear something but your roomate turns the vacuum on
@compact galleon thats why an array is useful.
When I spawn in a zombie or an ai unit in my eXpoch A4E write.
I add that units info to an array that is stored server side only.
When dead that onKilled can do anything to the array since it processes on the dead unit.
okay so now it is working with my ogg files
there is the new ARRAY select CODE syntax @compact galleon
what did I change
@indigo snow Cool, that's what I was hoping for.
I had just finished writing
_allOpfor = [];
{
if (side group _x == opfor) then
{
_allOpfor pushBack _x;
}
} forEach allUnits;
saw you used the csharp syntax, theres a sqf syntax too
really? is that discord global?
or can you somehow add custom syntax highlighters on your server?
Well, now I'm doing
_allOpfor = allUnits select { side group _x == opfor };```
global
sure that's Arma 3 sqf and not some other lang?
There. This should work
if (isNil "_allOpfor"} then
{
_allOpfor = allUnits select { side group _x == opfor };
};
_deadEnemies = { not alive _x } count _allOpfor;
_deadEnemies >= 5;```
(trigger condition)
!isNil
no?
{!alive _x && {side group _x == east}} count allUnits
welcome to the discussion xD
that's why I'm doing this, because that won't work
since groups are set to civ when units die
its using the same logic as _allOpfor = allUnits select { side group _x == opfor };
nvm i again see what youre doing
I need all units, so I can check who's died
late friday night ><
since you can't check side of dead units
so I need to init all opfors on startup
wont work with local vars in a trigger condition check though
that at least im fairly sure of
you're right, but that's not a problem
{
_allOpfor = allUnits select { side group _x == opfor };
};
_deadEnemies = { not alive _x } count _allOpfor;
_deadEnemies >= 5;}```
uuh
actually, that's a problem xD
I'll need a public
at least allOpfor would need to be a global
call {if (isNil "allOpfor") then
{
allOpfor = allUnits select { side group _x == opfor };
};
_deadEnemies = { not alive _x } count _allOpfor;
_deadEnemies >= 5;}```
there
call{} to allow _deadEnemies
eh?
@dusk sage Eh??
that trick might work if you refine it a bit more
What's the current issue w/o the call..?
never solved the issue like that though
@dusk sage You can't use local variables in a trigger condition
What do you mean by 'cant'? You are
because I'm using call
@dusk sage Without call
"Condition: Local variable in global space"
Hmpf, stupid you can't post images
Now I just need to figure out why the condition seems to not be executed at all
oh
lol
undid the change from private to public
How do I get a player to force open a breifing subject and title tab on the map? I remember seeing somewhere else do it but I forget where from.
@plucky beacon Briefing subject and title tab? Not sure what you're refering to
when you go to the map there is a briefing tab
then there are subjects in that briefing tab
and you can force open the map but not that tab
aka journal
guys, where i can find a list for isKindOf ?
it uses the config files, if you're in arma go to config viewer
yes, just found it xD, ty
π
Guys, any advice on accessing userconfig's files from a function?
what's the use case? userconfig files are pretty much dead since filePatching has been disabled by default
yes and no @halcyon crypt
just means you have to provide a pbo instead
or enable filepatching again
π
well, it is actually for an addon
I just wanted some parameters to be changed between the restarts
or what's the best way to include the file outside of PBO in addon config?
there's this https://community.bistudio.com/wiki/userconfig
but beyond that no clue
all I know is that everyone is, where possible, transitioning to CBA's settings framework
or what @queen cargo said I guess
profileNamespace
is what i say to such things
no need to change between restarts
does not require CBA reference
just some custom UI
or ... use CBA
no CBA
I know, I know
Pretty stupid that AT AIs always walk as slow as fucking possible, wtf
they're "aiming" π
you try running with a rocket launcher on your shoulder
So uhh...
Retrieving the missionConfigFile path for future use; would it be a bad idea to do so on every on killed event?
Since it's only needed once, I could define it somewhere else...
either way would work, don't think the player would notice any difference
it is "better" to store things you reuse at later points but I wouldn't worry about it too much
configFile stuff is pretty fast and probably is already loaded in memory though Β―_(γ)_/Β―
Ah, I used __EXEC (MISSION_ROOT = __FILE__ select [0, count __FILE__ - 15]);
Combined with _root = parsingNamespace getVariable "MISSION_ROOT";
_root = parsingNamespace getVariable "MISSION_ROOT";
_randomscreamus = ["us\usscream1", "us\usscream2", "us\usscream3", "us\usscream4"];
_randomscreamru = ["ru\ruscream1", "ru\ruscream2", "ru\ruscream3", "ru\ruscream4"];
_randomscream = ["arm"];
if (side (_this select 0) == west) then {_randomscream = _randomscreamus} else {_randomscream = _randomscreamru};
_selectsound = _randomscream call BIS_fnc_selectRandom;
playSound3D [(_root + "sounds\shoutouts\" + _selectsound + ".ogg"), false, getPos (_this select 0) , 1, 1, 0];'
This is complaining about 0 elements provided, 3 expected... What did I break?
Solved. didn't define an element, lua is different from sqf... lol
No reason- would it work from desc.ext?
And how would I go about dumping a list of vars used by a mission for security reasons?
is modelToWorld known to be unreliable at all? Every so often the box that's supposed to be in a tower is above it
it's so weird, I think it has to do something with if anyother building si beneath it
probably an error on your part with handling the various position types ASL/ATL/AGL/World/AGLS
Very rarely is it the code's fault ya
rule 1: never use getPos
tower setVehiclePosition [_pos, [], 0, 'none'];
_posTower = tower modelToWorld [-3.2,-3.0,2.467];
terminal setpos _posTower;
terminal setDir 180;
And the terminal is stuck with the wrong height?
sometimes it's on the roof of the cargo tower, other times it's way above it like 4 meters
it's perfect when it's not on top of any buildings
for context I'm testing in the VR area
The tower is or the terminal?
the tower is fine and placed on the ground
the terminal farther above where it's supposed to be when the tower has other building beneath it
tower setVehiclePosition [_pos, [], 0, 'none'];
_posTower = AGLToASL (tower modelToWorld [-3.2,-3.0,2.467]);
terminal setDir 180;
terminal setPosASL _posTower;
Definitely execute this on the machine where the tower is local.
so server
π it works
just gotta make sure it stays local
Can't I just target it with remoteExec?
im gunna try that setdir
It would behave as expected for everything except boats.
setting direction doesn't seem to do anything diffrent before or after
lol boats, poor boats always gettin' the short straw
ok. The problem with setDir is, that it has local effects or something
so to synch the direction one has to use setPosX afterwards
I know that in zeus, if the server owns a unit you can't change it's direction
Might be no longer true in A3 though.
it's extremely fustrating actually
Yeah, setDir requires a local object
setPosX works on remote objects
it probably just fails silently with zeus on remote units, because shit scripting.
it's a real shame too because it's been like that forever
should probably see if a ticket is submitted or something
fix is done in 30 seconds
Zeus is not moddable at all unfortunately. The opposite of modular just like the arsenal
Unlike 3den
I'm happy with the modularity in 3den
Zeus can have some modules added but that's about it
It's real nice in 3den. Let's you do stuff like this: https://github.com/CBATeam/CBA_A3/pull/612
3.3
Triggers apparently have the same "problem". Maybe I can solve it there too similarly. Maybe not though.
Just registered the Phabricator account
Hmmm, don't have much of a relative view on teh severity of this bug, I guess it would qualify as minor
which bug?
the setDir one in zeus
It's not game breaking but it makes a commonly used and basic feature unusable
or tweak whatever that is
The problem is that you would have to replace a whole script file if you'd fix it.
you replace the curator addon?
And then if BI patches something, your file is missing out on the changes and probably breaks.
You don't need to remove anything, but you have a lot of copy pasted code in your mod.
wat, your losin' me
And you have to maintain it and check every update for changes you have to mimic to not break other things.
what's this relative to my file?
"your file"?
ya
if we're talking about zeus changing direction of units that's encapsulated seperately isn't it?
No, it's probably in one huge ass file that handles all kinds of things just like the arsenal.
but what part of that enables zeus to change direction of units, and regardless of the size of a file why wouldn't it be fixed
Probably one like
_x setDir _dir
lol
Who knows.
[_x, _dir] remoteExec ["setDir", _x]
there
fixed
The arsenal is beyond saving anyway.
arsenal is good for exporting cfg loadouts
You can lag out a MP game with it for everyone else by spamming certain keys / mouse buttons
ya, a brute force method of solving that would be making local changes to gear before confirming
Imma help BI out and give a vid for reproducing it
maybe I just want to try and be thorough
https://youtu.be/3D8YVicEzkE yey video demo
ahahaha, they even turn back when changing their position
it must be the locality if they turn after remote controlling them
it's just all pointing in that direction
@plucky beacon
//init.sqf
{
_x addEventHandler ["CuratorObjectEdited", {
params ["", "_object"];
if (!local _object) then {
[_object, getDir _object] remoteExec ["setDir", _object];
};
}];
} forEach allCurators;
put this in your mission and try again
ok
hi again, we have a nice getter for weaponCargo:
https://community.bistudio.com/wiki/weaponsItemsCargo
Which returns the detailed info about weapons, but is there a similar setter for cargo container?
nope
Is there a way to detect which item has been taken out of a container?
I am using the Take Eventhandler but have troubles to determine one looted item
It is my first mission and I dont know how I am selecting the item that was looted
"selecting"
so then it would be _this select 3?
No, you always start at 0 in informatics
yep worked, thanks for the push in the right way π
yw
--
been going crazy trying to find if position is near water. Messing around with bisfncfindsafepos and isflatempty. Cant get it working well. Seems unreliable.
@plush cargo https://community.bistudio.com/wiki/surfaceIsWater ?
dont need to find if the surface is water but if there is water near a location, like within 500m
yea but you could use this and then run a circle around you position in a radius of 500 m and check, if you find a position that is water
or something.
thats what this is supposed to do, i think https://community.bistudio.com/wiki/isFlatEmpty
its deff slow, but no matter, only runs at beginning of mission
_overWater = !(_locPos isFlatEmpty [-1, -1, -1, 1000, 2, false] isEqualTo []);
you can see one location in pic marked as shore and another that deff should be
but is not
so you need something right on the shore or just know if water is in the radius of 500 m?
yeah just need to know if water is close
mission startup gets all locations and has 20% chance of putting enemies there. If location is near water, i want to add enemies in ships
ah. sounds cool
there was a thread about that command some time ago. i think. explaining it. one sec
This is a interesting math / informatics problem. You can just do a long as search through all positions, but that will be slow as hell.
That isn't exactly the nearest position under water though.
i think he needs to check each town for near water. so this should be good enough. but maybe other ideas? i find this interesting too
If you just want to check if its near water, you can exitWith the check as soon as its returned true for a position.
the purpose is to find "some" water positions near a town to spawn ships there. not sure if nearest is important. could be wrong
still won't be nearest then though
If the question is if there is water, then cptnnick is right, but I doubt it is.
nearest not important, only that there is water nearby so enemies can be spawned. Will use exit with
maybe a check for depth
well there you go.
you might want to wait until its found a few to make sure you didnt hit someones pond or something
No ponds in Arma
lol. imagine that. giant destroyer spawned in a pond π
surfaceiswater only works with sea water says the wiki
Finding the nearest water position is a cool problem too though
It's talking about some fake water that doesn't exist in A3 anyway.
Maybe some arc sweeping thing where you decrease the radius each time you hit the arc endpoints
so what would be ideas for a less quick and dirty but accurate way to find nearest? create grid and check all positions in it?
Yeah. fnc_nearestWater is much more interesting.
How to create a grid in a circle in the first place?
you could filter the stuff inside the circle out or something
you want the nearest position so wouldnt matter of circle or not
If you use circle coordinate system (r,alpha), the grid point density should be: r*sqrt(2), so all points have the same distance from each other.
use bedbensons fnc to find all water positiond on the arc, then a line check from the origin to each point getting the first position where there is water, and then selecting the closest one from that would work 100% of time but be inefficient.
you could cache the current minDistance and abort the line check if the current distance is greater than that
what's a circle coord system?
I thought about something using the terrain slope, but usually it's the highest near mountains and super flat on beaches.
i shall google π
Get all points in a circle of the maximum radius like bb function
And then do a terrainIntersect on the water surface height.
from all the points.
The one that is the longest is the nearest to the center.
But that is missing out on all closed water sources inside the circle
you could do a 1m lineIntersect whose beginning point starts from the origin and travels out towards the arc
hm. imaginative approach though
but i wonder if a lot of lineintersects are more expensive than surfaceIsWater
You cannot start a intersect from under the ground unfortunately
a grid is the most accurate i think but heavy
not even the non terrain intersect ones?
there arent really any grid style commands in arma so youd just scale down the problem to gridsize
Considering SQF is super slow and the intersect does a lot of stuff without writing down much, the intersect variant could still be faster.
mhm. maybe have the terrainintersect origin point 500m above the origin and scan towards points on the arc radii? if false you hit water
You still don't know where the water starts then
youd iterate all [alpha,r] from [0,0]
so youd know the angle and radius and calculate back the position
Is surfaceIsWater taxing?
no
Phew.
0.001 ms
mhm, water counts as terrain for terrainIntersect
Well, made this.
http://pastebin.com/cVWtkGtm
0: ORIGIN (2D or 3D position), array (2,3)
1: RADIUS, number
2: MINIMUM DEPTH, number
3: RADIUS INTERVAL, number
4: ANGLE INTERVAL, number
Can obviously be fairly expensive. One could try scripting multiple circles and having a different angle interval in the smaller ones to take advantage of point density.
You can make it faster if you add in a few assumptions such as the final point must be on water too, so you can skip checking that angle
@indigo snow
Careful with your first for loop, you're going to overshoot 360 pretty quick
in a for loop, it'd only overshoot it once, right?
But I just thought of a better way to handle point density, rewriting it a bit
( i meant, it might hit e.g. 367 or whatever, but it wouldnt progress past that, right)?
Tbh, if anything it won't let you past 360
So it won't check the last x sweep
for "i" from 0 to 360 step 31 would probably stop at 341
Is there a way to delete an icon created using drawIcon3D?
go into the next frame?
What if it's using an onEachFrame?
remove the onEachFrame handler
lol
I had a play with your function @indigo snow
For a proof of concept way to really reduce overhead for precise searching
for a 1 degree/ 1m param set its an order of magnitude (and more) quicker
However, the number of iterations is proportional to the distance squared, so r=1000+ can start causing issues
lol, cptnnick blew Neviothr's mind
Why not use getTerrainHeightASL for depth checks? π€
surfaceIsWateralready reports a boolean, so it's probably faster
surfaceIsWateralready _pos
vs
getTerrainHeightASL _pos < 0
yea that depth check would be better with that
I don't think your function is right cptnnick
or rather it has a problem
with how the points you check are distributed
So what is the goal? Find THE closest water from point with as less error as possible?
Also surfaceIsWater checks if grid is lower than sea level, not exact position
basically floors X and Y
Doesn't matter for this kind of search though
maybe this can help --> https://community.bistudio.com/wiki/BIS_fnc_findSafePos
not for this
lol I did exact same thing month ago
that already spaces points better
CBA_fnc_randPos
was very bad
It used a square
_origin getPos [_radius * sqrt (random 1), random 360]
now it's this ^
This syntax of getPos is probably helpful for this problem too
z is land surface in format PositionAGL
So you might not even need getTerrainHeight
Or maybe you do... AGL is ASLW over water ...
hm got it down quite a lot
typically stays < 10 ms but accuracy decreases with range
optional density parameter to "help" with that
Thinking about the point distribution, this would work good for smoother coasts but have issues with really jaggy ones with lots of inlets
What are you trying to do anyway?
wasting a saturday afternoon π
It started with someone needing to figure out if a position had nearby water
and devolved into finding the closest position where there is water
@dusk sage sunflower function! https://gyazo.com/86fea512f66c772c4ccb7cc49ec13253
was me who wanted the help! glad i asked. been following this convo with great interest
lol
Wanted to do it like this and then I realized it wouldn't be THE closest position
gridlike?
It works but it is not the closest, just first to find going around wider and wider square clockwise
Laziest and quickest solution to find water assuming all map edges have water would be to cast a ray from your position in direction outgoing from center of the map
Which was what I did on Tanoa to quickly find which terrain is on main island and which is not
I didn't need to check each 1x1m patch of land though
comes down to required precision
In case anyone wants my piece of code as I'm about to close it without saving: http://pastebin.com/raw/qNiCbiNu
Not optimized at all, don't judge me
can you pass parameters into the code that is executed by BIS_fnc_loop? kind of confused about that
I have a script which created a 3d waypoint, similar to the player placed vanilla one. Thing is, whenever I use a teleport script, and try to move the waypoint - the 3d icon will stay in the same location, regardless of it's location of the map. Is there a way to fix that? ```SQF
// Waypoint script
disableSerialization;
if (hasInterface) then {
waitUntil {!isNull (findDisplay 12)};
_mapDisplay = findDisplay 12;
_mapControl = _mapDisplay displayCtrl 51;
_mapControl ctrlAddEventHandler ["MouseMoving", {
nev_mainMapMouseOverCustomMark = "customMark" in (ctrlMapMouseOver (_this select 0));
}];
["nev", "onMapSingleClick", {
if (_shift) then {
nev_customMarkLocation = _pos;
};
}] call BIS_fnc_addStackedEventHandler;
_mapDisplay displayAddEventHandler ["KeyDown", {
if (!isNil "nev_mainMapMouseOverCustomMark" && {nev_mainMapMouseOverCustomMark} && {(_this select 1) == 211}) then {
nev_customMarkLocation = nil;
};
}];
addMissionEventHandler ["Draw3D", {
if (!isNil "nev_customMarkLocation") then {
drawIcon3D [
"\A3\ui_f\data\igui\cfg\cursors\customMark_ca.paa",
[1,1,1,0.6],
[nev_customMarkLocation select 0, nev_customMarkLocation select 1, nev_customMarkLocation select 2],
1.1,
1.3,
0,
"",
0,
0,
"TahomaB",
"",
false
];
};
}];
};
// Teleport script
openMap true;
onMapSingleClick "player setPos _pos; onMapSingleClick ''; openMap false; true;";
the 3d icon will stay in the same location, regardless of it's location of the map.
what
Oh
You broke your "onMapSingleClick" BIS_fnc_addStackedEventHandler by using onMapSingleClick
In order to keep compatibility between official and community content the functions BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler should be used instead.
Alright, I'll try those.
hm, surfaceIsWater returns true if its a rock over water.
Not sure I'm following you here, @little eagle. I'm already using BIS_fnc_addStackedEventHandler with onMapSingleClick.
Should I be using MapSingleClick?
Your teleport script should also use the onMapSingleClick BIS_fnc_addStackedEventHandler
I'll explain the issue again: I open the map, and shift click on a certain location, a 3d icon is created in said location. I then use a teleport script in order to teleport to another location on the map. After teleporting, I open the map and yet again, shift click on a different location in order to move said 3d icon, which does not move.
If I don't teleport and just move the icon around, it moves.
yes i understand you fix it by doing what i said above
using the onMapSingleClick function breaks the Stacked Eventhandler. That's why the stackedEH is not executing after you broke it with your teleport script
specifically, onMapSingleClick '' in the teleport script breaks it
yes, you rewrite it to use the BIS_fnc_addStackedEventHandler too
like you do here
["nev", "onMapSingleClick", {
if (_shift) then {
nev_customMarkLocation = _pos;
};
}] call BIS_fnc_addStackedEventHandler;
Would that work if I only use it on demand? I have a UI with a button, when I click it, it opens the map and allows me to teleport.
It works exactly the same
You'd have to remove the stackedEH again after it executed
Like so? ```SQF
["nevTeleport", "onMapSingleClick", {
player setPos _pos;
}] call BIS_fnc_addStackedEventHandler;
["nevTeleport", "onMapSingleClick"] call BIS_fnc_removeStackedEventHandler;
["nevTeleport", "onMapSingleClick", {
player setPos _pos;
["nevTeleport", "onMapSingleClick"] call BIS_fnc_removeStackedEventHandler;
}] call BIS_fnc_addStackedEventHandler;
Well you're putting a stacked EH within the scope of another stacked EH...?
I think you're not reading attentively π
π
π€¦
Is there any way i can check if onMapSingleClick "vehicle player setPos _pos"; is ran?
I want to move a player which i'm aiming at in a vehicle. _vehicle = nearestObjects[getPosATL player,["Car","Ship","Submarine","Air"],10] select 0; _target = _cursortarget; _target moveincargo _vehicle; wont work
typo? _target = _cursortarget;
_target = cursortarget;
_target moveincargo _vehicle;
``` is actually the correct version
but wont work either
no
Shouldn't it be this select 0, not select 0?
that part works
I've not scripted in a few weeks, need to remember what everything does xD
if i use _vehicle = nearestObjects[getPosATL player,["Car","Ship","Submarine","Air"],10] select 0; bob moveincargo _vehicle;
while bob is my player I want to move it works
and cursorTarget is returning an object to you?
I see your issue
_target = _cursortarget;
_target moveincargo _vehicle;
What's _cursorTarget defined as?
Shouldn't it just be cursorTarget?
as I wrote the correct one is ```_vehicle = nearestObjects[getPosATL player,["Car","Ship","Submarine","Air"],10] select 0;
_target = cursortarget;
_target moveincargo _vehicle;
@bleak schooner the issue might be cursorTarget not returning an object to you
check if it does in your debug console
but why should it not?
check it though
cursorTarget can have quite a temper.
you might also wanna try the new-ish cursorObject
cursortarget gives me a value
regarding cursorObject vs cursorTarget. first one is way more accurate. but for some things you want something that takes general direction and is more open like cursorTarget. so both are useful still. latter might use bounding box as reference. don't know for sure though
good to see i'm not the only one using bob fo testing π
bob is love bob is life.
but that doesn't help me fixing my problem
oh and when i use a bot it works as well
you might also need assignAsCargo. not sure. stuff is annoying so i try to stay away
After you do "Assignascaro" for each member of the group
Do: (units <groupname>) orderGetIn true; that should do it
First you tell them "This is your vehicle you should use" then you tell them to get in
@little eagle that event hanndler you wrote last night looks like it didn't work
π¦
hello darkness my old friend
riperoni
But the script did execute, right?
It's just the getDir that reports the false direction anyway
right?
I didn't add any formatted hints, I know it ran though
lol how
Β°_Β°
maybe you can hack something together with the current mouse position
When launching a server without mods it feels like mach 3
ACE adds like 15 seconds to game start.
14:34:13 "trying to rotate B Alpha 1-2:1 REMOTE"
14:34:13 "Checking if the execution is local"
14:34:13 "B Alpha 1-2:1 REMOTE is local"
14:34:13 "Trying to rotate the direction to 175.854"
14:34:13 "B Alpha 1-2:1 REMOTE has attempted to be rotated"
14:34:13 "current direction is 175.854"
he just turns around again though
try it with a vehicle?
fkin great didn't add description.ext
REBOOT
works for vehicles but not turrets
it does a little spaz out before sitting in the right direction
14:49:30 "trying to rotate 4c9e8100# 31: offroad_01_unarmed_f.p3d REMOTE"
14:49:30 "Checking if the execution is local"
14:49:30 "4c9e8100# 31: offroad_01_unarmed_f.p3d REMOTE is local"
14:49:30 "Trying to rotate the direction to 53.0397"
14:49:30 "4c9e8100# 31: offroad_01_unarmed_f.p3d REMOTE has attempted to be rotated"
14:49:30 "current direction is 53.0397"
How would I go about replicating my colorcorrections for each client?
"turrets"?
@plucky beacon
Can you try adding
[_x, getDir _x] remoteExec ["setFormDir", _x]
BEFORE the remoteExec setDir part?
Use remote exec to a script Sturm
Guy with yellow icon?
derp
Lol
Wait
im going to need some help again lol
I need to stay off discord when I'm shy on sleep. I wanted to ask if the color corrections in the menu can be retrieved via script
And/or if the numbers are the same
what menu, what "color correction"?
Guy with yellow icon?
https://www.youtube.com/watch?v=DwV3y08mh6Q
Menus don't have color corrections.
Help, my brain is having a stronk
The post process color corrections that are available under options menu
I don't think there is any way to read that setting, just like how it's impossible to retrieve or set the gamma setting.
im having a hell of a time getting my Bis_fnc_spawnvehicle working correctly lol. Im spawning in a chopper in flight and im attempting to script the waypoints i need it to fly to
extractChopper_1 = [[getMarkerPos "extractionSpawn_1" select 0, getMarkerPos "extractionSpawn_1" select 1], 270, "B_Heli_Transport_03_F", Veh_1] call Bis_fnc_spawnvehicle;
Raider_1 = extractChopper_1 select 0;
//Extraction Waypoints
_wp = Veh_1 addWaypoint [position ab1, 0];
[Raider_1, 1] setWPPos getpos ab1;
_wp setWaypointType 'MOVE';
_wp setWaypointSpeed "limited";
chopper spawns in find but i cant seem to figure out why the waypoints not working since addWaypoint seems to be erroring about no group
groupName addWaypoint [center, radius, index, name]
I guess Veh_1 is the helicopter?
in the bis_fnc_spawnvehicle code Veh_1 is the part of the function that dictates side or group correct
or is it inside of (extractchopper_1 select 1)
why is a GROUP named "veh" like "vehicle" though?
its just something i called it to test with
best would be to copy paste the error message from the RPT file.
It's a secret!
lol
extractChopper_1 = [[getMarkerPos "extractionSpawn_1" select 0, getMarkerPos "extractionSpawn_1" select 1], 270, "B_Heli_Transport_03_F", WEST] call Bis_fnc_spawnvehicle;
Raider_1 = extractChopper_1 select 2;
//Extraction Waypoints
_wp = Raider_1 addWaypoint [position ab1, 0];
[Raider_1, 1] setWPPos getpos ab1;
_wp setWaypointType 'MOVE';
_wp setWaypointSpeed "limited";
apparently the WEST is to dictate the side or group
was reading it wrong on the wiki
in the array for extractChopper_1 =0 is the vehicle itself, = 1 is for the crew and = 2 is for the group as a whole
WOOOT i am learning this stuff lol
could've just used group ( select 0) too
lol
next step is to figure out how to do multiple choppers using 1 spawnvehicle call
extraction is kind of a pain since i dont know what players are still alive and what boat they took
16 player coop and 2 gun boats
they are choppered in via sling load at mission start but for extraction im going to attempt to do the reverse
have chopper come in a re-sling load them and carry them out
but if the boats are destroyed i have to make it flexable so they can land and extract that way
or rather backup extraction points
@little eagle you think it would be best to do one big nested if tree or just move into FSM?
Dunno, but I know that some people use "mission flow" FSM's and it kinda makes sense to I guess.
i think the larger issue that i have no idea on how to fix is getting the chopper to move directly above the boats
with waypoints their is always a room for error when setting them noted in the wiki
Can't you attach the waypoint to the boat or something like that?
HI
ab1 in that code is the boats location for this test but when the chopper arives its still like 50m away lol
07
ill make another one to see if attach can get closer
if not, what i'll end up doing is transition to a cut scene to hide the possition differance and use a cut away to hide the hooking up to the boat
or rather cut scene from inside the chopper while its sitting still and spawn a new boat below each chopper and move the players to the new boat when off camera
this way i can show the sling load from a camera sequance
pretty sure you can only attach waypoints to vehicles/objects that are created in the editor
Alternative Syntax
Syntax:
waypoint waypointAttachObject object
Parameters:
waypoint: Array - format Waypoint
object: Object - static object
dunno what "static" means
means the waypoint will only work on static objects, as in not a vehicle moving
im working with it right now since players have to be in a moving boat
the way i think i may go about it, set up 2 triggers for exfil
one to kill power to the boat which will spawn in the extraction chopper
and one to set that choppers waypoint once the boat drops below speed to grab its current possition and set a new waypoint to that pos
So attach the trigger to the boat then, once the chopper is in say 200m range you can kill the power
but if the players keep moving away then the chopper will never catch up
as waypoints dont update with vehicles pos in motion
what a game
even attaching a trigger to a vehicle, the triggers possition is not updated so that will not work either
the only way i could think of getting the same effect as a roving trigger is to use a size 0, and set it condition to "distance Raider_1 < #
it would be nice if BIS had a special waypoint that would work for this. like have a checkbox for special state of attaching a waypoint to a moving vehicle and it will update its possition until the completion radius is triggered
you can run a loop that check pos of the boat deletes the helis waypoints and updates it with new ones
Wait if you attach a trigger to a vehicle, it won't give it's current position when triggered?
attaching a trigger to a vehicle does not update the triggers pos when the vehicle is moved
trigger attachTo [boat, [0,0,0]];
when the boat moves the triggers position does not
its activate field is still in its inital pos
im going to check to see if their is a CBA command that can do this
Well then I guess you'll have to get the position of the vehicle every second or so and update the waypoint as was suggested, probably the easiest way.
you can get vectordir of the boat and use vector multiply to get a pos ahead of the boat and update the waypoint with that pos if it cant keep up
I don't know how everything is set up - if I'd do something like that I'd probably kill the boat speed as soon as the helo has reached a certain WP and from then on give it a wp to the vehicle's last known position.
im thinking the best way will be to kill the speed of the boat first and then grab possition
players wont be in harms way at this point
Yeah can't let players mess up an epic exfil!
lol
well this is what my intro is designed after https://www.youtube.com/watch?v=s-Eo9O0q26k
im just doing it in reverse for extraction
simple question, wich license i have to use for a script, only want to keep credits
and no monetize ofc
"just doing it in reverse" ;-D
Write that in the header. "Free to use, no monetization, credit me if you use it"
kinda walked into that one lol
@indigo snow is that enought? :p
sure
@late gull whats the script do?
just a joke script, taru pods work
parachute the pod from taru
if you want to go formal it would probably be the MIT license plus the monetization
OS / GPLv2 does not prevent monetisation.
Those licenses are pointless anyway, because there is no way to enforce them.
i know, but atleast the copy paster will know who creates the cript :p
// by commy2
lmao
hehe
That's what I do
lol
/*
KOTH Gear Menu
Created for AFC
Author: Soolie
I don't remember how any of this works
*/
hahahaha great
got another question
at the end of my mission their is a possability that the players will not have enough boats to extract everyone. What im thinking of doing is having a secondary extraction from an on land point if the boats get destroyed
was wonding what is the best way about doing multiple extraction points
depends on how your mission works i guess
its a simi-open sandbox
you can go anyware but you have a single objective
and after its complete you have to extract
thing is due to the nature of the AI on the map i can not controle what they do
so if the boats are destroyed i have to extract via land
guys any documentation about runserver.bat or something like this?
Do they have the boats from beginning to end ?
players have boats that are slingloaded in at mission start, its how the insertion works
You could make them indestructiable or give em the ability to repair, but what are you going to do when they beach the boats? It's the #1 problem with such missions
but im trying to take into account of player dumbassery lol so if the boats are destroyed or if AI kill them. then their will be a fail safe extraction method
boats and be pushed off
oh ok
boats kaput = mission lost
i guess my main concern is mission performance, so im trying to stay away from doing things like loops and massive ammounts of triggers lol
Yeah - you can't accomodate for each and every evantuality
oh no way am i doing that lmao
Hand them a repair kit, give a TL or SL the ability to repair and tell them to pray to Joe Pesci that all goes well
been working on trying to get a system so their are at least 3 fail safe backup extractions in most missions. If the LZ is too hot and cant be secured then fall back to secondary extraction
just need to figure out a propper controler so the system and decide on what to do without player input
im working on the assumption that players are too stupid to know how to use the radio menu lol
Yes.
I'd drop all the failsafes, tell them to exfil at locaction X and when they arrive spawn the two boats all new and shiny so they can get out and ride into the sunset
(just guessing two boats)
For a misison that may be only played once and lasts 2-3 hours it's not worth it to make such an elaborate failsafe system imho
If I've learned anything is that the more realism and believable mission flow you want to put in, the more issues you have to work around, I try to keep it balanced
For example I had a hostage rescue mission and at the end it was scripted taht once the hostage is freed, he un-surrenders, goes to the extraction zone (without grouping), helo gets called, when helo is X m away smoke gets launched to mark LZ, helo lands, hostage walks up to helo, gets in, players board - all ride off into sunset
What it turned out to be was hostage un-surrenders, when helo lands he walks out, moveincargo, helo waits for 5 minutes (yes ... ) before taking off
Somehow there were issues with hostage and helo - the way AI enters a vehicle they need a certain space for their pathing and it just did not work if the helo did not land exactly in one position
So yeah - never trust players do to the smart thing and don't count on the AI either ^^
signing off for tonight π hf
π
meh there is the script https://github.com/yeiij/taruPod
not awesoame, but usefull with no mods
Cool stuff man!
ty, will add the rest of pods someday xD
@late gull is english your second language?
yes, not second i just try xD
Not too bad π I play a lot with austrians and germans, always rewriting stuff for them and their servers
This is a simple Taru pod management system
Included is a Stratis test mission for understanding how it works
You need to precompile the functions and add them to the vehicle(Taru)
No further explanation needed
Media https://youtu.be/yT8hIKDQUgk
To Do
Add support for other pods
Add support for other Taru's
Delete the pod after some time (maybe)
Im a chef in NYC, everyone here speaks spanish
haha thats nice
back again lol
having some issue with camera system
i can create cameras just fine but im having an issue with one of my shots
_car = RaiderChopper_1;
_cameraExit = "camera" camCreate [0,0,1000];
showCinemaBorder true;
//Opening shot from inside the cockpit
_cameraExit AttachTo [_car,[0,6,-0.5]];
_cameraExit cameraEffect ["External", "LEFT TOP"];
sleep 15;
//;comment "wide shot of chopper";
_cameraExit camSetPos [7527.845,3622.061];
_cameraExit camSetTarget _car;
_cameraExit cameraEffect ["External", "LEFT TOP"];
_cameraExit camPrepareTarget _car;
_cameraExit CamCommit 5;
waitUntil {camCommitted _cameraExit};
for the wide shot i want to switch to a camera outside the chopper but have it looking back at the chopper
whats happening exactly
maybe this ? https://community.bistudio.com/wiki/camSetRelPos
iv been trying to set the cameras possition to a object and have it face another object
arma is just not liking me today lol
whats happening is i create the camera just fine
its attached to the chopper just like i want
but i want to change possition to a wide shot from a distance after a few seconds
in the new shot i want the new camera position to be facing the chopper from its new position
it should work like im doing but its not
the camera just sticks inside of the chopper at 000
i think bis either broke the camera system or they changed how it works and did not make the changes on the wiki
if you use campreparetarget you want to use camcommitprepared
ahh ok
i figured out what was going on
in one of the last updates bis must have changed the camera system
before when you attached a camera to an object and wanted to move to another possiton you could do so by setpos
but now you can not do that
ahhh
you have to detach the camera now were as before you didnt have to
you can move from objec to object via attach to without detaching but your locked into view i think
i will play around with it some more to see what i can make of it lol
due to the nature of what im doing using a scrip system like alias easy cutscene system will not work for me.
but it should make for some great exit sequence now
now to figure out how the hell BIS had those vertical rolling credits at the end of the campaign lol
i dont think they used a video file for it.
anyone know how to lower the sound in a created camera?
fadesound does not seem to work
looking to lower the engine sounds from the chopper
fadeSound works with any camera, you're doing something wrong
CutText ["","Black in", 3];
_car = RaiderChopper_1;
_cameraExit = "camera" camCreate [0,0,1000];
1 fadeSound 0;
showCinemaBorder true;
i still get sound
even just doing fadeSound from the debug consol does not work
nvm i think i might have solved it
problem with ace mod
got to disable the hearing for this seq
hello
little question
do I need to check if isServer everytime when script is spawning some units or other players than server are automatically ignored?
are triggers even called on multiplayer players other than server?
triggers's code is executed on every client & the server
so you need the isServer check if you want something to only exec on the Server
I wonder what happens when the other guy receives spawn script
it sends to server request to spawn as many times as players received command?
or some units spawn on the local scope of other players and other players can't see them
Every connected client would execute the code and spawn units
Unless you do special stuff with createVehicleLocal theyre there for every client
so If i would have 5 players
then units will spawn 5 times and will be seen on every computer?
hmmm maybe that's why I got red army size enemies group last time I played with a friend lol
createUnit is global command, no matter where you execute it, all clients will get the units
okay thanks
a question to SimpleObjects, is there any safety problem with spawning simple objects locally or why is this command global only? If there is any opportunity to spawn them locally, let me know either π
what usage are you envisioning?
just simply spawn a SO locally, so other players don't see them. Just like createVehicleLocal
yeah
Hey man, does anyone know if it's possible to mount an infantry weapon onto a vehicle?
Like make the crew served weapon something normally held by infantry?
Not without editing the models.
Not too concerned about what it looks like.
I know I switch to different vehicle weapons.
we have a flamethrower in our mod pack, and want to mount it to a m113.
A crew served weapon is not the same as a "infantry weapon" which would mean rifle/handgun/launcher in the context of Arma, no?
You can try your luck with https://community.bistudio.com/wiki/attachTo
That will only work with crew served weapons / "turrets" though.
And even then it has a lot of problems.