Kohmelo
Member-
Content Count
4 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout Kohmelo
-
Rank
Rookie
-
Little addaction and addeventhandler help
Kohmelo replied to Kohmelo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well mostly i punch of stuff in current thing i do, needs some kind of eventhandler to work as needed... Mostly "firednear" and "fired" "hit/killed." Like i wrote most of this stuff is still in a testbed to check if it's possible to do all the things i need. Only reason I'm giving them guns is that if they had them they would be in their hands... But still Thanks a lot iceman... -
Little addaction and addeventhandler help
Kohmelo replied to Kohmelo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
1st problem is that addaction will launch the mortar1.sqf but it will not complete it. Not a quite maestro with debugging so i usually build hints between the lines and I can see that it does not complete the script. removeEventHandler thingy is that i really don't get how it is needed to be written in the script if the the unit/event is _This. I've tried it as it is written in the biki and remoalleventhandlers too.... (tried the same line with _this, this, _x, _mortar etc.) BTW thanks about that {} thinking too much in the box at the moment... ---------- Post added at 18:40 ---------- Previous post was at 18:24 ---------- Iceman77 script made the addaction to work... but eventhandler will not work... back to 2 scripts where 1st original and 2nd Icemans and it should work like i wished for... Removeeventhandler still and it would be perfect... -
Little addaction and addeventhandler help
Kohmelo posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, As I was building a test bed for new mission i walked to a wall with my poor scripting skills and need a little bit help. (code is below) Problem no1. I need to have both Eventhandler and addaction to do the same thing --> make them armed and hostile. Event handler works like a charm but for reasons unknown for me addaction will not launch. I tried to use different SQF file for that but it did not work either. I've tried to build the addaction to unit init and did not work from there. Problem no2. How on earth do i remove Eventhandlers from _this (or from the unit event handler is pointing at) if event handler script is in a different SQF like bellow? Init: _Mortar = [Mor1, Mor2, Mor3, Mor4]; {_x setcaptive True} foreach _Mortar; {_x setCombatMode "BLUE"} foreach _Mortar; {removeAllWeapons _x} foreach _Mortar; {removeUniform _x} foreach _Mortar; {removeHeadgear _x} foreach _Mortar; {removeVest _x} foreach _Mortar; {_x unassignitem "NVGoggles_INDEP"} foreach _Mortar; {_x removeItem "NVGoggles_INDEP"} foreach _Mortar; {_x addUniform "U_C_Poloshirt_redwhite"} foreach _Mortar; {_x addeventHandler ["firednear",{_this exec "mortar1.sqf"}]} foreach _mortar; {_x addaction ["MOVE AWAY!", "mortar1.sqf",[false],1,false,true,"","(_target distance _this) < 3"]} foreach _mortar; Mortar1.sqf {_x setcaptive false} foreach _this; {_x setCombatMode "red"} foreach _this; {_x addmagazine "9Rnd_45ACP_Mag"} foreach _this; {_x addWeapon "hgun_ACPC2_F"} foreach _this; {_x addmagazine "9Rnd_45ACP_Mag"} foreach _this; {_x addmagazine "9Rnd_45ACP_Mag"} foreach _this; {_x addmagazine "9Rnd_45ACP_Mag"} foreach _this; {removeallActions _x} foreach _this; -
Satchel charges make AI stop
Kohmelo replied to resistance-rat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Building a EOD mission i have seen that the the spotting system is too "perfect." Explosive on ground or in building is spotted a mile a way by AI and by players spotting system, even if it is inside the ground. Then again if Explosive is on grassy ground it mostly impossible for the AI and players spotting system to spot. One annoying example about spotting mines is that you but mine at a door (the one with wire.) You can see it about 1-3m away if you look straight at the wire but auto spot and AI can spot it from a mile away because they spotted the wire from a distance it is impossible to see. My conclusion about explosives and mines --> If you want to use them your way, use scripts. It saves your time a lot. Edit: About placing object on roads that are scripted. AI will usually try to dodge any objects on road or nearby their path.