Jump to content

dreadedentity

Member
  • Content Count

    1224
  • Joined

  • Last visited

  • Medals

Everything posted by dreadedentity

  1. dreadedentity

    Roll dice system help

    That's what I'm hoping for, but I don't do a lot of MP scripting
  2. dreadedentity

    Roll dice system help

    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];
  3. dreadedentity

    Randomise group placement?

    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
  4. To supplement the above, here is a BIS function to help identify pain points in your scripts: BIS_fnc_codePerformance
  5. 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
  6. To supplement the above post: Functions Library
  7. dreadedentity

    Show and Hide using trigger

    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
  8. copyToClipboard str ((entities [["Man"], [], true]) apply { typeOf _x })
  9. dreadedentity

    script 'the force'

    This should help: addForce
  10. dreadedentity

    Action Scroll Menu Colors

    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
  11. dreadedentity

    Action Scroll Menu Colors

    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>"];
  12. dreadedentity

    Randomise group placement?

    existential crisis...I'll take another crack at it later
  13. dreadedentity

    Command "getVehicleCargo" doesn't works?

    getVehicleCargo doesn't do that, but crew or fullCrew does
  14. dreadedentity

    Command "getVehicleCargo" doesn't works?

    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?
  15. dreadedentity

    Creating Looped Sounds

    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
  16. dreadedentity

    Creating Looped Sounds

    Do you need help with something?
  17. dreadedentity

    [question] Forest / jungle spawn

    Shouldn't be too hard to create a basic script with createSimpleObject
  18. Maybe ordering the helicopter pilot and gunner to target the player with doTarget could help
  19. dreadedentity

    Set Object Init in script

    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
  20. dreadedentity

    COPY RIGHT?

    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
  21. 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
  22. 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
  23. dreadedentity

    Script Radio online?

    I'm pretty sure this would require a mod, and would have many copyright issues
  24. 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
  25. dreadedentity

    Randomise group placement?

    Try putting this in the init fields of all units except group leaders: this setPos (getPos leader this)
×