Master85
Member-
Content Count
216 -
Joined
-
Last visited
-
Medals
Everything posted by Master85
-
Destroying Bridge
Master85 replied to tobmic's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
use && (or and) and || (or or) to combine your conditions. all 3 objects have to be at least half-damaged: (getDammage ID109880 > 0.5) && (getDammage ID109881 > 0.5) && (getDammage ID109882 > 0.5) one object have to be at least half-damaged: (getDammage ID109880 > 0.5) || (getDammage ID109881 > 0.5) || (getDammage ID109882 > 0.5) or more complex: (getDammage ID109880 > 0.5) && ((getDammage ID109881 > 0.5) || (getDammage ID109882 > 0.5)) Biki: Logical Operators -
I made a quick test and my code worked flawlessly.
-
my first idea was something like this addEventHandler ["HandleDamage",{(_this select 4) == "PipeBomb"}] (Only a PipeBomb can damage the object but if it's damaged by a pipebomb it's destroyed immediately.) or this addEventHandler ["HandleDamage",{if ((_this select 4) == "PipeBomb") then {_this select 2}}] (Only a PipeBomb can damage the object - the damage by the pipebomb is passed through to the object.)
-
Switch-case problem
Master85 replied to Spudgunner's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
with (("Worker1") || ("Worker2") || ("Worker3") || ("Worker4")) you're trying to make an or between strings - if you have scriptErrors enabled you'll get an error-message (or look into your arma.rpt) if you use nested ifs there shouldn't be a difference to elseif except a few more parentheses if it should be a backround-task and you've got many different states / conditions perhaps a FSM could do the job. -
Switch-case problem
Master85 replied to Spudgunner's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
don't think that a few cascaded ifs are such bad (ok, lots of parentheses) but if you need your switch-statement you can do something like _civClass = typeof _pasRnd; if (_civClass isKindOf "Worker") then { _civClass = "Worker"; }; if ... switch (... - it's not beautiful, but it works (I hope so) -
Switch-case problem
Master85 replied to Spudgunner's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
you're looking for isKindOf ;) -
Camera and cinema border
Master85 replied to mandoble's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
good to see, I'm not the only one who's trying this ;) showCinemaBorder -
SetDir variable ??
Master85 replied to Fortran's topic in ARMA 2 & OA : ADDONS - Configs & Scripting
setDir needs a number, not an array _TargetDirection = (_TargetPos select 0) - (_BombPos select 0) atan2 (_TargetPos select 1) - (_BombPos select 1); -
hasWeapon & Pipebombs
Master85 replied to Gee76's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
you can do something like: "PipeBomb" in (magazines player) -
ArmA2 & ArmA1 Models Size comparison
Master85 replied to bravo 6's topic in ARMA 2 & OA : MODELLING - (O2)
only a fast comparison in buldozer, don't know whether it's meaningful for ingame: (horizontal offset added for better comparison - models overlapped really well) red = Arma us_soldier.p3d grey = ArmA2 usmc_soldier.p3d -
Example scripts that use the attachTo command
Master85 replied to norrin's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
If I remember rightly there's something like collision detection for some vehicles like the M1A1 or the Ural. For other vehicles like the tractor I hear a collision-sound and the vehicle is damaged but it doesn't collide. -
Flag change does not work for both sides
Master85 replied to FCOPZ-illuminator's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You've got a typo there: OststHatFahne And it's not such a good idea to use the same name for a triggername and a variable. -
more ambient animals
Master85 replied to wrloomis's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
it's a little more tricky. the global variables BIS_MaxAnimalsGroupInArea and BIS_AnimalsGroupInArea could be interesting. -
BIKI: Lock wait timeout exceeded.
Master85 replied to Worldeater's topic in BOHEMIA INTERACTIVE - GENERAL
it's working flawlessly -
What happened to setSkill array?
Master85 replied to CarlGustaffa's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
it's there. I tested it a little bit and I think it's working: - placed an infantry group and set the commanding-skill of the leader to 0. In a firefight the leader didn't assigned any targets to his men (with default commanding-skill he assigned about 3-5 targets in the same firefight) - placed a unit and a few enemys in different distances (free line-of-sight) and set the spotdistance-skill of the unit to 0: units up to a distance of ~170m were spotted; after changing the spotdistance to 1 units up to ~220m were spotted and the knowsabout-level jumped up -
waypoints. how do i make AI stick to the roads?
Master85 replied to okarr's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
it's depending on the AIBehaviour, too. -
Unable to generate civilians in init.sqf
Master85 replied to susachintha's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
here is a list of civilian classnames - or here. -
BIKI: Lock wait timeout exceeded.
Master85 replied to Worldeater's topic in BOHEMIA INTERACTIVE - GENERAL
Same problem here since a few days. Sometimes it's working great at all but otherwise getting the error the most time. example (at the moment): http://community.bistudio.com/wiki/Talk:PEW_File_Format can access it without login without any problem, but when logged-in I can't access it. http://community.bistudio.com/wiki/nearEntities can't access it at all (at least at the moment) but the diff between this article and an older version is working. createUnit isn't working diff is working. (all examples at the moment) -
looks like a few commands are missing in the comref agent, agents, isagent, ... isn't there, too
-
Animal trouble
Master85 replied to Balschoiw's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
it looks like animals are agents, they're in the agents-array at least (but don't ask me what this means exactly) -
Start mission with hanger doors open?
Master85 replied to manzilla's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
dvere1 dvere2 (the both small doors on the left) vrata1 - vrata4 (the 4 big doors) -
looks really nice, but any way to get an option to customize format of time and date?
-
p3d-name of firing range element?
Master85 replied to jens198's topic in ARMA : MAP EDITING (VISITOR)
missing 'r' the cfg-name (for placing in missions): Land_strelecky_post_new -
Can you disable a script if a client is regular?
Master85 replied to DOA's topic in ARMA - MISSION EDITING & SCRIPTING
I think you're looking for this. Edit: -
equalModRequired=0 else you can only join if you use exactly the same -mod=... parameters