JohnathanMo
Member-
Content Count
5 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout JohnathanMo
-
Rank
Rookie
-
Realtime, how find persons name and put it in script?
JohnathanMo replied to JohnathanMo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Found a really hacky way to do it. Would appreciate a better solution. This involves using an item that noone spawns with as a marker as to whom to attach the event handler to. Would need to do RC gymnastics to get it in an enemy inventory :/ _allObjects = (allMissionObjects "All"); for [{_ib=0}, {_ib<count (_allObjects)}, {_ib=_ib+1}] do { _thesoldierb = _allObjects select _ib; _magsb = magazines _thesoldierb; _magscountb = count _magsb; foundindicator = false; for [{_ic=0}, {(_ic<_magscountb) && (!foundindicator)}, {_ic=_ic+1}] do { if(_magsb select _ic == "SMA_30Rnd_556x45_Mk318_IR")then { foundindicator = true; _thesoldierb addeventhandler ["fired", { _thesoldier = (_this select 0); _mags = magazines _thesoldier; _magscount = count _mags; _foundone = 0; for [{_i=0}, {_i<_magscount}, {_i=_i+1}] do { if(_mags select _i == "Titan_AT")then { _foundone = _foundone + 1; }; }; if(_foundone == 0)then { _thesoldier addItemToBackpack "Titan_AT"; _thesoldier addItemToBackpack "Titan_AT"; }; if(_foundone == 1)then { _thesoldier addItemToBackpack "Titan_AT"; }; }]; }; }; }; -
Realtime, how find persons name and put it in script?
JohnathanMo posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
So I tried pasting this in zeus init, and the mission editor, it only works in mission editor. Going in a different direction though, I just want to be able to pull the names from mcc sandbox and replace the first line this with the name. Then I can just execute it in real time. I think I've got the names as "b Alpha 1-1:2" for example just changing the group and number. Can anyone tell me how I put this in? Desc: Every time the attached person fires a weapon, the script ensures he has two titan AT missiles in his backpack. this addeventhandler ["fired",{ _thesoldier = (_this select 0); _mags = magazines _thesoldier; _magscount = count _mags; _foundone = 0; for [{_i=0}, {_i<_magscount}, {_i=_i+1}] do { if(_mags select _i == "Titan_AT")then { _foundone = _foundone + 1; }; }; if(_foundone == 0)then { _thesoldier addItemToBackpack "Titan_AT"; _thesoldier addItemToBackpack "Titan_AT"; }; if(_foundone == 1)then { _thesoldier addItemToBackpack "Titan_AT"; }; }]; -
Repair Specialist With Tool Kit Has No Repair Option
JohnathanMo replied to Seria17hri11er's topic in ARMA 3 - QUESTIONS & ANSWERS
If the parts are red or missing you should use him. They usually can only be repaired to orange. You select him and use menu 6, or maybe you can just point at the vehicle and it appears on the default menu. You may need to go more(0) on menu 6 alot as it has rearm options also. This doesnt seem to be to do with DUWS. Usually as devilslayerbane said you can use a repair truck, but you cant buy those in DUWS I have. You have to go in hq bloke->request units->bottom left buy rearm vehicle. Then it appears under the support menu. You need to be near HQ to use it, I havent tried it near FOBs. -
Post New Thread Button missing?
JohnathanMo replied to mdtorch's topic in BOHEMIA INTERACTIVE: Web-Pages
So I have actually found something, I think, I may be able to help with. Been twiddling thumbs waiting for reply to appear for an hour. Made a mistake aswell... might switch to another arma forum while I wait :D -
Repair Specialist With Tool Kit Has No Repair Option
JohnathanMo replied to Seria17hri11er's topic in ARMA 3 - QUESTIONS & ANSWERS
If the vehicle can have its health improved by the repair specialist it will appear under menu 6. You may have to scroll through it alot. If it's not there, he can't improve its health. In general I only look if one of the vehicle parts is red. Like if the tracks gone and it wont even move. Also I think if any tires are gone you can get them back every time. Problem shouldn't be anything to do with DUWS, although you cannot buy repair trucks in it I believe. You would have to got to the armory and buy "vehicle refit" in the bottom right and access it under supports (0->8->?). It will probably tell you you can only use it at HQ zones, not sure about FOB zones.