-
Content Count
1224 -
Joined
-
Last visited
-
Medals
Everything posted by dreadedentity
-
That's what I'm hoping for, but I don't do a lot of MP scripting
-
remoteExec is probably what you're looking for: player addAction ["Roll random number", { _random = str ceil random 10; _random remoteExec ["hint", 0]; }, nil, 0, true, false];
-
Randomise group placement?
dreadedentity replied to mrvibrating's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Tested this against several compositions of vehicle squads and got no more explosions. Even tested a squad of chinooks on a steep mountainside, the script worked great, but they spool up engines and start sliding into each other and blow up in a quite memorable display. Has trouble with infantry squads, but hey, you can just setPos those guys directly on the squad leaders position and it works Anyway, just paste this into the init box of the group leader: this spawn { { _pos = []; if (!(leader _x == _x)) then { _pos = [_this, 10, 50, 5, 0, 90, 0] call BIS_fnc_findSafePos; } else { _pos = [random 30000, random 30000]; while {surfaceIsWater _pos} do { _pos = [random 30000, random 30000]; }; }; (vehicle _x) setPosATL (_pos + [1]); (vehicle _x) setVectorUp (surfaceNormal _pos); (vehicle _x) setPosATL (_pos + [0.1]); sleep 0.01; } forEach (units _this); }; EDIT: Forgot to handle moving group leader to a random place -
Measuring how busy SQF is, efficiently
dreadedentity replied to madrussian's topic in ARMA 3 - MISSION EDITING & SCRIPTING
To supplement the above, here is a BIS function to help identify pain points in your scripts: BIS_fnc_codePerformance -
Measuring how busy SQF is, efficiently
dreadedentity replied to madrussian's topic in ARMA 3 - MISSION EDITING & SCRIPTING
How do you calculate this? Technically, it is 0% until a script is run, then it is 100% until the script ends, regardless of how many scripts are spawned See Scheduler for some light reading. FPS is part of the equation because of how Arma handles scripts (3ms per frame is reserved for all scripts); at lower FPS scripts take longer to run. Having too many scripts also makes them take longer to run You need to figure out your criteria before anything else. "100% usage" in the context you're describing doesn't exist -
Measuring how busy SQF is, efficiently
dreadedentity replied to madrussian's topic in ARMA 3 - MISSION EDITING & SCRIPTING
To supplement the above post: Functions Library -
Show and Hide using trigger
dreadedentity replied to fawlty's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If you hide the units, don't forget to: enableSimlulation false; and possibly: allowDamage false; I believe hidden units can still shoot and be shot -
Getting classnames of all units and pasting it to clipboard
dreadedentity replied to Blitzen88's topic in ARMA 3 - MISSION EDITING & SCRIPTING
copyToClipboard str ((entities [["Man"], [], true]) apply { typeOf _x }) -
script 'the force'
dreadedentity replied to bLAcKmAgE87's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This should help: addForce -
Action Scroll Menu Colors
dreadedentity replied to Dekade's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Both setUserActionText and addAction have local effects, which you can find above the Description on their wiki pages, so they will need remoteExec if you are trying to affect them from the server -
Action Scroll Menu Colors
dreadedentity replied to Dekade's topic in ARMA 3 - MISSION EDITING & SCRIPTING
setUserActionText can of course change the color too, you just need to add the color in the right place SM_Officer setUserActionText [_SM, "<t color='#ff0000'>Recruit Squad</t>", "", "<t color='#ff0000'>Recruit Squad</t>"]; -
Randomise group placement?
dreadedentity replied to mrvibrating's topic in ARMA 3 - MISSION EDITING & SCRIPTING
existential crisis...I'll take another crack at it later -
Command "getVehicleCargo" doesn't works?
dreadedentity replied to Ronald Rapsfeld's topic in ARMA 3 - MISSION EDITING & SCRIPTING
getVehicleCargo doesn't do that, but crew or fullCrew does -
Command "getVehicleCargo" doesn't works?
dreadedentity replied to Ronald Rapsfeld's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm pretty sure the problem is here: _vehicle = _this select 0; <--- this exec "script.sqs"; //input is not an array ~1 //don't know what this means so maybe here also? -
Creating Looped Sounds
dreadedentity replied to aurora1-4's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It has been a while since I've messed with playSound3D so this might be wrong. I think you have to delete the object making the sound to make it stop. If that doesn't work, or isn't an option, you will have to use say3D which returns the sound source only so you can delete it at will -
Creating Looped Sounds
dreadedentity replied to aurora1-4's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Do you need help with something? -
[question] Forest / jungle spawn
dreadedentity replied to supergruntsb78's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Shouldn't be too hard to create a basic script with createSimpleObject -
helicopter attack helicopter help needed
dreadedentity replied to jarrod pitts's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe ordering the helicopter pilot and gunner to target the player with doTarget could help -
Set Object Init in script
dreadedentity replied to simicsko's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Init fields are run before any of the init scripts, so even if this were possible it wouldn't do anything. Check out the Initialization Order. Also, does this require the function to be called in the init field? Why not this: _myVehicle = createVehicle [etc...]; ["init", [_myVehicle, "PHOTOS\Photo_1.jpg", "Target Area"]] call BIS_fnc_initLeaflet -
I can't tell what you're asking with this language. You could be asking: Is it possible for them to do the above? - Yes, probably, if server A people know what they are doing Are they allowed to do the above? Yes, or no. It depends I do not know what bohemia's TOS is regarding scripting. They could have a clause somewhere that basically says "all code written with scripting belongs to bohemia". I doubt it, but if so, then it would only depend on their decision to take legal action If not, then developer A owns the work. However, if developer A has been paid for the code, ie received some kind of benefit in, exchange for it's ownership; then developer A obviously does not own the code anymore and the server would be allowed to do anything they wanted with it, even just delete it, and developer A would very likely have an extremely difficult time winning a legal case in any country
-
helicopter attack helicopter help needed
dreadedentity replied to jarrod pitts's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have not done much with programmatically forcing units to do things so I can't confirm how this works or if it works, but give some of the scripting commands that force units to fire a try. doFire, fireAtTarget, fire Be careful what you wish for, though. Arma's infantry AI might be derpy as hell, but I've recently found out playing Liberation that AI is extremely deadly in helicopters once they start shooting. Unless you're shooting back and kill the enemy heli, it'll probably always end with you getting shot down -
release Automatic landing gear for helicopters
dreadedentity posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, been a while. Anyway, I am back with a new script, starting off small as I try to get back into the swing of arma scripting. This is just for helicopters, although I think it would work for airplanes. Actually, the majority of helicopters don't have retractable landing gear, so it's really just for the ghost hawk, huron, and mohawk. There might be others, but I got bored of checking. Anyway, if it has retractable landing gears, this will work, and not to toot my own horn or anything but the effect is damn cool So without further delay, here's the code (github): This should be put in a code block and run via spawn due to the use of sleep. As always, this script is meant for noobs to learn from; by showing something pretty cool you can do with scripting, and as a bonus the effect is actually semi-usable Have fun, DE -
Script Radio online?
dreadedentity replied to Diaverso Carrasco's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm pretty sure this would require a mod, and would have many copyright issues -
Deleting object after action added to it has run
dreadedentity replied to Charles Barkley's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Take a look at the addAction wiki, in the "script" parameter there are some default parameters passed to the code, _target (_this select 0) is what you are looking for. Here are the pages for sleep and deleteVehicle. So in that code just put: sleep 3600; //60 seconds per minute * 60 minutes deleteVehicle (_this select 0); You don't need to do anything special like the backpack from the original post, the backpack is the special case, not stuff like vehicles/buildings -
Randomise group placement?
dreadedentity replied to mrvibrating's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try putting this in the init fields of all units except group leaders: this setPos (getPos leader this)