#arma3_scripting
1 messages · Page 363 of 1
There is a quite popular youtuber that has videos on SQF optimization..
Who?
you improve the compile time.. by like.. a couple microseconds.. You save a couple microseconds on a action that is done once.
If you consider that you will be playing for atleast half an hour.. How much is a couple microseconds of saved time worth?
The guy that made the script that @tough abyss just linked
^ and makes it unmaintainable.
*saves a microsecond for compiling but takes hours more to debug
Instead of giving real advice like following the performance guide on BIKI or using cfgFunctions.. He just ignores people that recommend him to do that.
Be prepared for eyecancer
He has quite a big outreach.. and is using that to teach people pure garbage
We should make a page filled with bad advice and pretend it was good advice.
xD
Why not though? Do you care if people have a bad time with this? Make suggestions that sound clever, but only lead to problems. "Like replace all forEach with count".
not that taboo anymore... Got some performance inprovements afaik
switch is basically just a couple if/then's
hahaha
Yeah but nicer to read.
I should get on some of this spicy fake optimizations
Also, put things into functions with compileFinal, because that is super secure and can't be overwritten!
I've developed a 100% secure way
Illegible code
Obfuscation yeah sure.
Put your script in a computer that is off the grid, then throw it away once the script is done
BOOM, 100% security
I also have a 100% secure way.
uninstall arma
True, can't argue with that.
Yet again with undefined variable.
How and why... it's not possible for nearRoads to return nothing while in the mission map?
As in first setup?
One argument of nearRoads could be nil.
_randRoadObj = selectRandom _iedRoads;
Falls through.
Ohhhh.
Right
I'll try find
selectRandom []
is nil btw.
getMarkerSize could return empty array. and when you then do a select 0 you get nil
No error. 😂 🔫
getMarkerSize reports [0,0,0] at worst
if _iedRoads being empty is the problem.. then check it for not being empty using count
for "_i" from 1 to iedNum do {
if (count _ieds == iedNum*4) exitWith {};
wtf is that?
checking the same condition on every iteration?
_ieds never changes and iedNum also doesn't
https://www.youtube.com/watch?v=452DDfsdOWk
If you wanna see. Btw he is also too dumb to even read numbers.. 0.0012ms is apparently 12 milliseconds..
He also recommends to use incredibly small mission names.. because that will magically improve script performance
omg
My eyes...
Concatenating everything on 1 line is such an eyesore.
He uses chained expressions isn't that a bad idea?
Taking multiple commands and feeding them into each other in 1 statement on 1 line?
@little eagle that I want to be proven 😛
the entire industry has been moving to readable names and some subset of Arma idiots are going backwards? Okaayyyy
He also made Addon Free Arma Radio btw.
I didn't take a look at it's code yet.. And I'm sure I don't want to
I think you are right
I could quite easily remove this.
if (count _ieds == iedNum*4) exitWith {};
It's redundant.
Whats you guys opinion on using call compile preprocessFileLineNumbers in place of execVM?
This was something noted on Virtual Battlespace 3.0 wiki
If your using the code more than once then yes
the online difference is call vs spawn
@scarlet spoke call compile implies that it's used once
you'd have to store the result of compile. instead of calling it directly.
Just use cfgFunctions.
Yeah I know... But it could be that some lines beneath that the exactly same code is written again... Thus used twice but each time recompiled
I might for the sake of prototyping use
compileFinal PreProcessFileLineNumbers
and assign it a function name that is compatible with cfgFunctions.hpp so it can be a seamless transistion
e.g GG_fnc_something
The IED script is fixed anyway
the exitWith might have been the culprit...
Yep it was....
[this,"BRIEFING_POINT_TABLE","ASIS"] call BIS_fnc_ambientAnim;
0 = this spawn {waitUntil {behaviour _this == "combat"};
_this call BIS_fnc_ambientAnim__terminate;}
How come this isn't working
is thier a way to script the new cluster bombs that are dropped to not leave unexploded ordenance on the ground ?
delete them?
or have 100% of them explode ..
the failure rate is in the weapons config iirc
@astral tendon if your mission doesn't work on every difficulty you are doing something wrong
Question answered ✅
on a scale of 1 to awful how much would this script not work
if ("apc1" inArea rearmtrigger1) then {apc1 setVehicleAmmo 1};
} else {
if ("apc2" inArea rearmtrigger1) then {apc2 setVehicleAmmo 1};
};```
Looks pretty bad, but functional. Let me suggest this:
if ("apc1" inArea rearmtrigger1) then {
apc1 setVehicleAmmo 1;
};
if ("apc2" inArea rearmtrigger1) then {
apc2 setVehicleAmmo 1;
};
Oh wait.
if (apc1 inArea rearmtrigger1) then {
apc1 setVehicleAmmo 1;
};
if (apc2 inArea rearmtrigger1) then {
apc2 setVehicleAmmo 1;
};
They have to not be strings.
aah right
private _nil = {
if (_x inArea rearmtrigger1) then {
_x setVehicleAmmo 1;
};
false
} count [apc1,apc2];
woah
working on an addaction for a supply vehicle that will rearm two possible apcs within a certain area of it
Does it count https://i.imgur.com/ZGusQiU.jpg
@little eagle what's wrong with @peak plover's example (besides using count instead of forEach and calling the var _nil)?
or rather, setting a var at all
"Besides"?
Using private _anything is faster than not using private. Don't want any random values floating around and _nil is cool name
Also count is faster than forEach
yes like 0.00000000001 ms
count doesn't imply side effects while forEach does
anyway
preferences
yeah D:
just wonder why doing a count/forEach over a set of objects is "worse" than doing it with 2 blocks which do exactly the same thing
even better would be make a function and call it from the addaction
And have a variable as a acceptable vehicles
why does that need to be fast anyway?
It doesn't.
But this is a game now:
0 = {_x setVehicleAmmo 1} count (list rearmtrigger1 arrayIntersect [apc1, apc2]);
i mean its in a freakin addaction that might be executed once or twice in a mission for two vehicles
oh god
count or apply?
BI Wiki
https://community.bistudio.com/wiki/playableUnits
States that playableUnits either occupied by AI or Players will be in the list. Though in th editor in multiplayer or singleplayer mode only my playable character is being returned.
there is a difference between SP and MP, see the notes - use switchableUnits instead
and if (isMultiplayer) then (…)
Is something up with HandleDamage EH?
It always returns body for hitSelection
and 11 for hitPartIndex
No matter if I shoot the init in the leg, arm, head or body..
did you systemChat to log all the returns?
omg
i systemChat all the others but not _part 🤦
but I can't seem to understand, why the unit shot in the hand, gets damage on other parts. kind of screws up my idea on counting how many bullets the unit took
guys, port a mission to MP or SP works in the same way for workshop?
There must be something wrong with your unit, or a script is causing conflicts. Tested a handle damage eh and it worked just fine
@Katekarin#0291
@astral tendon what?
you know that option we have to export to SP/MP?
works in the same way to the workshop?
What?!?! You have a giant steam button for uploading to the workshop
yes, does that means my mission will work in SP and MP afther i press that giant steam button?
whilst exporting?
i dont undestand, the AI behave diferent in the multiplayer but in the editor works fine
lets say, there is a convoy, the leader turn right but the second guy turn left and the last guy turn backwards and all became a mess
@astral tendon AI is legendarily bad, so don't expect consistent behavior. Just because something worked once, does not mean it will always work.
in this case, it never works in MP
@subtle ore vanilla A3.. only CBA loaded.
But do you refer to the unit taking multiple hits from one shot, or only showing "body"? Which was resolved by me using systemChat to list all of the handlers
@simple solstice which var are you returning that only returns body as a hitpoint?
@subtle ore it's no longer an issue. the "issue" I'm having RN is that it returns multiple values, even if unit is clearly shot in the head, feet or an hand
do I need to filter out very low value damages? so I can count the bullets an unit got shot with
or should I use HitPart for counting and saving the bullets taken
what does index return? Otherwise i would say yeah
@astral tendon read the Wiki entry.... "There is also an advanced setting that controls if unit can activate (wake-up) dynamically disabled entities. The option is located in unit's Attributes menu >> Object: Special States section."
@subtle ore yeah to which one? 😄
It means that unit can cause dynamic sim to be activated for other units; took me 2 seconds to google...
that also means is good or bad?
Not sure, i will be at my pc soon. Hopefully you find an answer soon @simple solstice
It means nothing... it depends on whether you want that unit to wake up other dynamically simulated units or not.
so turning it off makes no diference?
"Controls if the unit can activate dynamically disabled units (default: checked). When unchecked dynamically simulated entities will completely ignore presence of the unit and will remain disabled even if unit is in their activation distance. If checked on player, player will wake-up any entity if in it's activation distance. If checked on non-player unit, the unit will wake-up enemy units (on foot and in vehicles)."
Read the wiki
It definetely makes a difference; depending on what you want to achieve.
It wouldn't be an option if it made no difference
what kind of diference?
Dude... read the wiki... I quoted what difference it makes...
If you don't understand Dynamic Simulation... read the wiki
Something running under Dynamic Sim wont be simulated unless you are close enough
Wake Up means that a Non-Player unit can wake up enemies that are close enough and are dynamically simulated
@astral tendon pretty much every question you're asking here is answered on the wiki, and people are quoting the wiki over and over for yuo
again, there is no good or bad, its a design choice for your mission
everytime I read your questions its already propably answered in the wiki
^
because, if i turn this on, the AI will not move
trying to put the vehicle respawn module to good use but 80% of the time, the vehicles explode when respawning. Sometimes even cause nearby ( 5 meters away ) to explode too because (by the looks of it) the respawning vehicle gets placed on their position and then moved to its originial position. any code in the execution entry that can prevent this?
Did you read what Dynamic Sim does!? @astral tendon .... I'm done trying to explain it. Read the wiki.
Tried
https://community.bistudio.com/wiki/respawnVehicle
?
It feels to me to be superior to the module...
for the new vehicle
doesn't allow for abandoned distance to be implemented too, by the looks of it. Is there a different function for that?
I know AhoyWorld has a pretty one that that disables its physics during the respawn but I rather not use a 3rd party script in this one
How does abandonded distance work in the module version? I'm sure you could whip something up that replicates it
if no player is within the distance they simply respawn it using the selected settings
Yeah that doesn't seem too difficult to implement; might be an approach to take if nothing else works out for ya.
I say that now but then there are all the edge cases
btw, im playing around with BIS_fnc_UnitCapture but I cant seem to get it to work properly. I have used it fine in the past but now it won't detect when i press ESC to stop recording or F1 to save it to clipboard. It records fine, just won't detect my input =/
@simple solstice yea for some reason it still explodes. sqf _this select 0 allowDamage false; sleep 5; _this select 0 allowDamage true;
(using the respawn vehicle module)
The only thing I can think of would be that you aren't selecting the right object to not allow damage on? I don't know the respawn module, always do it manually.
[<new_veh>,<old_veh>] are the passed arguments for the code
(according to the module itself)
_this select 0 is correct, used it earlier today fine
never had this issue with the module, do they explode at the start of the mission or randomly when respawning?
I was testing the respawn, placed an AT mine with zeus near it, detonated it (4 helicopters explode). One respawns completely fine, the other three become stuck in an endless loop of exploding and respawning
ok, so you did not move them from the respawn position?
nope
some times when i turn of and on my PC the mod selection from my arma 3 launcher resets
what looks from the fireball is that the respawn module doesn't place it back correctly, more like to the respawn of another vehicle and thus both explode before the module moving the respawned vehicle back to its initial spawn position
try to use "delete" instead of "delete with explosion effect" as Wreck setting, if you use that now. otherwise you could add a small delay to the respawn and a on kill eventhandler that removes the old wreck a few sec before the respawn
is there a way to save the selection?
it's already set with 'delete'
@astral tendon it literally says 'presets' with save/load/delete options on the top right.
how would this delay be implemented?
cause I am using this warFX mod that shows a clear fireball
and I can see the fireball moving from the position of another vehicle to the position of the initial position of the respawned vehicle
its in the module settings
fak, i though that was for the sethings and not the mods
ah, and the wreck lives for the same time?
the problem to me seems that the initial placement of the vehicle after respawn is the same as that of another vehicle and thus both explode
wreck lives a bit shorter
do you use respawn position modules or "starting position"?
starting position
odd, should not use another one's position then
well either it uses another vehicle's respawn position or the first placement of the vehicle after a respawn collides with the position of a vehicle that happens to be on that position. Both explodes, but the respawned vehicle gets moved to its init position 0.2 seconds after
resulting in two fireballs, and one of them switching from one position to another
it's literally only the helicopters doing it. I had 6 trucks less than a meter from eachother respawn all at the same time and they were perfectly fine
might be an issue with the helis then =/
alright thanks!
BE whitelist?
Doesn't it block all SQF command by default or something like that. I never used it much myself.
@vernal rune I have it myself, in my debug console I made, I remoteExec a function with compile in it, it blocks it.
I've tried to ask both here, Dwarden, other BIMINIONS, no one has a clue.
@tough abyss are you using one module per vehicle or multiple vehicles linked to one module?
Dumb parachutes are now teaching me the Lambert W function.
@vernal rune you can suspend in a scheduled environment....
Spawn is for creating a new thread, its not a control structure like while or a command like sleep...
Obviously you cant
But just put a oef and check that instead
Much better than a new thread anyways
On each frame
...
Then check if a conditions is met
not that discussion again
spawn bad bla
onEachFrame better bla
you do know that msot shit done in onEachFrame is what ppl mean when bad scripted mission is talked about?
because they clutter stuff that is scheduled?
onEachFrame has direct relation with framerate
continue using it as much as possible
maybe someday you archive 2 frames
Not true @queen cargo
Its your only options if you are calling it
Even better using oef if function is used a lot
call != auto-unsuspended
as long as you are in a suspended environment, you can sleep
Well it is if you are not calling it from a already scheduled thread
it is not
that is the whole point @rotund cypress
call is doing nothing but pushing a new scope and accessing the code block in there
- putting input vars into _this
^
give it a callback @vernal rune
@queen cargo as long as you know what you are doing, there is nothing that says oef will issue bad framerate
If you stay under a certain execution time you will be fine
@rotund cypress oef will always affect framerate as engine will wait for it to finish execution
’’’If you stay under a certain execution time you will be fine’’’
code then looks something like this then:
[<ARGS>, {<continueWithCode>}] call My_fnc_target;
’’’If you stay under a certain execution time you still affect framerate’’’
Please do that, before people keep talking about dumb unrelated shit.
Sounds like a bad way of doing it
Let server set the var on client
No need to make a function
Then you can also use pvar evh
Pvar evh
Public Variable Eventhandler
Eh?
Lol?
alternative variant:
X39_fnc_continueWith = {
params ["_args", "_fnc", "_continueWith"];
if (canSuspend) then
{
private _res = _args call _fnc;
_res call _continueWith;
}
else
{
_this spawn X39_fnc_continueWith;
};
};
[[1,2], Some_fnc_add, {hint _this;}] call X39_fnc_continueWith;
RemoteExec has much more overhead than pvar @vernal rune
^ + pvar has priority
setVariable
Like what are you ’laughing out loud’ about? @vernal rune I am very curious
Thats what you use pvar evh for
.....
setvar public has no priority
@vernal rune enlighten me
0 spawn {
private _clientVar = random 5;
{
// the server
private _serverVar = random 5;
[_serverVar, {MyVar_RE = _this}] remoteExec ["call", remoteExecutedOwner];
} remoteExec ["call", 2];
waitUntil {!isNil "MyVar_RE"};
private _serverVar = MyVar_RE;
MyVar_RE = nil;
systemChat str [_clientVar, _serverVar];
};
Does this make any sense to anyone?
You can do that
And using remoteexec for that over pvar evh would just be stupid
instantly
That is why you use pvar
The owner ids are pretty borked for RE, so idk if it works with publicVariableClient all the time.
Never had any problems with it ^
Try a local hosted save game.
Well then you are ownerid 2
So... Isn't what I posted more or less what was asked for?
Cause you are also server when local
MIA?
Yep, just what I posted.
2 is not always server
Missing in action (MIA) is a casualty classification assigned to combatants, military chaplains, combat medics, and prisoners of war who are reported missing during wartime or ceasefire. They may have been killed, wounded, captured, or deserted.
server can actually be anything from 0 to <MAX>
once had server at 11
was back in beta ... but still ...
It can't be 1. And it can't be 0 unless you count SP I guess.
2 is reserved for server
There is no 2 in a loaded local hosted game.
The documentation is a lie.
Pointless discussion
PV 2 would still refer to the server though.
Pointless discussion
Yep
0 spawn {
private _clientVar = random 5;
{
// the server
private _serverVar = random 5;
[_serverVar, {MyVar_RE = _this}] remoteExec ["call", remoteExecutedOwner];
} remoteExec ["call", 2];
waitUntil {!isNil "MyVar_RE"};
private _serverVar = MyVar_RE;
MyVar_RE = nil;
systemChat str [_clientVar, _serverVar];
};
Variable
last line. I just used systemChat, so something happens.
[0,-2] select isDedicated
No.
-2 ???
Everyone except 2
Yes but why? @cloud thunder @little eagle
@vernal rune THEN USE CONTINUEWITHPATTERN
0 spawn {
private _clientVar = random 5;
{
// the server
private _serverVar = random 5;
[_serverVar, {MyVar_RE = _this}] remoteExec ["call", remoteExecutedOwner];
} remoteExec ["call", 2];
waitUntil {!isNil "MyVar_RE"};
private _serverVar = MyVar_RE;
MyVar_RE = nil;
[_clientVar, _serverVar]
};
THERE IS YOUR RETURN
happy?
he wants that MyVar_RE in his current method commy
My function can. Just at least try to understand it...
only workaround is a continueWith variant
then enlighten us
how is it not possible to use any spawn
i know
you cannot return the future
unless you wait for it
waiting is only possible in suspended environment
there are workarounds, like a continueWith implementation
but you HAVE TO wait
I have no idea what this is about anymore.
arma is not built to allow for that kind of communication
use extensions if it is that important for you
no
you just are not willed to listen
^
either throw all stuff away or start to listen
What does the server even do that is so important that it can't wait half a second?!
That's about how long it takes to send variables around.
What is this about exactly?
^ therse no realtime
what original problem @vernal rune
Yeah. Even unscheduled scripts take their time.
you run a windows ... there is no realtime in windows
And there is absolutely no chance to have this run in scheduled environment?
THIS_fnc_Ducky = {
{
// on the server
private _serverVar = random 5;
[_serverVar, {MyVar_RE = _this}] remoteExec ["call", remoteExecutedOwner];
} remoteExec ["call", 2];
waitUntil {!isNil "MyVar_RE"};
private _serverVar = MyVar_RE;
MyVar_RE = nil;
_serverVar
};
Because this would solve your problem easily.
Henlo
@little eagle He could just use a global array and use pushBack to get a return
From remoteExec you can.
call then within the func []spawn{}
remoteExecCall you can't.
You can't waitUntil from a call
Yes you can.
Like geek said though I think u can do what he daid
He is doing it...
remoteExec -> Executed in scheduled environment
remoteExecCall -> Executed in non-scheduled.
0 spawn {
call {
sleep 5;
systemChat "hw";
};
};
^
There. sleep in call
.....
@vernal rune why you need the result in that particular function?
why you cannot use a continueWith variant
0 spawn { //Scheduled //
call { //scheduled // {
sleep 5;
systemChat "hw";
};
};
use an array.
But then you cant get a return from the spawn commy
0 spawn {
_var = call this_fnc_HERE
};
There, everything solved.
WHY NOT
You're not cut out for this, Duc0.
Attacking people who are trying to help doesn't help...
now move that <continueWith> into either my, or the one commy posted
and you are fine
i wont start using private in code areas that serve as example @empty blade ... i know about that stuff, not like i am a rookie
It's not attacking if it's the truth.
now back to important questions: how the fuck to add product variants to Magento 2.1? (hint: obviously not expecting answer here)
yet you still have not provided a reason why you cannot use our solutions
post your code
all of it
point to the correct spots
and i tell you why you fail to listen @vernal rune
Is this some elaborate trolling attempt?
start to believe in it ...
because ppl could steal it?
start private convo
send me the link
and i will check
<---- there's the door
he wants to get a return from remoteexec of some code I believe from like re to server to client I think ... I don't care tbh
that @little eagle
@little eagle there is no door sir
@vernal rune you cannot explain why, you do not want to share your code with anybody
there is no way we can help you
if you are stubborn as this
🍿
ok ok ok ...
Oh boy
Omg.
we tell you how you have to code
@vernal rune 🥄 feed
My eyes...
and you do not fucking listen
This is amazing.
@vernal rune I think this is not the place for you
Teach me. lol
neither you tell us properly why you cannot apply those things we post
burries head in sand has better things to do than listen to trolls
We have told you multiple ways of returning something @vernal rune
0 spawn { //Scheduled //
call { //scheduled // {
sleep 5;
systemChat "hw";
};
};```
THIS_fnc_Ducky = {
{
// on the server
private _serverVar = random 5;
[_serverVar, {MyVar_RE = _this}] remoteExec ["call", remoteExecutedOwner];
} remoteExec ["call", 2];
waitUntil {!isNil "MyVar_RE"};
private _serverVar = MyVar_RE;
MyVar_RE = nil;
_serverVar
};```
```sqf
X39_fnc_continueWith = {
params ["_args", "_fnc", "_continueWith"];
if (canSuspend) then
{
private _res = _args call _fnc;
_res call _continueWith;
}
else
{
_this spawn X39_fnc_continueWith;
};
};
[[1,2], Some_fnc_add, {hint _this;}] call X39_fnc_continueWith;```
It is just impossible to get a return over RemoteExec @vernal rune
It isn't if it's a global variable.
But you can send stuff over still
@vernal rune neither did we
we showed you solutions to your problem
^
Yes they are
you fail to extrapolate how those are not suitable for you and just say "they arent solutions"
because he tilts @rotund cypress
I think there is a lot of missing content over what duc0 wants to achieve over his system ?
use Atwood rope @vernal rune
@lavish ocean please give us relieve
stream it
^
Facebook live ?
But how are you supposed to wait until the var has been set
waitUntil {!isNil {_obj getVariable "Some_Var"}};
^
@vernal rune I suggest saving your typing, cause no one will want to help you anymore...
Therefore scheduled environment.
...
why you cannot use any of those solutions we provided @vernal rune
and do not start again with THEY ARE NO SOLUTIONS
Go back to stealing code I guess @vernal rune
I waituntill all the time outside of unsheduled enviroment
They're good solutions. Or at least good places to start.
come on guys no need to throw accusations of content stealers
^+1
hard to imagine someone this rude still getting help, like your dedication 👍
let's all sit back relax and have popcorn
🍿
@scenic shard it is 🍿 time, no dedication
already gave you my github link
besides some old projects i deleted, all are on there
pick any of them
simple answer
x39 is a talentless hack : >
@little eagle that was rude 😦
IM sure you can make something better @vernal rune
Too bad there is no kappa emoji on here
Maybe if you would be a bit better coder, you could've made a dialog without any of these tools @vernal rune
UI is not are hard as you think it's all event driven.
Sorry, if you would be a coder.
And base-class defined tree structure.
lemme repeat @vernal rune ... pick one ...
https://github.com/X39/ObjectOrientedScripting (c#)
https://github.com/X39/sqf-vm (c)
https://github.com/X39/ArmA-UI-Editor (c#)
https://github.com/ArmA-Studio/ArmA.Studio (c#)
https://github.com/X39/Project-Alcatraz
https://github.com/X39/XMS2
https://github.com/X39/XInsurgency (auto-gen, use OOS_Insurgency for actual code)
https://github.com/X39/XLib
https://github.com/X39/XMedSys1
take any of theese and leave please @vernal rune
🍿 time is over, you are the worst troll ever
Starting in controls[] = { } class declaration.
etc.
then the other UI elements are embedded in those.
The top class name is whatever you define first.
UI ressembles OOP. Having base-classes and child classes.
I make most dialogs from code
DucO you've provided no code only pseudo example. even if you wanted to keep your actual code you could rewite code to server as example and maybe get more constrivite applicable answers but it all speculative at this point so its pointless no .
config is barely OOP based
I have a hard time believing you can do any code @vernal rune
Is it over?
Is it at all? @queen cargo
Code is my sexual partner
No objects, just classes, no? @queen cargo
i hope , can't keep up with the chicken coop banter
Well technically if you want to look at it from a programmers perspective, ArmA 3 SQF isn't really "code"
script
It's script, clear difference.
@rotund cypress more or less ... the : is actually just a sort of lookup
that then checks until it hits root
Python is script, yet python is actual programming language but 🤷
X39 has publicy released some code on various places. I think I used a bit of it in BMR Insurgency... it is good..
Yes, but you can't compare that to the great Duc0 and his secret super code.
😄
@rotund cypress and what happens in reality? config parser just looks in the upper classes
Of course, but I wouldn't say its any OOP?
config is barely OOP based in my eyes, barely would point to "a bit" or "parts of"
Which in reality is entirely false
As there is no instances or any objects at all
Just classes
And ye, these configs are just cheesy
There is both child and base classes
c++*
But beyond that no they don't have anything else.
@tough abyss scripting does not require a explicit compilation step, code does. pretty much the only difference afaik
I assume you meant any of your other projects in other languages then 😉 @queen cargo
^
Interpreter
@rotund cypress those configs are just not throught to end through ... https://github.com/X39/dotX39/blob/master/dotX39_cpp/example.x39 was my fun-project when i got bored and needed some way to read data
UI ressembles OOP. Having base-classes and child classes. @tough abyss wrote this and i just responded @rotund cypress
first thought you talked about something else
and that was the whole point @vernal rune we all cannot know and work with what you provide us
give is more and we can tell you how to adjust to make it work
You make me agree with X39!!
and me with commy ...
and that is no stable state in this channel
that is actually a toxic state
Its a simple concept ok
You'd think.
and we told you how that "simple" concept can be solved in SQF
Programmers need to communicate...
First thing C# book started teaching
Programmers are "good communicators"
first lecture in my book would be you know nothing, ever
so you go one scope higher and apply a continueWith pattern there
thats why i posted you a continueWith method at all
so that you can take it, and put it where it is needed
to pseudo again for me.
@cloud thunder problem is:
...
[] call {
...
[] call {
//Our actual problematic scope and reason we talk
_x = <solution>
_x
};
};
...```
@vernal rune: Yeah @X39 You actually have some respectable code Ill give you that, but im still not saying you have a clue what im on about
I am sure you are the one person to be able to judge if someone has "respectable code", with your amount of competence.
but you can do call withinin call. I think i;ve done that..
Um really don't want to see it at all anymore.. I told you rewrite it so you could get constructive response ..
@vernal rune yes ... we all in this channel just want to steal code
i personally already took @little eagle code snippet and put it somewhere in my code so that i got more lines
When you have the same amount of coding hours as X39 @vernal rune, you can come back and say things...
When people are trying to help you, don't give them crap and say they don't have a clue what they're on about, just because you do not like the answer.
omfg ...
Get the ban hammer ready.
where is @open vigil when you need him?
noone knows what your on about Duc0
why we talk to you at all ..
Quotes are with ""
My brain is just dieing from this...
Yes, you were saying people do not know anything about your problem...
Another guy who ruined his reputation in the ArmA community, good lock ducko 🍿
should send him to #ip_rights_violations
^
what
🤣
I'm behind 5 proxies.
IP => Intellectual Property
that kind of stuff you do not have
Well one would, when i've spent like an hour explaining the same problem and you responding with the same thing still thinking its right when ive said that it isnt
you got solutions that work for what you explained
and yet have to explain why
and do not start again with CUZ NO WORK
The posted solutions work just fine.
If you say they don't, then it shows that you don't understand them. Nothing more.
i know
it is called: artistic freedom
Tipp for you @vernal rune
either start providing proper code so that we can explain, as your communication skills suck so bad that i would want them to pay me for letting it suck me off
or stop right here
🤦🤦🤦🤦
maybe we approach this from the wrong side ...
see ...
we do not have any knowledge of your code
whole situation you explained is this
...
_res = [] call magic;
...
that is all
we showed you how you can solve this
...
[_res, magic, {
....
} call continueWith;
and you just said THAT SOLUTION IS NOT WORKING
and showed of your example again
[@vernal rune] call banhammer
must be lifer or want to monitize
i offer you this one more time: send me a link to your code or fuck off ... using this as excuse for actual work i get paid for
sadly community is not yet doing so (bad community)
good
in case you did not noticed
i am the last person in this whole channel that was willed to help you
you literally lost ALL here
xD
I'm getting paid sitting here good way to get your SQF based job then lost ....
by ruining reputation in the only community that is actually able to help you
i highly doubt you get paid at all at this point as i expect you to be in the age range of 8-14
Who said it was just an accusation??? https://gyazo.com/ae91752277c92549cf89b7d23a795d08
🍿
looks like an interesting server
You have an interesting friend circle ^
No one that I would like to hang out with
oooh 🔥
Keep it down with the personal insults, big man!
now i am sure i talk with someone at the age of 13, ty @rotund cypress
"Arma leaks"? Is this some kind of piracy related stuff?
Yes
@open vigil
They posted a lot of private missions
sell hacks
suggested ages ago
He'll PoQ
nobody followed
Somewhere else 👋
omfg ... i am still not sure if trolling or if serious
😂
Love love love this channel.
need battle eye for arma discord
we need to get the toxicity grade back to normal level @little eagle ... Macros are crap
And I'm not even the main attraction today.
Macros are crap
Oh deer
cannot continue living in peace with commy2
Then it would end up in an even worse shape I suppose 😂 @cloud thunder
but you guys kissed
Well @queen cargo I keep going back in fourth, liking them or not liking them
simple rule in this channel: the moment commy2 and i agree, something is very very wrong
back and forth, was it only a fling?
Its for sure I am trying to stay absolute minimal with macros at least
thats a constant
Yes. The = is wrong and so is the ;
=?
No
There is no constants in ArmA @queen cargo
;
Or am I wrong?
Don't even need the ; ?
Nope, the ; breaks it
#define h 10
ah k
Constant in C/C++ ^
Sorry, look now @queen cargo
No more horrendous names :D
#define NUMBER_OF_IEDS_TO_CREATE 30 //Number of IEDs on map
#define DETONATE_IED_WITH_WEAPONS true //Can the IED be killed with weapons?
#define DEBUG_MARKERS true //Show IED markers on map?
^
Thats not a real constant ^^
I think you can use #define in C
You can
Yep.
const int a = 1; is not really a REAL constant
ArmA 3's screwed like that.
ForEach, (PHP / C#) , #define from C
#include from C++ / C
that is a constant in ANSI C
What a frigging mess.
no
that is a define (or macro)
Shh, someone wants help.
So this is bad?
#define NUMBER_OF_IEDS_TO_CREATE 30;
yes, too many IEDs 😦
It's a define, but still a constant @queen cargo
It was a joke.
Crappy function is crappy
iedAct = {
_iedObj = _this select 0;
if (mineActive _iedObj) then {
_iedBlast = selectRandom iedBlast;
createVehicle [_iedBlast,(getPosATL _iedObj),[],0,""];
createVehicle ["Crater",(getPosATL _iedObj),[],0,""];
{
deleteVehicle _x;
} forEach nearestObjects [ getPosATL _iedObj, iedJunk, 4];
deleteVehicle _iedObj;
};
};
Re-write it.
@rotund cypress after the preproc is done, it gets passed to the actual compiler which then takes the VALUE from the define
real constants need to be language based
not preprocessor based
Sorry, but I didn't quite understand what you said there @queen cargo
I was not talking about SQF so you know
or && instead of and ?
preprocessor is a separate level of the chain
constants need to be known at compile time
preprocessor will just replace text with whatever you defined
-->
#define foo 2
foo call fnc_bar```
gets
```sqf
2 call fnc_bar```
^
Ye exactly
It's for convience.
But that is not the case in C/C++, no?
it is even more clear in c/c++
I mean in C/C++ they are not preproc
Hmm, let me read
preprocessor is a separate level of the toolchain
you could code c/c++ and sqf too without it completly
but it would not make things easier
I see, alright
difference gets more clear in languages that do have preprocessors but no way of defining macros
eg. c#
you can add defines as flags but to create a constant, you need to use language tools
the compiler then still does just what the preproc does too
but it is the level in the toolochain that differs
Alright, but all I can say is, that from what I have learnt with C, is that using const does not give you a real real constant
gn8
Why do I get the feeling processing this IED list first would be faster and more efficient.
Generates the random IEDs and junk first then places them.
is copyToClipboard limited ?
@slender halo format is
Ae^(kt)+Bt+C=0
Solve for t.
can you explain ?
copyToClipboard format[...] is limited to the limit of format
Every string can only be 1e7 chars long or something like this.
With format it's like 8000 chars
From Arma 3 v1.55.133789 strings are limited to maximum of 9,999,999 (sometimes 10,000,000) characters
Yep.
buildList = [];
for "_k" from 1 to NUMBER_OF_IEDS_TO_CREATE do {
buildList pushBack [(selectRandom iedJunk),(selectRandom iedList),selectRandom(iedBlast)];
};
OK?
I found out how to massively improve this IED script
Nested arrays then using (_x select 0 <-> 2) to pull the data out.
@queen cargo ?
mhh?
Is that better ?
The code I placed above?
It eliminated multiple calls to selectRandom
Pre-compute the results then just feed them into the code using _x select 0 etc/
did not saw what it was before
but it is a start
or more: it is ok
looks good
and besides the selectRandom it even is executable in sqf-vm of mine ❤
Is there a way to prevent the weight of pylon weapons from affecting helicopter flight performance?
Only thing I can think of is using a negative setCustomWeightRTD value inside of a weapon fired eventHandler i.e. adjust the vehicle weight each time a pylon weapon is fired.
But that doesn't sound like it would be kind to performance...
Simply setting the weight once won't work because after all weapons are fired the vehicle will weight way less than it should when empty...
pylon weapons don't have weight that affects flight performance.
Helicopters do, at least they do with the AFM
Load two bombs on a pawnee and it'll barely take off
^Not that I plan to load bombs, but rather just disable weapon weight in general because why not
oh maybe helis donn't know for sure but deff not fixed wing and bis announced they probably are not going to make it a thing. Is that with or without AFM Nutter?
Pylon weapon weight affects flight performance when using AFM
Haven't tested without AFM, but I think it still does...
k makes sence. Your original solution doesn't sound like it would be performance heavy..
anyone else work in a store? ```sqf
aph_ChangeDue = {
params ["_changeDue"];
_quarters = 0;
_dimes = 0;
_nickels = 0;
_pennies = 0;
while { _changeDue >= 25 } do
{
_quarters = _quarters + 1;
_changeDue = _changeDue - 25;
};
while { _changeDue >= 10 } do
{
_dimes = _dimes + 1;
_changeDue = _changeDue - 10;
};
while { _changeDue >= 5 } do
{
_nickels = _nickels + 1;
_changeDue = _changeDue - 5;
};
while { _changeDue > 0 } do
{
_pennies = _pennies + 1;
_changeDue = _changeDue - 1;
};
[_quarters, _dimes, _nickels, _pennies];
};```
uhm .. what?
giving correct change, and letting the computer do the thinking
buildList = [];
_iedsCreated = [];
for "_k" from 1 to NUMBER_OF_IEDS_TO_CREATE do {
buildList pushBack [(selectRandom iedJunk),
(selectRandom iedList),
(selectRandom iedMarkers)];
};
private ["_junkType","_iedType","_iedArea",
"_iedRoadsPos","_randRoadObj","_iedBomb",
"_iedPos",""];
{
_junkType = _x select 0;
_iedType = _x select 1;
_eachMarker = _x select 2;
_iedArea = (getMarkerSize _eachMarker) select 0;
_iedRoadsPos = getMarkerPos _eachMarker;
_iedRoads = _iedRoadsPos nearRoads _iedArea;
diag_log format ["Nil value found %1",_iedRoads find nil];
diag_log format ["_iedRoads: %1",_iedRoads];
randRoadObj = selectRandom _iedRoads;
diag_log format ["_randRoadObj %1",_randRoadObj];
_iedBomb = createMine [_iedType,getPosATL (randRoadObj),[],8];
_iedBomb setPosATL(getPosATL _randRoadObj select 2 + 1);
_iedBomb setDir(random 359);
_iedJunkObj = createVehicle [_junkType,getPosATL _iedBomb,[],0,""];
_iedJunkObj setPosATL(getPosATL _iedBomb select 2 + 1);
_iedJunkObj enableSimulationGlobal false;
if ( DEBUG_MARKERS ) then {
_iedPos = getPosWorld _iedBomb;
_mkrID = format ["m %1",_iedPos];
_mkr = createMarker [_mkrID,getPosWorld _iedBomb];
_mkr setMarkerShape "ICON";
_mkr setMarkerType"mil_dot";
_mkr setMarkerBrush"Solid";
_mkr setMarkerAlpha 1;
_mkr setMarkerColor"ColorEast";
};
} forEach buildList;
Explain to me why randRoadObj constantly comes back saying variable is undefined?
Maybe I should wrap it into a function.
Ehhh yeah why not.
It would make it more usable.
I'd not make it a function till at all works. Maybe nearroads is returning empty array if it can't find a road so count if nearroad array is > 0 then select road and do rest of code. Why private "" empty string?
Found the issue with the code.
null
a null return from the nearRoads code.
How do you check if something is null?
if you can do that?
@cloud thunder ?
(_obj isEqualTo objNull)
Can't use isEqualToType?
Seriousl type is object
needed boolean...
What...
Error position: <!_randRoadObj isEqualType objNull)
Error !: Type Object, expected Bool
Error position: <!_randRoadObj isEqualTo objNull) then {
Error !: Type Object, expected Bool
Huh?
no start (?
"_iedRoads: []"
"_randRoadObj <null> \n"
It keep dumping null
not object null
Could it be the array is too big?
"_iedRoads: [107566: asf10 100.p3d,107565: asf12.p3d,107563: asf10 100.p3d,107564: asf12.p3d,107562: asf12.p3d,107561: asf12.p3d,107560: asf12.p3d,107568: asf10 100.p3d,107570: asf12.p3d,107569: asf12.p3d,107567: asf10 100.p3d,168636: asf12.p3d,107572: asf12.p3d,166637: asf12.p3d,107571: asf12.p3d,168639: asf10 100.p3d,168638: asf10 100.p3d,168637: asf12.p3d,168736: asf10 100.p3d,168640: asf10 100.p3d,168641: asf10 100.p3d,25447: sil12.p3d,25444: sil12.p3d,457532: sil6konec.p3d,168737: asf10 100.p3d,168738: asf12.p3d,168734: asf6konec.p3d,168720: asf12.p3d,168721: asf12.p3d,168719: asf10 50.p3d,168740: asf6konec.p3d,168742: asf6.p3d,162009: most_bez_lamp.p3d,54068: most_bez_lamp.p3d,168717: asf10 50.p3d,168714: asf10 50.p3d,168715: asf10 50.p3d,168718: asf10 50.p3d,168716: asf10 50.p3d,25811: asf10 75.p3d,25812: asf10 75.p3d,25810: asf10 75.p3d,25813: asf10 75.p3d,25814: asf10 75.p3d,54128: most_bez_lamp.p3d,25816: asf25.p3d,25817: asf25.p3d,26330: asf25.p3d,582935: asf12.p3d,26331: asf25.p3d,582937:
Thats a lot of OBJ entries.
resize the array?
to as many entries are needed?
isEqualToType is not a command. a nullobject isEqualType objNull . _randRoadObj in last post but code is using global var?
Oh it got changed.
buildList = [];
_iedsCreated = [];
for "_k" from 1 to NUMBER_OF_IEDS_TO_CREATE do {
buildList pushBack [(selectRandom iedJunk),
(selectRandom iedList),
(selectRandom iedMarkers)];
};
private ["_junkType","_iedType","_iedArea",
"_iedRoadsPos","_randRoadObj","_iedBomb",
"_iedPos"];
{
_junkType = _x select 0;
_iedType = _x select 1;
_eachMarker = _x select 2;
/*
_iedArea = (getMarkerSize _eachMarker) select 0;
_iedRoadsPos = getMarkerPos _eachMarker;
_iedRoads = _iedRoadsPos nearRoads _iedArea;
*/
_iedRoads = [_eachMarker] call findRoads;
diag_log format ["Nil value found %1",_iedRoads find nil];
diag_log format ["_iedRoads: %1",_iedRoads];
_randRoadObj = selectRandom _iedRoads;
diag_log format ["_randRoadObj %1 \n",_randRoadObj];
if !(_randRoadObj isEqualTo objNull) then {
_iedBomb = createMine [_iedType,getPosATL (_randRoadObj),[],8];
_iedBomb setPosATL(getPosATL _randRoadObj select 2 + 1);
_iedBomb setDir(random 359);
_iedJunkObj = createVehicle [_junkType,getPosATL _iedBomb,[],0,""];
_iedJunkObj setPosATL(getPosATL _iedBomb select 2 + 1);
_iedJunkObj enableSimulationGlobal false;
if ( DEBUG_MARKERS ) then {
_iedPos = getPosWorld _iedBomb;
_mkrID = format ["m %1",_iedPos];
_mkr = createMarker [_mkrID,getPosWorld _iedBomb];
_mkr setMarkerShape "ICON";
_mkr setMarkerType"mil_dot";
_mkr setMarkerBrush"Solid";
_mkr setMarkerAlpha 1;
_mkr setMarkerColor"ColorEast";
};
} else {
_iedRoads = [_eachMarker] call findRoads;
};
} forEach buildList;
sleep 5;
{
CIVILIAN revealMine _x;
EAST revealMine _x;
} forEach allMines;
diag_log count(buildList);
_randRoadObj on the final run fails and returns null
whats findRoads
//Get all road positions
params ["_marker"];
_iedArea = (getMarkerSize _marker) select 0;
_iedRoadsPos = getMarkerPos _marker;
_iedRoads = _iedRoadsPos nearRoads _iedArea;
_iedRoads;
systemChat to the rescue
entries several of them have null
the way you build the code, it gets very hard to debug
instead of working like you do it right there, try to first get all data and then just process it
eg. create an array [<markername>, <iedarea>, <iedRoads>, ...] and then use that
using params you then can put each element into a variable
that array in the endoutput then is WAY easier to debug
This is still a prototype.
as you can see at glance then what is the source
buildList = [];
_iedsCreated = [];
for "_k" from 1 to NUMBER_OF_IEDS_TO_CREATE do {
buildList pushBack [(selectRandom iedJunk),
(selectRandom iedList),
(selectRandom iedMarkers)];
};
private ["_junkType","_iedType","_iedArea",
"_iedRoadsPos","_randRoadObj","_iedBomb",
"_iedPos"];
{
_junkType = _x select 0;
_iedType = _x select 1;
_eachMarker = _x select 2;
/*
_iedArea = (getMarkerSize _eachMarker) select 0;
_iedRoadsPos = getMarkerPos _eachMarker;
_iedRoads = _iedRoadsPos nearRoads _iedArea;
*/
_iedRoads = [_eachMarker] call findRoads;
diag_log format ["Nil value found %1",_iedRoads find nil];
diag_log format ["_iedRoads: %1",_iedRoads];
_randRoadObj = selectRandom _iedRoads;
diag_log format ["_randRoadObj %1 \n",_randRoadObj];
if !(_randRoadObj isEqualTo objNull) then {
_iedBomb = createMine [_iedType,getPosATL (_randRoadObj),[],8];
_iedBomb setPosATL(getPosATL _randRoadObj select 2 + 1);
_iedBomb setDir(random 359);
_iedJunkObj = createVehicle [_junkType,getPosATL _iedBomb,[],0,""];
_iedJunkObj setPosATL(getPosATL _iedBomb select 2 + 1);
_iedJunkObj enableSimulationGlobal false;
if ( DEBUG_MARKERS ) then {
_iedPos = getPosWorld _iedBomb;
_mkrID = format ["m %1",_iedPos];
_mkr = createMarker [_mkrID,getPosWorld _iedBomb];
_mkr setMarkerShape "ICON";
_mkr setMarkerType"mil_dot";
_mkr setMarkerBrush"Solid";
_mkr setMarkerAlpha 1;
_mkr setMarkerColor"ColorEast";
};
} else {
_iedRoads = [_eachMarker] call findRoads;
};
} forEach buildList;
sleep 5;
{
CIVILIAN revealMine _x;
EAST revealMine _x;
} forEach allMines;
diag_log count(buildList);
The only error in the entire thing
is 1 variable
the returning of the actual road obj.
One thing to note
this is a community map
Sarahani
2120
is what _iedRoads returns
count _iedRoads(2120)
buildList = [];
_iedsCreated = [];
for "_i" from 1 to NUMBER_OF_IEDS_TO_CREATE do {
buildList pushBack [(selectRandom iedJunk), (selectRandom iedList), (selectRandom iedMarkers)];
};
private ["_junkType","_iedType","_iedArea", "_iedRoadsPos","_randRoadObj","_iedBomb", "_iedPos"];
buildList = {
_x params ["", "", "_eachMarker"];
private _pos = getMarkerPos _eachMarker;
_x pushBack _pos;
private _range = (_pos select 0) max (_pos select 1);
private _roads = _pos nearRoads _range;
_x pushBack _roads;
} apply buildList;
{
_x params ["_junkType", "_iedType", "_eachMarker", "_iedRoadsPos", "_iedArea", "_iedRoads"];
_randRoadObj = selectRandom _iedRoads;
if !(_randRoadObj isEqualTo objNull) then {
_iedBomb = createMine [_iedType, getPosATL (_randRoadObj), [], 8];
_iedBomb setPosATL(getPosATL _randRoadObj select 2 + 1);
_iedBomb setDir(random 359);
_iedJunkObj = createVehicle [_junkType, getPosATL _iedBomb, [], 0, ""];
_iedJunkObj setPosATL(getPosATL _iedBomb select 2 + 1);
_iedJunkObj enableSimulationGlobal false;
#ifdef DEBUG_MARKERS
_iedPos = getPosWorld _iedBomb;
_mkrID = format ["m %1", _iedPos];
_mkr = createMarker [_mkrID, getPosWorld _iedBomb];
_mkr setMarkerShape "ICON";
_mkr setMarkerType"mil_dot";
_mkr setMarkerBrush"Solid";
_mkr setMarkerAlpha 1;
_mkr setMarkerColor"ColorEast";
#endif
} else { _iedRoads = [_eachMarker] call findRoads; };
} forEach buildList;
sleep 5;
{ CIVILIAN revealMine _x; EAST revealMine _x; } forEach allMines;
diag_log count(buildList);``` already more easy to check now
check the buildList now
will give you more relations
lots of code to debug. but yeah for starters these are undefined iedList iedMarkers and still not findroads function there.
just overwhelming many commands
could be reduced if you only use the create commands
not rly matches minified example tbh 😄
ohh
Didn't know you could do that with params
Thats so much better than _x select 0;
Whats the purpose of max ?
another mistake you made btw. _iedBomb setPosATL(getPosATL _randRoadObj select 2 + 1);
needs to be _iedBomb setPosATL((getPosATL _randRoadObj select 2) + 1);
unless you want the 4th element
though ... that whole line is crap ...
What should I do instead?
This was that Phronk guys code.
I've had to rebuild it from the ground up.
Getting very close to scrapping most of it.
better do that
Doesn't create mine make the IED live anyway?
a wonder it is working at all
getPosATL _iedBomb select 2 + 1 literaly means getPosATL _iedBomb select (2 + 1)
_trig setTriggerStatements [
"{
vehicle _x in thisList && speed vehicle _x>4
} count playableUnits > 0",
"
{
if ((typeOf _x)in iedAmmo) then {
[_x] call iedAct;
};
} forEach nearestObjects[thisTrigger,[],10];",
"deleteVehicle thisTrigger"];
} else {
_trig setTriggerStatements [
"{
vehicle _x in thisList && isPlayer vehicle _x && speed vehicle _x > 4
} count allUnits > 0",
"{
if ((typeOf _x)in iedAmmo) then {
[_x] call iedAct;
};
} forEach nearestObjects[thisTrigger,[],10];",
"deleteVehicle thisTrigger"];
};
Is what he was using to set them off.
As I said doesn't createMine OBJ make it live?
depends on the object
Trigger isn't necessary.
some wont explode on proximity
thats always boom for any of em
buildList = [];
for "_i" from 1 to NUMBER_OF_IEDS_TO_CREATE do { buildList pushBack [(selectRandom iedJunk), (selectRandom iedList), (selectRandom iedMarkers)]; };
buildList = {
_x params ["", "", "_eachMarker"];
private _pos = getMarkerPos _eachMarker;
_x pushBack _pos;
private _range = (_pos select 0) max (_pos select 1);
private _roads = _pos nearRoads _range;
_x pushBack _roads;
} apply buildList;
{
_x params ["_junkType", "_iedType", "_eachMarker", "_iedRoadsPos", "_iedArea", "_iedRoads"];
_randRoadObj = selectRandom _iedRoads;
if !(isNull _randRoadObj) then {
_iedBomb = createMine [_iedType, _pos, [], 8]; _iedBomb setDir random 360;
_iedJunkObj = createVehicle [_junkType, getPosATL _iedBomb, [], 0, ""];
#ifdef DEBUG_MARKERS
_mkr = createMarker [format ["m %1", position _iedBomb select [0, 2]], position _iedBomb select [0, 2]];
_mkr setMarkerShape "ICON"; _mkr setMarkerType "mil_dot"; _mkr setMarkerBrush "Solid"; _mkr setMarkerAlpha 1; _mkr setMarkerColor "ColorEast";
#endif
} else { _iedRoads = [_eachMarker] call findRoads; };
} forEach buildList;
sleep 5;
{ CIVILIAN revealMine _x; EAST revealMine _x; } forEach allMines;```
we get somewhere
use that
should work better already
So what I need is a way to detect a player.
buildList = {
_x params ["", "", "_eachMarker"];
private _pos = getMarkerPos _eachMarker;
_x pushBack _pos;
private _range = (_pos select 0) max (_pos select 1);
private _roads = _pos nearRoads _range;
_x pushBack _roads;
} apply buildList;
It's an array and function
that won't work?
mhh?
{
_x params ["", "", "_eachMarker"];
private _pos = getMarkerPos _eachMarker;
_x pushBack _pos;
private _range = (_pos select 0) max (_pos select 1);
private _roads = _pos nearRoads _range;
_x pushBack _roads;
} apply buildList;
y 🙈 youre right @robust hollow
Yeah he is.
yeah buildlist was code not array
will got my first SQF script somewhere ... it was horrible but the IEDs worked
could send it to ya ... but you would not get happy with it
Interesting question are recursive arma 3 solutions better or worse than iterative?
You can't run into stack overflows though lol
scope overflow 😄
game just crashes 💥
it is what every program would do too
Blow your computer up, ultimate IED script.
real recursion: create ArmA in SQF
lol\
@signal peak help__ <STRING>
leaving this here
Wait how do I tag him
@signal peak
@signal peak Test
wont respond though
Oh
How does it work atm, you just send that bot private messages?
either via my server
or ... well ... yes
pns
mention
or code blocks with sqf syntax highlighting in channels starting with sqf
in PN he will interpret everything as code
Yeah @queen cargo It locked up in non-scheduled...
mhh?
Locked up arma 3
if you never exit
yes
non-scheduled always affects FPS
as i said
that also means: you can lock your arma if you do wrong
@tame portal i responded (in case you did not read)
ah yeah i did
What did I do wrong in that code?
@tough abyss Can you post the snippet again
you did not posted code @tough abyss
clyde bot?
Oh I think thats more of a Discord bug
I take it this code ```SQF
buildList apply {
_x params ["", "", "_eachMarker"];
private _pos = getMarkerPos _eachMarker;
_x pushBack _pos;
private _range = (_pos select 0) max (_pos select 1);
private _roads = _pos nearRoads _range;
_x pushBack _roads;
};
Goes inside the get_roads function?
I don't think you are using apply correctly
Blame @queen cargo
yes
was my mistake