jocan2003
Member-
Content Count
13 -
Joined
-
Last visited
-
Medals
Everything posted by jocan2003
-
Setting up a custom texture on a vehicle doesn't work after respawn
jocan2003 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Greetings, While the thread says im newby i meant that i dabble, i can modify what is already existing but thats about it, i can easily read and understand what i see but i am still very inexperienced. So here is my problem, im trying to setup custom texture on some vehicule, that much is working but sadly when it respawn it goes back to stock texture. This is a MP mission btw and it use a custom spawning script. So after some digging i managed to find how i could do it in general way but in specifics it simply break the spawning altogether. Here is what i have. Mission.sqm Init section of the helicopter. init="_nul0 = [this,30,3600] call PO3_fnc_setObjectRespawn; this setobjecttexture [0,""mohawk_midnight_1.paa""]; this setobjecttexture [1,""mohawk_midnight_2.paa""]; this setobjecttexture [2,""mohawk_midnight_3.paa""]; this setVariable[""isCustomMohawk"", 1, true];"; In the respawn script ive added this where they fetch up variable from vehicule before respawn. _custommohawk = _vehicle getVariable "isCustomMohawk"; Now right after they spawn the vehicule ive added this snippet if (_custommohawk == 1) then { _vehicle setObjectTexture [0,"mohawk_midnight_1.paa"]; _vehicle setObjectTexture [1,"mohawk_midnight_2.paa"]; _vehicle setObjectTexture [2,"mohawk_midnight_3.paa"]; _vehicle setVariable["isCustomMohawk", 1, true]; } Somehow something is breaking somewhere..... and i have no clue where, am i pursuing the right path? or is there another way i could explore or didnt know about? -
Setting up a custom texture on a vehicle doesn't work after respawn
jocan2003 replied to jocan2003's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hmm thats a good point on the global but i dont think it would persist between vehicule respawn. Edit: As no one answer im editing this one. After sifting trought the rpt file i get this error Here is the full file // Written by Eightysix if (!PO3SRV) exitWith {}; private["_data","_vehicle","_objdata","_pos","_dir","_class","_name","_countR","_timeD","_timeA","_limR","_dead","_destroyed","_empty","_abandoned","_isMHQ"]; if(isNil "PO3_param_removeVehicleWrecks") then { PO3_param_removeVehicleWrecks = true }; waitUntil { { _data = _x getVariable ["PO3_respawn",nil]; if(!isNil "_data") then { _vehicle = _x; _objdata = _vehicle getVariable ["PO3_object_data",nil]; _pos = if(!isNil "_objdata") then { _objdata select 0 }else{ _vehicle call PO3_fnc_getPos }; _dir = if(!isNil "_objdata") then { _objdata select 1 }else{ direction _vehicle }; _class = if(!isNil "_objdata") then { _objdata select 2 }else{ typeOf _vehicle }; _name = if(!isNil "_objdata") then { _objdata select 3 }else{ vehicleVarName _vehicle }; _dead = if(!isNil "_objdata") then { _objdata select 4 }else{ time }; _empty = if(!isNil "_objdata") then { _objdata select 5 }else{ time }; _countR = if(!isNil "_objdata") then { _objdata select 6 }else{ 0 }; _timeD = if( count _data > 0 ) then { _data select 0 }else{ 600 }; _timeA = if( count _data > 1 ) then { _data select 1 }else{ 600 }; _limR = if( count _data > 2 ) then { _data select 2 }else{ -1 }; _custommohawk = _vehicle getVariable "isCustomMohawk"; //Either return 1 or nil. // Check if Vehicle Destroyed _dead = if( !(canMove _vehicle) || !(_vehicle getVariable ["ace_canmove", true]) || damage _vehicle == 1 ) then { _dead }else{ time }; _destroyed = if( time - _dead > _timeD ) then { true }else{ false }; // Check if Vehicle Abandoned _empty = if( {alive _vehicle} count (crew _vehicle) == 0 && _pos distance (_vehicle call PO3_fnc_getPos) > 1500 ) then { _empty }else{ time }; _abandoned = if( time - _empty > _timeA ) then { true }else{ false }; // Get PO3 Variables _isMHQ = _vehicle getVariable ["PO3_mhq",nil]; _isLCH = _vehicle getVariable ["PO3_liftchopper",nil]; _isLFT = _vehicle getVariable ["PO3_liftable",nil]; _isRSP = _vehicle getVariable ["PO3_resupply",nil]; // MHQ can not be abandoned if(!isNil "_isMHQ") then { _abandoned = false }; if(_destroyed || _abandoned) then { _vehicle setVariable ["PO3_respawn",nil,false]; _vehicle setVariable ["PO3_object_data",nil,false]; if(PO3_param_removeVehicleWrecks) then { deleteVehicle _vehicle; sleep 5; }; _vehicle = nil; if( _countR < _limR || _limR < 0 ) then { _countR = _countR + 1; _vehicle = createVehicle [_class, _pos, [], 0, "CAN_COLLIDE"]; if (_custommohawk == 1) then { _vehicle setObjectTexture [0,"mohawk_midnight_1.paa"]; _vehicle setObjectTexture [1,"mohawk_midnight_2.paa"]; _vehicle setObjectTexture [2,"mohawk_midnight_3.paa"]; _vehicle setVariable["isCustomMohawk", 1, true]; } _vehicle setDir _dir; [[[[_vehicle]],"scripts\transport\classify.sqf"],"BIS_fnc_execVM",true,false] spawn BIS_fnc_MP; if(!isNil "_isMHQ") then { _vehicle setVariable ["PO3_mhq",_isMHQ,true] }; if(!isNil "_isLCH") then { _vehicle setVariable ["PO3_liftchopper",_isLCH,true] }; if(!isNil "_isLFT") then { _vehicle setVariable ["PO3_liftable",_isLFT,true] }; if(!isNil "_isRSP") then { _vehicle setVariable ["PO3_resupply",_isRSP,true] }; }; }; if(!isNil "_vehicle") then { _vehicle setVariable ["PO3_respawn",[_timeD,_timeA,_limR],false]; _vehicle setVariable ["PO3_object_data",[_pos,_dir,_class,_name,_dead,_empty,_countR],false]; }; }; }forEach vehicles; sleep 30; false; }; Am i really missing a ";"? i really am clueless at this point... New edit: I finaly found the problem... i was really missing a god damn ";" after my if block...... damn i hate when i get stuck on such stupid mistake due to *language* detail. -
The MX SW doesnt have sound for single shot usage? and the ARCO seem to be bugged too, i have the outlining but not the inside optics for some reason did i mess something up? Beside that everything is peachy, i just hope i could reset the launchers to what they were before, but sadly removing th NLAW pbo seem to give trouble with loadout thingy :(
-
VTS Simple weapon resting
jocan2003 replied to l etranger's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Ive been using a few mission ssandbox thing these days and stubled uppon your marvelous resting mod, sadly, when i load my game it isnt working anymore. I do have some knowledge in modding game ins general, but if you could just point me in the right direction how i could fix it that would be awesome. Mission campaign sandbox thingy: http://steamcommunity.com/sharedfiles/filedetails/?id=173155826 In fact its anytime i reload a game no matter what... Thats sad.... -
i love the unit list from the picture 2 really, but make sure you see the background, how many time i try giving order but i was clicking on the unit list due to the transparent background and unit were not moving, and yeah the restore HC worked out it was a quick and dirty way to fix it due to my lack of knowledge. Maybe add the action only if your close to the mobileHQ or HQ just in case a trigguer get corrupted or like befor ein the Command window the old restore HC button i missed him when i had that bug hehe.
-
Hmm i dont know if its meant to be like that, but if somone else can try to reproduce it, here is what i did and how i fixed it. In the version im playing i love a new version of hummve so since i always start at the same place ive add the Hmmv there. What happent is when i took some hand gunner and sent them in the jeep and then made a new group to transfer it, the restoreHC.sqf didnt kick in so it was stuck in HC: false and i didnt have control at all on these unit. Here is what i did. In the init.sqf ive added this line. Now for any reason if it doesnt update and your stuck with new group not refrshing either make the change yourself or ask me and ill send you a copy with no additional add-on ( without the stuff i use to avoid conflicts ). *****Edit***** The only mod i have in common with you is the CBA and the SDP_cannon fix it happen to me SOMETIME that he doesnt spawn the vehicule but i think its also due to the game choice i make i didnt test it fully i want to play too :P *****EDIT***** Are you fine with playing or you still have the bug? *****EDIT**** Forgot to add the entry in the respawn.sqf
-
Well maybe a mix of AI dispersion and VFAI got AI dispersion CrazyAce? I know i dont know your mission well, but if i can ill try to fix any bug while your away and then send it to you once your back, dont forget to PM me if i have any update on bugfix.---------- Post added at 07:05 PM ---------- Previous post was at 06:59 PM ---------- As i just saw in the little code, i could ebe mistaken, but i think if the HQ isnt fully repaired some defense wont show up in build menu? Ill test that
-
Oh simply deactivate it from the shurtcut when you want to play hence why its good to have separated folder, i simply copied the shortcut without the VFAI when i wanna play a farma war :). Also i didnt try to reproduce the bug but the only construction upgrade to raise the defense option ( AT tower and such ) didnt work, only the staff up did work and increased to dksg and spg-9 static defense, ill try to reproduce it today.
-
Yeah same here but scripting an AI for that would take ages i believe but its freacking awesome! ****Edit**** What could be possible tho is make the ennemy spawn not far from castle and make them attack it, depending on the base size income whatever, the size and amount of ennemy spawn would increase same for town ressource site etc and make them own the castle and make the castle already fortified and you ahve to blow it up a lil bit like the non coop in farma.
-
Greetings when i play warfare and i get chopper in my squad hwo the hell do i make them land? the goto command doesnt make them land, i hae to tell the pilot to dismount and then THE CHOPPEr find a place to LAND right on top on the only one tree in a 500-500 meter large empty plane or right on top of the base well anyway he know shit about finding a LZ.
-
Alright i found the problem its either the Advance AI (VFAI) or the AI Fire dispersion add-on. Wich one does it i dont know as they are mixed in the same folder right now, give me about 10 minute and ill tell you wich one does it. ****EDIT**** After testing all my AI add-ons, its the VFAI that screw it up why and how i dont know but it screw the ural spawn, i have all my other add-on activated and it work juts fine.
-
Well once again i did it with a custom vehicule and nothing spawn after the parachute, like if the script were skipped, ill compare the new upload with the one i have, ill give feedback in the next 5 minute
-
Same here the ural doest spawn i will try by addin a new type of vehicule just in case. i do have lastest add-on and mission... Self hosted. tried coop and then coop+air base destruction and game didnt trigguer the end. Ill try different settings and some modification in script and ill post if it work.