wuush
Member-
Content Count
11 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout wuush
-
Rank
Private First Class
-
MP/Dedicated Heli Script with Addactiion
wuush replied to wuush's topic in ARMA 3 - MISSION EDITING & SCRIPTING
again thank you for your reply, but while i was trying to make the code less complicated and easier to use (atleast from my limited point of view) i ran against a brick wall. Btw i dont need the Creation of Addaction in the init file of the unit placed in the editor, actually i dont want this, because i think its easier with a function. init.sqf wu_addaction_mp = compile preprocessFileLineNumbers "addaction_mp\wu_addaction_mp.sqf"; //precompile heli1_used = false; //helicopter is not yet used wu_addaction_mp.sqf //wu_addaction_mp //function gets called like this: //[[heli1,"Transport","addaction_mp\wu_script.sqf",{heli1_used = false}],"wu_addaction_mp",nil,false] spawn BIS_fnc_MP private ["_object","_title","_script","_used","_id"]; _object = _this select 0; _title = _this select 1; _script = _this select 2; _used = _this select 3; if (isNull _object) exitWith {}; _id = _object addaction [_title,_script]; while {!_used} do { sleep 1; _used = heli1_used; }; _object removeAction _id; hint "action removed"; wu_script.sqf //wu_script hint "Helikopter used"; heli1_used = true; So my question is there a possibility to "notify" my function that the heli has been used? Obviously i could use global variables but i just wanna initialise a variable like heli1_used, car1_used, addaction1_used and then notify my function, to stop While (!heli1_used) and remove the addaction menu entry on all clients since the script is run on all clients because of bis_fnc_mp -
MP/Dedicated Heli Script with Addactiion
wuush replied to wuush's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you for answering, i will try this script, but since im only starting to learn sqf it will take some time for me to understand. do you think there is an easier way to interact with things like these in multiplayer? (especially easier to script) -
MP/Dedicated Heli Script with Addactiion
wuush posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey Coder Community, i want a Transport Script that works with AddAction and is Multiplayer compatible, i found a Heli Script for Extraction (Throw a Nade on the Ground and an AI Heli lands there), that works after some editing on MP/dedicated. But since i also want insertion, with Helicopters placed at the base, i wanted a addaction menu like "Insertion" -> Map opens -> you click and heli starts. I already struggled with creating a MP compatible Addaction but now i also wanna remove it after 1 guy in the chopper used it. Larrow's Code if (!(isNull player)) then { fnc_MPaddAction = { /*_myaction =*/ _this addAction ["Insertion","Insertion.sqf"]; if (_used = true) then [ {_this removeAction _myaction}, { "false" } ]; //my miserable failing codeline }; }; Code in Helicopter init: _handle = [this,"fnc_MPaddAction",this,true] spawn BIS_fnc_MP; insertion.sqf _used = true; The somewhat working heli extraction script, when you throw a grenade on the ground (by Porky 243) I know the heli script isnt ready, but i got it working on mp, in another version, which was destroyed when my hdd died, but i can make it work again. My primary concern is a MP-Compatible Addaction/removeaction solution. -
norrin's ArmA2 scripts ported to ArmA3
wuush replied to norrin's topic in ARMA 3 - MISSION EDITING & SCRIPTING
hey norrin, i had a problem with your script, my unconscious player would roll over again and again without someone else doing anything. He would always play a rolltoback anim. i replaced "AinjPpneMstpSnonWnonDnon" with "AmovPpneMstpSnonWnonDnon_injured" and it works fine now Revive_4_ArmA3.Stratis\revive_sqf\Revive_player.sqf _revive_damage = 0.5; //array no.37 - Unit's level of damage following revive doesnt seem to work -
When i disable the respawn (i only wanna be brought back to life by my teammates) but i have lifes remaining i will still always respawn at the marker "respawn_west" even when respawn is disabled.
-
In my case the site module as observation post was the source of the error. Maybe BI added a vehicle, that should spawn there but it isnt in the files yet. Anyway thanks never thought the SITE Module could cause a "bad vehicle type" error. Edit: if you remove them and add them again, the site module will work again and the error will disappear.
-
scripts not working properly once saved as MP
wuush replied to Freebie's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I dont think the size is a problem. A pbo file is just a compiled mission file. for example one of my mission has 5 tasks and about 40 placed enemies + site module, and a loadscreen picture. the size is 154kb and it works fine in multiplayer. make sure you use -showscripterrors and use scripts that work in multiplayer. -
Can you give me a small example? i never used Camera Control. and when i use bis_fnc_respawnspectator it wont really work the way i want in a trigger.
-
1. Is it possible to turn on spectator mode for a player who enters a trigger? (until the mission ends) 2. Wiki Quote: "It is also available on pre-defined playable slots for users who wish to observe a mission or even stream its progress." http://community.bistudio.com/wiki/Spectator_Mode How is this possible?
-
I created a mission with the editor, which includes R3F French Weapon Pack, acre, cba, jayarmalib. it worked fine and still does, but after the patch for the dev version i get the error "bad vehicle type" when i preview or start the mission. i can just close it and the mission seems to work fine. But im still concerned and im not 100% sure if this error is related to the new patch, because i was editing when i restarted the game and the new patch was available. I didnt add any new vehicles.