#arma3_scripting
1 messages ยท Page 377 of 1
iirc intro outro and mainmenu all have diffrent ones so 46 being only mission should be accurate
@subtle ore Just to double check you where executing it from the server right?
@distant egret correct
k :/ should work ๐
/shrug , i am going to try again this eveniny
k
Heh. It's supposed to be challenging. You die, spectate or leave and take a ban. Bans would be cleared daily. Lol
Yes of course. It's more entertaining to see people struggle and want to stay alive rather than expecting to respawn
Flips the whole attitude around of teams
Is this for like a event or?
Not necessarily
Was planning on throwing this into public for a few days and see what happens.
Of course i have a helper function to differentiate between manual bans and killed bans
But. It may prove to be very interesting, and promote tactility and teamwork
@subtle ore what about glitch kills then? like you run in a rock and you die? And what about Teamkill.
what? those still happen?
just example
I got slightly injured a few weeks ago climbing through a window, but that was my fault really (there were stuff on the other side)
@distant egret team kill handled, if a player was killed by something not a player it'll return the killer or instigator null
collision deaths are a lot less frequent now
but yea it can happen had it in our last op someone tried to vault on top of a rock but he got inside of it...
So checking they didnt die from fall damage. Not a valid player killed by
Thinking about checking that @distant egret
Lineintersects or something like that
Yea guess you could yea.
Don't know if people would like it though. But like you said as test.
It would introduce a lot more caution.
Yep. For those who want an extreme challenge they will get it
and make the gameplay slower if you like that ๐
That is the goal
going through the missions too quick?
The more precise you are with planning things out, the better
Yep. Either that or they run and gun
"Oh, i will just respawn"
@subtle ore I get it, our punishment is just that you have to drive back xD
But banning them idk how I feel about it.
Yea understand
but idk just is weird. You don't have full control over it because you won't be there all the time.
Very true.
In operations we have the one life rule but we as admins can unkill someone if it was a bug or just something stupid.
I will try and scrub away the possibilities of dying to bugs. During the tests i guess i could check in every once in a while. Log everything
See what needs to be changed, what needs to be added. Etc.
Yea good luck, I just know that my guys won't agree with such system xD
Lol. I understand, it's going to be a good experiment for those who are willing to participate
Back to scripting...
Lol. Yep.
Does setOvercast sync with clients? Wiki down can't see xD
iirc it syncs every 5 minutes
ah.
But forceWeatherChange forces sync
ah k cool. and that is from server to all clients?
Yep
and it would also work as JIP?
so if I executed the commands and then someone joins he get's the same weather.
I know that ACE removed parts of their weather system.
because the syncing is now done correctly by arma but not 100% about it
ACE still allows jip weather sync though
k, but you don't need to use the ACE weather settings for that?
Hmmm "remains from" ?
Clients will overtime start using the value the server has. what time period?
@distant egret pretty sure thats the time between each sync, would become more accurate over time
wish I could set different times for each client
(and not have the server try to correct it ever few seconds)
Possible iirc
time should be local or not?
it doesn't try to correct "every few seconds) check the code
let's say your network wouldn't like it
syncing those values shouldn't be a huge traffic, imagine unit positions are much more expensive on the netcode
nah, actually unitPos are pretty light
and what is not light about those weather values?
Why would that be?
what would what be?
unitPos being light
well, no idea, it's just that looking at the traffic and frame data it's light
[x,y,z] + some anim data per network frame
Wait a sec. Arent the anim cache stored local to the server though?
So its not redundant?
That what i thought
sure but what anim state the unit currently is in will be transfered over the network to all clients
I would hope so
but i don't get why weather sync should be bad :S thats just like 5 or 6 floats transfered each network frame
not even every frame would be required
ยฏ_(ใ)_/ยฏ
/shrug
Not even a few seconds
maybe ok for a one time thing but for dynamic weather i would not reccomend and It would have to be run from server again when someone JIP's. I imagine if you have a lot of players on server and a lot othings going on at that moment It could possibly kill the server..
Yep. Bad idea dynamic. Not bad one time event
how easy would it be to stop players from animating inside their vehicle? (ambient animations/gestures)
totally forgot about google's cached pages XD
@austere granite true.
i didnt think so, not surprised it isnt working,
I really just want to eliminate the "head bobb"
Why? Bi has already removed the facepalm
the facepalm?
I'm trying to look at memory points in the model with a certain amount of precision, kind of hard when the camera's moving all about
Inside the vehicle the lod view is different
You are going to need to add it to the vehicle
The "facepalm" was an anim made to look like you were wiping your forehead
But it eventually got removed
oh alright, I think I know what you mean
Hello guys...i just have my own 2 servers with a begin programmer... he is on the good track..but we need some help.
I have now 2 wasteland servers (malden and tanoa) and a programmer...but its a scripter and doesnt have the brains for the 3d editor thing. To change things on the server.
Like exemple: put 2 more verhicle stores and 2 more garage s in the map.
And the biggest thing we wanna change is. Normaly you have 3 teams: blufor,opfor,inde standard no one see eachoter until you group up...and play together against others. But we wanna make only for blufor and opfor teams that they can see eachother.....pls help us if you want too...invite me then..thnx
{
while {player distance testguy < 10} do {
sleep 1;
hint selectRandom ["close2","close3","close4","close5"]
};
sleep 1;
};
};
i need this code to be played only once the condition "player distance testguy < 10" is meet, what i need to add?
waitUntil
{
waitUntil {player distance testguy < 10};
sleep 1;
hint selectRandom ["close2","close3","close4","close5"];
sleep 1;
};
};
it still runs, i need to remove it from the while loop?
Formatting is important.
hint selectRandom ["close2","close3","close4","close5"];```
dont need anything else
generic error
The spawn is needed.
yes, thats correct, sorry
scheduled ๐
waitUntil {player distance testguy < 10};
hint selectRandom ["close2","close3","close4","close5"];
};```
done
just one ting
if i put that on a script file so i dont use the spawn, that waitUntil will hold back other codes behind it?
how do i make it only hold that hint?
like this
waitUntil {player distance testguy < 10};
sleep 1;
hint selectRandom ["close2","close3","close4","close5"];
sleep 1;
waitUntil {player distance testguy < 20};
sleep 1;
hint selectRandom ["far1","far2","far3"];
sleep 1;
};
the second hint does no show because of the first waituntil
even on a script file?
i though that spawn was only to fix the unschedule enviroment
right, that is working
waitUntil {player distance testguy < 10};
sleep 1;
hint selectRandom ["close2","close3","close4","close5"];
sleep 1;
};
[] spawn{
waitUntil {player distance testguy < 20};
sleep 1;
hint selectRandom ["far1","far2","far3"];
sleep 1;
};
Hint "this is running"```
that will work for MP COOP and JIP playes?
well
I wouldn't use that second condition
because it will hint both
did you mean more than 20?
why not do < 10 and >= 10?
its just a test
i am not even going to use that
i just need to check if the code is running only once
thats why there is those numbers and sleep
this is the real code i am going to use
sleep 1;
waitUntil {triggerActivated dub_1};
[] spawn dub_PT_1;
};
yes triggers
no triggers
but they are to only control when exacly the dub is going to play
why not just use the trigger activation field if you use triggers anyway?
are you trying to make it complicated?
i had problens early on with JIPs
that won't solve jip
it will
sleep 1;
waitUntil {triggerActivated dub_1 AND !triggerActivated dub_2};
[] spawn dub_PT_1;
};```
that will avoid dub_PT_1 to be executed
that is a list of sequence audios for the plot on the mission
uisleep 2;
playSound "Play605";
uisleep 2;
playSound "10MC500";
uisleep 2;
playSound "10md500";
uisleep 4;
playSound "10MT500";
uisleep 1;
_civscreen = civscreen;
_civscreen say3D "civsrunning";
uisleep 2;
playSound "Play607";
uisleep 4;
playSound "10MC501";
uisleep 4;
playSound "Play608";
uisleep 4;
playSound "Play610";
uisleep 3;
playSound "CmdA501";
uisleep 8;
playSound "Play609";
};````
Lappi, it's useless to argue with him^^
i like weird trigger locality tbh ๐
what is the counter part to "Player" being that is other player and not your self?
sleep 1;
waitUntil {player distance testcar < 10};
[] spawn dub_PT_2;
};````
for exemple, this only works if the local player and not other player get on that distance
of course
in MP player is referencing the local player unit
in sp it's referencing the one unit you have set to player
otherwise if you executed it locally to the player then you can use player in this case
trgigers, once again are nasty with this shit
[] spawn
{
if(local player) then
{
waitUntil{player distance testcar < 10};
[] spawn dub_PT_2;
};
};
now this will fire once any player gets closer on testcar?
Once, yes.
but, in case of a JIP player, it will fire aguain even ahead on the mission?
i tested with my friend this
sleep 1;
waitUntil {!Alive truckbomb};
[] spawn dub_PT_1;
};```
it will fire when a JIP player joins
becasue that truck will be already dead on the mission
you are doing this in the initPlayerLocal correct?
of course it does
have you even looked at what the event scripts do invidually?
anyways
I doubt these scripts run after resapwn
check if you're forcing respawn on start
or if it's not being executed when your friend joins
there shouldn't be any JIP issues if it's in the initPlayerLocal
because initPlayerLocal is only concerned with the player that has joined, not any other players.
thats make sense since that waitUntil was never fired once
the
dub_PT_1;
is inside initPlayerLocal
is this
dub_PT_1 = {
uisleep 2;
playSound "Play605";
uisleep 2;
playSound "10MC500";
uisleep 2;
playSound "10md500";
uisleep 4;
playSound "10MT500";
uisleep 1;
_civscreen = civscreen;
_civscreen say3D "civsrunning";
uisleep 2;
playSound "Play607";
uisleep 4;
playSound "10MC501";
uisleep 4;
playSound "Play608";
uisleep 4;
playSound "Play610";
uisleep 3;
playSound "CmdA501";
uisleep 8;
playSound "Play609";
};````
jesus christ
there is a way to the server to call it then?
still wouldn't matter
you're spawning the code after the fact
yes of course, have you read up on locality in arma 3 yet?
i cant, wiki is dead
you can execute things on the server indipendent of the player
of course you can't
but for as many times as you've ran into this problem I thought you would
i tried early to find about some kinda of server init or something
what is it called?
so, on the initServer.sqf it will can call the dub_PT_1 if i put this line
sleep 1;
waitUntil {!Alive truckbomb};
[] spawn dub_PT_1;
};```
thats the result of copy and paste from the editor
no excuse
that player rule still aplies to the initServer.sqf
sleep 1;
waitUntil {player distance testcar < 10};
[] spawn dub_PT_2;
};```
here
letme write this for you
[] spawn
{
sleep 1;
{
waitUntil{_x distance testCar < 10};
[] spawn dub_PT_2;
} forEach allPlayers;
};
really not the best, but I guess it works.
i see
thats good, i will save this exemple for more work around that.
and you will be happy for the fact i am not ussing triggers
well, nevermind. it did not worked on a server
it worked on a single player but not on MP
only this one did not played
{
sleep 1;
{
waitUntil{_x distance testCar < 10};
[] spawn dub_PT_2;
} forEach allPlayers;
};```
and also the
sleep 1;
waitUntil {!Alive truckbomb};
[] spawn dub_PT_1;
};````
does play for my friend
Is there an out of body camera ? like move the cameara out of the player body, but still control the player?
Anyone know what the deal is with the second return value from diag_codePerformance is all about? If it's set to run 100k cycles and only runs 300, what does that mean to me?
Oh, in standard fashion I figured it out the second I asked. It's the number of cycles it can run in a second, and correlates to the duration
๐
๐
does Terminate also stop scripts with sleep?
@astral tendon you just spawned the script x times number of players
if you want to play the sound remotely
remove the forEach
and do
[] remoteExec ["dub_PT_2", -2]
and switch the _x to player
I would also recommend that you put sleep in the waituntil, it doesn't need to check so often
im trying someting diferent, how do i stop the dub_PT_1?
you need to terminate it
but if you want to do that
you need to name the spawn
how i do it?
blah = 0 spawn {}
@chilly wigeon It has a limit on max execution time to not freeze your game forever. It stops executing when that time is up or it ran the set number of cycles.
If it runs less than the number of cycles it should've then it stopped because the time was up. The less cycles it runs the less precise is the result
Why the blah = 0 part?
Definitely not that
most people do [] spawn {} You have to pass a value in on the left side. You can choose 0 if you want.
But if you don't need to store it in a variable then don't do that
Yes terminate stops scripts with sleep.. Actually it only does that
"name the spawn"
"Put the result into a variable"
this is how it is called
sleep 1;
waitUntil {!Alive truckbomb}; [] spawn dub_PT_1;
};````
that seens to work
so i put like this on the initplayer.sqf
sleep 1;
waitUntil {!Alive truckbomb}; dub_PT_1_running = [] spawn dub_PT_1;
};```
then if i need to stop it
terminate dub_PT_1_running
is all right?
@astral tendon if you want to stop dub_PT_1 Yes.
my problen was when a JIP player connects he run the dub_PT_1 (that truck was already dead) then what happens is that sounds plays wile he was on the base, with this i can try to avoid that
maybe put on onPlayerRespawn.sqf
Jup, but you can also just run the code on the Server side?
that way you eliminate JIP
i tried but it all went sideways
ah k
seens like i can only trust on local files to work
all those codes related to dubing or sounds are stored in initPlayerLocal.sqf
is there a file for when the player connects? the wiki still dead
@astral tendon You could also just check if the player did JIP and then stop the script
true
onPlayerConnected.sqf
onPlayerConnected is a eventhandler. It's not a script file that's auto executed
initPlayerLocal.sqf fires when you join
ah ye
so i tink playerlocal will do the job
I'm lost without wiki ๐ฆ
the code will look like this
sleep 1;
waitUntil {!Alive truckbomb};
dub_PT_1_running = [] spawn dub_PT_1;
if (didJIP) then {terminate dub_PT_1_running};
};```
good to go?
didJIP? where is that defined?
New command
Better of just using an if statement directly, though
Instead of spawning and then checking to remove, check if it should start in the first place
but that would also terminate if someone JIPed before the truck died.
in case if a JIP player join when the truck still alive, the dub_PT_1 will never execute
once it dies
Yea
now i remember that didJIP does not unchek once the player already respaned
so he is a JIP forever with this command
then it can work if i put on the outside
so it will execute only once
just the ```if (didJIP) then {terminate dub_PT_1_running};````alone
but what if he not JIPed?
@astral tendon
dub_PT_1_running = [] spawn dub_PT_1;
if (didJIP) then {terminate dub_PT_1_running};
Wtf? Spawn it and then kill it if JIP... How about not even spawning it in the first place if didJIP?
my problen was when a JIP player connects he run the dub_PT_1 (that truck was already dead) then what happens is that sounds plays wile he was on the base, with this i can try to avoid that - You couple minutes ago.
You can probably check the time how long the player was connected
all your events from the past should trigger within the first 10 seconds
so if JIP and less than 10 seconds on the server. Don't execute script
lets say, a player playing normaly
Ah no I see it... You have a waitUntil for the truck being dead.
You could also use an eventhandler
when truck dies then play music.
Instead of if truck is dead and I didn't play music yet then play music
The eventhandler will only fire when the truck dies. Not later and not sooner
that !Alive truckbomb can be any other code
such as, player inArea Trigger?
or
triggerActivated
Yea
That's why its better to do it server side
and remoteExec to clients the sound functions with JIP disabled
i tried once but it all went clockwise
in the end i had to make way more complicated code just to make sure it execute for other players
remoteExec isn't complicated.
Same for trigger. Instead of a trigger has been activated some time in the past. Just make that trigger execute your code once
in my test, triggers still executes even if the player joins later on the mission
Maybe it wasn't set to trigger once
it was
And.. Just don't trigger on clientside then
trigger serverside only. The server won't rejoin the mission and run old triggers
then the code inside it does not execute for other players that are not the host
and you use remotexec
interesting, i will save that
if i had that early i could solve it faster.
of couse, i need my friend to test with me.
//initServer.sqf
[] spawn {
sleep 1;
waitUntil {!Alive truckbomb};
remoteExec ["dub_PT_1",0];
}
This would do it I believe, but remoteExec can be used in triggers too.
why not xD?
the server is supouse to call the codes in the initPlayerLocal.sqf
server can't go in there
well it could.. But that's not..
intelligent
@astral tendon I assume you set the dub_PT_1 variable in initPlayerLocal?
yes
is this
uisleep 2;
playSound "Play605";
uisleep 2;
playSound "10MC500";
uisleep 2;
playSound "10md500";
uisleep 4;
playSound "10MT500";
uisleep 1;
_civscreen = civscreen;
_civscreen say3D "civsrunning";
uisleep 2;
playSound "Play607";
uisleep 4;
playSound "10MC501";
uisleep 4;
playSound "Play608";
uisleep 4;
playSound "Play610";
uisleep 3;
playSound "CmdA501";
uisleep 8;
playSound "Play609";
};````
Then that code is in the dub_PT_1 variable. Not inside initPlayerLocal
The server doesn't care about where you defined a variable
using remoteExec you tell the client to execute code
the server doesn't care in any way
if you use -2 for targets and you local host it does it run it for the host? because it doesn't run it for the server.
afaik. yes. but I don't use remoteExec much
I use it but it's just from/to HC
another problem is this
```[["civkilled",["-1 respawn tickets",""]] call BIS_fnc_showNotification] spawn BIS_fnc_MP; ````
its on the initPlayerLocal.sqf
it is supouse to show this notification to everyone in the server if a civilian got killed
but, it only shows to the killer
I'm guessing it's in a eventhandler?
yes
addMissionEventHandler [
'EntityKilled',
{
params ['_killed','_killer','_instigator','_effectsUsed'];
if ((side (group _killed)) isequalto CIVILIAN) then {
if (!isNull _instigator) then {
if (_instigator isEqualTo player) then {
if (diag_tickTime > (missionNamespace getVariable ['tag_var_killedCivSound',-1])) then {
_delay = 1;
missionNamespace setVariable ['tag_var_killedCivSound',(diag_tickTime + _delay),FALSE];
if (side player == west) then {playSound selectRandom["civkill","civkill2","civkill3","civkill4","civkill5","civkill6","civkill7"];};
if (side player == sideEnemy) then {playSound selectRandom["Berserk1","Berserk2", "MissionFailedBeserkCIVs"]};
[[west, -1] call BIS_fnc_respawnTickets] spawn BIS_fnc_MP;
[["civkilled",["-1 respawn tickets",""]] call BIS_fnc_showNotification] spawn BIS_fnc_MP;
[if ([west, 0] call BIS_fnc_respawnTickets ==1) then {["warning",["If you kill more Civilians the mission will be failed!",""]] call BIS_fnc_showNotification}] spawn BIS_fnc_MP;
[if ([west, 0] call BIS_fnc_respawnTickets ==0) then {playSound "MissionFailedCivsDead"}] spawn BIS_fnc_MP;
};
};
};
};
}
];
thats it
That's not how you use BIS_fnc_MP really.
I believe
[params, functionName, target, isPersistent, isCall] call BIS_fnc_MP;
you have everything in one element.
also BIS_fnc_MP is old
what is the equivalent to it?
This function is now provided for backward compatibility only. Please use the engine based commands remoteExec or remoteExecCall instead.
remoteExec/remoteExecCall
call one for you as you call BIS_fnc_showNotification]
that also works to a player to other player?
remoteExec [["civkilled",["-1 respawn tickets",""]] call BIS_fnc_showNotification];
like this?
params remoteExecCall [functionName, targets, JIP]
["civkilled",["-1 respawn tickets",""] = params
BIS_fnc_showNotification = functionName
did not make it
remoteExecCall ["BIS_fnc_showNotification"]```
error
what?
missing ]
now it worked
๐ copy/paste error's are a human thing.
i know, i do that all the time.
Riders of the Storm
there is a killer on the road
also, i noticed that in MP the AI i placed spawn in randon possotions some times or even inside one or another
is there a way i can fix that?
Tell them to move xD
also they have that on their init
[this,(selectRandom ["STAND_U1","STAND_U2","STAND_U3"]),"ASIS"] call BIS_fnc_ambientAnim;
also, isn't the uisleep also supouse to stop a script if you pause the game or alt+tab it?
in my
uisleep 2;
playSound "Play605";
uisleep 2;
playSound "10MC500";
uisleep 2;
playSound "10md500";
uisleep 4;
playSound "10MT500";
uisleep 1;
_civscreen = civscreen;
_civscreen say3D "civsrunning";
uisleep 2;
playSound "Play607";
uisleep 4;
playSound "10MC501";
uisleep 4;
playSound "Play608";
uisleep 4;
playSound "Play610";
uisleep 3;
playSound "CmdA501";
uisleep 8;
playSound "Play609";
};```
the sleep still counts and even if the audio stop the sleep keeps couting
fak
i dont know were i got that wrong info
hmm anyone know for sure if object variables persist after the object/unit has respawned ?
You can make other objects respawn when dead with this command:
respawnVehicle
And they won't keep any variables.
yeh, tought so
Playable units keep their variables though.
Unless the player logs off and the slot becomes empty (ai disabled).
Then the unit is temporarily deleted and a new one is made with a new object namespace.
Is made once someone (else) takes the slot.
I think the only thing that persists even when ai is disabled is the vehicle var name, even when changed with command. So you can do some wonky work arounds to keep variables even then.
And even when they don't have a var name from the editor name field.
@astral tendon put the server on loop back mode
run two windowed Armas
and you don't need a friend
Is there a way to get all global variables attached to a mission?
how do you attach something to a mission?
how do you attach variables to anything even
setVariable?
Say I load up a mission, which has 5 scripts. Is there a way to get all global variables in those scripts?
read them
Hopefully that's more clear.
you can check how many variables are in missionNamespace.
But that won't tell you how many of them your scripts cause
if you use a OFPEC tag thugh you could filter the list of variables in missionNamespace by your tag and thus find how many variables with your tag exist
why do you wanna now that?
Just a random question ๐
As expected
There kind of is a way to attach variables to a mission. But it requires you to add a dummy 3den attribute sadly. I always thought about adding support for this to CBA.
Not enough use cases I think though.
@tough abyss delay the execution of those scripts
save the array of allVariables before you run them
then save the same array afterwards
substract them
and you should have a better list
@cunning nebula - what if it's not my mission, and I've not control over its scripts.
Creating a debug tool, I guess?
LUL ๐
๐ค not !
NO :u
_var != []
!_var isEqualTo []
see my problem
suddenly the not goes OUT
๐
and != is not (lel) the same as ! isEqualTo
You're making this more complicated than it is.
_var isDifferentFrom []
coolGuys isNotGoodEnoughOrEqualAmountOfCoolness []
He broke. SQF broke him.
๐ฝ ๐ฌ
@Adanteh#0761 Make a PR
@Adanteh#0761 ?
HAHA
Noice
jesus christ
YOU CANT TOUCH ME
Yes
br0kn
who is your god now!
;_;
@austere granite
๐ ๐ ๐
Works. You scrubs.
@still forum i don't know c++ at all. No idea how to into that
:scream:
._.
I am the one true god. Dscha is a golden cow or however the story goes.
that's why i'm bugging you and stack about intercept-python, duh.
Andanteh is the new god
Heh
cdefgahc
@austere granite
@austere granite
slick
Sweet. I can make an italic mention
@austere granite
No bolding or anything
But i guess it looks cool
Great channel best words.
Yep.
this is what SQF does to you
๐ ๐ ๐ is definitely the best
needs more triggers though
Triggers? are you insane
Ban every mention of trigger here
Banish them to a far land where they can never be seen
Could be worse. Modules
C++17 Modules?
shivers
Or Arma Modules
Yes.
:alien: :smoking:
This is why no one comes to this channel to ask for help anymore.
Yep.
Hello
Can someone tell me why this isn't working on dedicated server ? ?
{parseText format ["One point for <t color='#FF0000'>RED</t><br/>Score : <br/><t color='#0000FF'>BLUE</t> %1<br/><t color='#FF0000'>RED</t> %2<br/><br/>Flag Touch : <br/><t color='#0000FF'>BLUE</t> %3<br/><t color='#FF0000'>RED</t> %4", WScore, EScore, westtouch, easttouch]} remoteexec ["hint"];
hint doesn't take CODE
(parseText format ["One point for <t color='#FF0000'>RED</t><br/>Score : <br/><t color='#0000FF'>BLUE</t> %1<br/><t color='#FF0000'>RED</t> %2<br/><br/>Flag Touch : <br/><t color='#0000FF'>BLUE</t> %3<br/><t color='#FF0000'>RED</t> %4", WScore, EScore, westtouch, easttouch]) remoteexec ["hint"];```
right
i'll try that
Normally I'd say read wiki.. But.. ._. I miss wiki
hehehe
Hello ppl. I have a short question is ther any way to change weapon color without mods?
no
Thanks. Just wanted to be sure.
short question. short answer.
That's all I need ;]
But I expect you mean weapons that a soldier holds in his hands right?
jup. Then the answer is no.
You can retexture vehicles and static weapons though. "weapon" is a very general term ^^
I thought you cannot do it I just needed to be sure ๐
So I got these functions,
class sys_missionStart {
file = "etr_public_servermod\sys_server\sys_missionStart";
class init {postInit = 1;};
class setDate {};
class setWeather {};
};
};```
The init function has ``call ETR_missionStart_fnc_setDate;``. However it doesn't run it's code. Can postInit only go in it's own function? Or am I being stupid again?
"Can postInit only go in it's own function" No
When I run call ETR_missionStart_fnc_setDate; in the debug console it works
check in debug console if the function variable is define........
RPT? script errors?
Nope
I had the function name wrong first it had an error about that but when I fixed no trace of it
also just running ETR_missionStart_fnc_init; it works.
just put a diag_log in to check if it runs.
I'm using setDate might not like it in postInit?
ow it works now :/
๐ช
k it works now also without the diag_log wtf....
this is a server side mod right, but will it execute for both server and HC? (as HC also uses server side mod)
guessing yes
I would say yes.
Yeah, but don't think it's going to be automatically utilize your hc
idk ill just put a if exitwith in it
@simple solstice kicked from the server same steam user already in the game.
Dedi?
@astral tendon 5 sec, need remember my config for MP testing
now i have another problem that i cant join in progress, afther download the mission i get back to the menu
Is there any other location for scripting commands other than the wiki? Never realized how dependant on it I am ๐ฆ
@plush cargo not unless there is a google cached or you downloaded an offline variant
Why has it been offline for more than a day?
Idk, but it must be a conspiracy.
must be trying to stop me finishing arsenal
but it's fully functional now ๐ , mostly
Damn I have off today and really wanted to finish some shit ๐ฆ
just took me 5 mins to remember that _unit join _group should be [_unit] join _group
Use the ingame debug console for hints about the syntax of commands.
Three days and i am almost dead without the wiki
The autocorrection driving me insane in the debug console
{_x playMove "ApanPknlMrunSnonWnonDf";} forEach thisList; how do i make that a local call?
Roque you aren't helping my headache
@subtle ore what I did today
https://github.com/alganthe/ACE3ganthe/blob/arsenal_loadouts/addons/arsenal/functions/fnc_fillLoadoutsList.sqf#L69
sorry, i am not a medic.
@lone glade woohoo!
what I did today
That's like 15 tabs in some lines
not my fault ๐
no, it's not BIS module
ahh i thought you were changing the existing arsenal
i'm not that much into self inflicted suffering
"that much", yeah obv you're into it a lil bit or you wouldn't be coding in the first place
Does anyone here know how setUnitTrait ["camouflageCoef", _x];
works?
Which _x increases the units chance to stay hidden from enemy detection?
(_x > 1) or (1>_x>0) or even (1>_x) ?
I've tried testing this but my test setup showed no effect whatsoever.
0<1, it's a value for unit detection for one of the AI FSMs
0 being no change and 1 being max effectiveness
that is bonkers, so I can only decrease the effect of the units camo but not buff it ?
*default is 1
you absolutely sure it is?
I've checked on a fresh spawned unit(s) player getUnitTrait "camouflageCoef"
oh wait, it's a different one that i'm thinking about, i'm thinking about the config value for uniforms
yea I saw them the higher the less effective they are from 0 to unlimited
now that I think about it, if you're on dev branch get and setUnitTrait are broken due to enum errors
I'm on profiling
should work then, try checking with targetKnowledge on yourself
my setup is a Blufor unit checking by "knowsAbout" and spawning Opfor facing away with varing coef on VR. => no effect
it's a bad test, AI will instantly spot your other unit, there's 0 environmental camo on it
try in a forest / place with high grass and the unit laying down
I've done a similar non scripted approach on altis but the results were varying couldn't get good results there too. guess I'll try again with the script.
ah, I was thinking of the camouflage value in config, and indeed lower is better
there is another trait that works well with camocoef, cant look it up to be sure what it is :/ but I believe that with camo coef they will still realize a unit is there but not be able to find him, you can see the ai trying to target but cant find it.
the audibleCoef? haven't played with that yet, one step at a time
could be that one
hm... any idea if I can save an array in a listnbox? I can't use array indexes as values for each rows, if there's a change in the original array it fucks up
hard to help without more context
why would you need na array inside the listbox itself?
each slot is only made for one thing to go inside it
if you don't know about the subject don't try to answer ๐
oh trust me i know a lot on the subject buddy
but you don't want to tell jack shit on what it is you are trying to do
don't expect help if you have a crappy attitude about it
don't bother posting if you don't actually want help with your question.
you should think about the reply carefully and consider what you are saying before you throw it out there.
first of all, it's a listnbox.
I'm trying to retrieve a nested array ref from an array, I'm currently setting each nested array index in each row, I was wondering if there was a better way than refilling the whole listnbox since if I modify the original array the index isn't right anymore
ahh, that's right, controls can work as namespaces too, found my solution
nope, was legit asking
if (isServer) then { [[delet_1,"GUARD"],BIS_fnc_ambientAnim ] remoteExec ["call"] }
put that code in a func and call it directly
i tried my best to make animations work right in MP, but noting, the animation does play but the unit gets misaligned turned to the wrong direction or is in another place
@astral tendon what do you mean misaligned?
the unit spwaned in other place
or even inside one on another
and they are looking to the wrong direction
have you checked the args for the func?
dont even know what are you talking about
i just copy and paste all exemples i find around
the arguments the BIS func takes
all they have the same problem
i'll send you the func header in pm, since it's quite long
Omfg, never copy and paste the examples and expect them to work pertectly for your needs
Especially when you have no idea what it does or what you need them for
Wtf
@subtle ore i'm crazy or you can't nil vars inside a control varspace? it tells me it's reserved O.o
@lone glade Hmmm. Not quite sure on that one.
Hello I have a quick question, for case selection would something like this work? Case 3 to 5 bla bla
nope
Alright, thanks, wiki is down right now lol
Wtf, I thought discord names like that were outlawed around here
to skip cases you have to do
case 3;
case 4;
case 5: {
// execute code for case 3 to 5
};
fucking annoying as all hell
if you were sorry you'd change it
while {true} do {
_thisguy = _this select 0;
(_thisguy) domove (getPos Player);
sleep 5;
};
};```
still says that _thisguy is not defined but the defination is right there
falls to knees in defeat once again
one day, one day
One day, Roque will stop using triggers. Will stop running loops in unscheduled.
ONE DAY
That have nothing to do with triggers, stop being a salt miner for a moment.
A salt miner? That one is new
tell me, what's the career path for salt miners?
last time I checked, it actually turned out in 40,000 a year in one mining spot. Lool
what kinda of black magic the AI have that they can get in on a locked vehicle afther a doGetOut?
Yep. Unfortunately.
Roque, you and your triggers will do noting more than cause frustrations
Last time i checked it stung pretty badly
i am going to put my frustrations into a trigger, at least it will fail.
Why, you know it's always going to fail
fak
Errr...they like to spin the wheel around a bit
looks like someone trying to get out of their driveway after a hangover
Interesting.
You're saying that was supposed to be a thing?
as in, not accessing inventory on a ladder. Was a bug...?
wtf
odd.
lol, i never tried to opem the inventory wile on a ladder.
Fixed: Lights on vehicles with disabled simulation would turn on after loading the game
omg, i actually was anoyed by this but i tough it would be something on my side. usualy only players see the lights, not the host.
there are more than a handful of people here who like to flash how smart++ and knowledgeable they are
Knowing more than you is no big achievement.
so im trying to use "_addons = activatedAddons; " to get a list of addons for ACEcheck pbo, punching it in debug console but nothing is happening, ctrl p only returns the _addons etc
and I cant access the wiki so i cant even confirm im using the right thing :/
copyToClipboard str ("true" configClasses (configFile >> "CfgPatches") apply {configName _x});
activatedAddons does not do what you think it does. It's essentially useless, because the list is not complete unlike what I wrote. Sorry for knowing more than certain thin skinned people.
yay that worked. Your the man Commy
is it likely that the https://ace3mod.com/wiki/framework/checkPBOs-framework.html could be reflected for that line instead of saying use activatedaddons lol
is there a way to delete out a3 native pbos?
is there a way to delete out a3 native pbos?
copyToClipboard str ("true" configClasses (configFile >> "CfgPatches") apply {configName _x} select {_x select [0, 3] != "a3_"});
Something like this. I can't check right now.
@wraith solstice http://webcache.googleusercontent.com/search?q=cache:hi07P3aY5zkJ:https://community.bistudio.com/wiki/activatedAddons&num=1&strip=1&vwsrc=0
You can use the wiki if you want to
oh nice. Been busy just noticed it was down yesterday/today, any reason?
fixed a missing }
yep that worked
in my
C:\Users\Roque\AppData\Local\Arma 3\MPMissionsCache
i need to keep deleting my mission file so i can keep testing, but i cant delete that wile arma is opem, is there a way to do that with out i have to close arma all the time?
Google "unlocker"
@wraith solstice Yes. There is a reason. Go to Biki and it tells you the reason right in the center of the screen
maintance yeah
๐
Poor programmer sitting 36 hours on maintaining a wiki site.
someone just for got to turn of the maintenance mode
{
while {true} do
{
playMusic "track_4";
sleep 109
}
};```
how do i call it with remoteExec?
"track_4" remoteExec ["playMusic"];
loap?
```"track_4_loap" remoteExec ["terminate"];````what is wrong in this one?
terminate doesn't take string
i see, i tough that the "" were required for the remoteExec to work.
looking for forum post, any info on the wiki coming back up?
Youll need a function for that, roquq. Every client will have a different handle for it im fairly sure
I doubt RE even supports terminate. You can't logically transfer SCRIPT type over the network.
But he doesn't need to remoteExec it because that script is run on the server.
make a function to terminate it
or simply use a variable in your while condition
function is probably better since terminating the script will not magically stop the music
also, why "loap", not "loop" ?
lol. what is a 'loap'?
loafsoap or soaploaf.. I don't think the latter tastes good. But the first one might look fancy
๐
They're quickly rewriting it.
good riddance. Let's redo it right this time.
I also have those handy
lol dedman paranoid?
I have them as templates in my text editor.
No. dedmen*. #Intercept
isn't that beautiful?
macros everywhere
Actually. Intercept could really be the solution.. We wanted to add documentation for every script function. Basically copy from BIKI.
If anyone would've done that it would contain a copy of biki basically
2000 lines of defines
one function call
You're involved in it. Who would suspect the one that brings it up first?
rip sqf
But those know it the best. If anything it kills the new scum.
Well modders do complain a lot all the time. Easier to dev if you cut them loose.
Biking downs?
LMAO
Legacy modders?
You mean these people that use typename or _this select or private ["_var"]?
i am one of those people that uses _this select still lol
Yes they should definetly be purged.
Legacy modders, more like fps thieves!!!
the worst are the guys that use onEachFrame. Instead of the stacked EH
Ewww
Or people who use myVar = condition ? 1 : 0
I can already feel it happening. This will kill arma
@tough abyss execute it inside a onEachFrame handler ๐
myStuff = {onEachFrame myStuff;}
onEachFrame myStuff;
question is actually ... does one wants a command reference or an actual wiki
personally i think a command reference with info pages for eg. events would be better
Not every command needs a page. remoteExec(Call) should share one.
group, units, leader, createGroup should all be on one page.
spawn, terminate, scriptNull, canSuspend. All should be on one page aswell.
I challenge the convention.
The list could still exist, but link some to the same page.
select NUMBER and select CODE should not be on one page.
T_T
Yea.
if then elseif is actually kinda bad if you rember that the elseif condition will always be evaluated no matter if the first one is already true
They made it work for switch, they can get it to work for elseif.
Does vbs have removeItemCargo etc?
condition of switch will also be evaluated when you enter the code block of the switch statement
no
#Intercept. Throw it at me
elseif
wait a sec must think
Make the directCall a intercept command.
would just call isNil.. Intercept doesn't want to have access to the real directCall thingy
an*
I think elseif is possible
directCall has proper return value, isNil has not.
We have that one.. #CBA
Yeah.. That is exactly what the real directCall thingy in engine could do :/ But that's too deep for Intercept
Or.. Well....
It's too deep for Intercept core.. Intercept CBA could do that I guess
https://resources.bisimulations.com/wiki/addWeaponCargo alt syntax. I bet you can use that reference to add attachments
params [["_CBA_code", {}, [{}]], ["_this", []]];
private "_CBA_return";
isNil {
_CBA_return = [_x] apply _CBA_code select 0;
};
if (!isNil "_CBA_return") then {_CBA_return};
There.
https://resources.bisimulations.com/wiki/diag_setMaxBandwidth
https://resources.bisimulations.com/wiki/diag_CPUStress
I guess people would like these. CPUStress does what a lot of people try to do in loads more complicated code
WOAH... I wonder what I get as result when I call a function with an assignment at the end from Intercept..
I want those.
I can give you the CPUStress one
y u still talking?
Intercept get's game_value though..
Our isNil could just be.........................
Nope.
hmm
It's oatmeal raisin :D
https://github.com/intercept/intercept/blob/master/rv/addons/core/lib.sqf#L45 That is what Intercept does on call
it set's variable and then calls isNil with that function as code
I guess I'll have to give access to the real in-engine directCall function then.
How do they name it internally? DC was from cba_oa or older.
Evaluate
I like it. Name it like that.
Or shorten to eval
eval {blah};
I fear it will be all zombies.
Rated for 12yo won't allow ripped off body parts.
Children have too much money.
They already had a problem with Sweden
Yes, regarding ragdolls
Arma 3 alpha had "manipulation of the dead"
Lool
muscles are more spooky than skeletons.
Oh SC is build on RV now?
just joking since looks similar to the animation mishaps seen on Arma
its still the same modified Cryengine as far as I know
xD
@subtle ore source please
@still forum in theory elseif could be realized using code so that it is not auto-evaluated unless needed
@tough abyss "if you want to sell your title in europe, blood must be green, no children or women, no limbs, etc" The no women thing is more eastern europe tho.
@queen cargo Jup. Can just take CODE instead of BOOL.
I know. But the VBS one doesn't
@little eagle does it happen that directCall get's called from unscheduled sometimes?
Maybe.
It doesn't do much then. Just add dumb overhead. But it could be and then should work.
can use canSuspend to reduce the overhead
Why though? Just don't use it when not needed.
just safety to keep good performance when called from usched
It's not like the function is used much now that we figured out isNil does the same. ยฏ_(ใ)_/ยฏ
right now Intercept is quite slow whenever it calls SQF code. Because it has to go through that wrapper with if statements and getVariable and all that crap
Thatโs blasphemy
Stop using legacy crap.
SQF->SQS or Intercept->SQF
I guess I have an Idea for a new project now..
Release TFAR 1.0.
ok.
They already had a problem with Sweden Arma 3 alpha had "manipulation of the dead"
Wasn't that Germany, not Sweden?
Sweden could've saved us from crappy ragdolls.
@dim notch one of those nordic countries, looking for a source now
I'm fairly sure it was Germany, none of the Nordic countries has censorship laws that would cause a problem while Germany has had these issues for decades
I wish google had a wildcard option for searching shit
Germany is traditionally nordic in my book
Usually they made a separate version for German markets but Bohemia wanted to avoid it with Arma
I see
Meh, this is super weired. All i can find on it is iran being pussies over the whole futuristic csat and nato conflicts
That and pubg results are clouding it all
It's weird because it was a fuss being discussed when i was playing arma 3 alpha, but this should be moved to #offtopic_arma
pbug articles are probably paid to appear as google results when looking for Arma. That crap is everywhere.
Figures.
Germany is traditionally nordic in my book but why
it's literally.... germanic
Although i do support the "Countries where they eat salmiak" definition of Nordic
Germany had vikings that invaded France just as much as Sweden. So why not
Source on that? Never heard about serious germanic viking tribes. Germanic pagan tribes? Sure
Coastal raids and shittttt? not really
anyway, that's very offtopic. Germany in general is very harsh with their censorship on games.
Pagans? No they were definitely vikings. Letme give you a source on that
For example HOI4 has a free DLC.... to display hitler portraits, which you don't get if you live in germany
not showing blood is another big one
The same applies to Australia on that one
Another nice one is in Steel division for example, if you have the german version the logos for nazi divisions are just shown as number, instead of their actual logo
Still kind of odd stuff
Regarding the ORBAT module/display, how would I indicate that specific ORBAT group is destroyed?
idk
๐
Someone is fighting really hard.
Couldn't even bother.
I think it's just a mistake.
my favorite is the one @still forum posted on slack
Seeing as how the version number was put in the title i dont think it was a mistakr
I thought all these people moved on to pbug.
I thought so too
da
Maybe all of those pubg players finally realize that arma isn't meant for their silly little deathmatch and rand backwards
"WHY CAN'T I RUN WITH 40KG ?"
I can fit 480 bananas in a bergen, i'm bananacible
๐ ๐
That monkey pooped out a banana.
Most impressive.
still down? pssshhhh
The wiki is dead and Dedmen and Quiksilver kiled it.
๐ธs - tail
It was just the template.
is there a way to make BLUFOR "look" like CIVILIAN so OPFOR won't recognize the player as an enemy?
setCaptive
so can I do like:
{
_x setCaptive true
}
forEach allUnits select
{
side _x == west
};
no
But you can...
{
_x setCaptive true
} forEach (allUnits select {side _x isEqualTo west});
== will error out if you try compare different datatypes aswell
ok, thanks a lot! ๐
Wasn't there also something with arrays?
== and != also errors for ARRAY, BOOL and SCRIPT, because ๐ฉ
there was something with arrays yes.
== doesn't support arrays. I wouldn't call that a difference.
There is no difference between ARRAY == ARRAY and ARRAY isEqualTo ARRAY because one of them doesn't exist
WaitUntil dependable on a call or spawn to be processed?
All suspension commands need scheduled environment. waitUntil is a suspension command. spawn is used to enter scheduled environment. call has no effect on that.
If you're already in scheduled environment, then you can just use call.
So calling Waituntill on a called doesn't work as I assumed, correct?
Example? I can't parse that.
From where?
21:10:21 Error Generic error in expression
From where do you call a function?
21:10:21 Suspending not allowed in this context
21:10:21 Error in expression <
[true] call life_fnc_storagecancel;
};
UiSleep 1;
!life_container_active;
};
>
21:10:21 Error position: <UiSleep 1;
!life_container_active;
};
>
21:10:21 Error Generic error in expression
21:10:21 File core\items\fn_storageBox.sqf [life_fnc_storageBox], line 104
21:10:21 Suspending not allowed in this context
21:10:21 Error in expression < life_fnc_storagecancel;
};
UiSleep 1;
!life_container_active;
};
titleText [l>
21:10:21 Error position: <!life_container_active;
};
titleText [l>
21:10:21 Error Generic error in expression
21:10:21 File core\items\fn_storageBox.sqf [life_fnc_storageBox], line 106```
It complains about the uiSleep, not a waitUntil.
Not really
From where do you call it?
if you call from inside a spawned script then it will be scheduled.
You can call and it will still work
it depends from where you call
Yes, it all depends from where you call the function. It's all about the script environment.
I call it from another called script
call doesn't change it.
Called from dialog
onButtonClick = "[] call life_fnc_useItem;";
then called in that script via: [true] call life_fnc_storageBox;
Ui events are unscheduled. ButtonClick you can't use any suspension commands, because that script runs from top to bottom in one frame.