Federico 76
Member-
Content Count
17 -
Joined
-
Last visited
-
Medals
Everything posted by Federico 76
-
Hello, congratulation for the great mod! I wish to report a little bug with the Navistar MaxxPro MRAP: the AI won't shoot at the exposed gunner, even at short distances. They will simply run away or do nothing at all.
-
Need help scripting with addaction to a classname [SOLVED]
Federico 76 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello everyone, i'm trying to make my first script, so i've looked a bit into the introduction, i've put toghether all the notions i have on the subject, and that's what i managed to do: Basically i'm trying to add a menu action to all police vans. The action itself is working fine when i use it into the init of the vehicle, but since multiple vans can be created during the mission, i need a way to affect them all. That's what i've done until now: - I have created an init.sqf file in my mission folder, and i've put this inside: [] execVM "myscript.sqf"; - Then i created another file called myscript.sqf, which looks like this: { params ["_unit"]; if (typeOf _unit isEqualTo "B_GEN_Van_02_vehicle_F") then { _unit enableVehicleCargo false; _unit addAction [ "Placeholder text", { params ["_target", "_caller", "_actionId", "_arguments"]; _target enableVehicleCargo true; _target lockCargo true; _target lockCargo [0, false] }, nil, 1.5, true, true, "", "(vehicleCargoEnabled _target) == false && count crew _target == 0", 5, false, "", "" ]; _unit addAction [ "Placeholder text 2", { params ["_target", "_caller", "_actionId", "_arguments"]; _target enableVehicleCargo false; _target lockCargo false }, nil, 1.5, true, true, "", "(vehicleCargoEnabled _target) == true && count crew _target == 0 && (getVehicleCargo _target) isEqualTo []", 5, false, "", "" ] } }; The script does not give any error, but the action won't appear on the van... What am i doing wrong? I've also tried to search the forum a bit but i did't find exactly what i want. I guess the error is in the first part of the script, when i try to tell to the machine what unit should be affected by the script. Looking on the internet i tried to mix and match a lot of combinations, but nothing worked. -
Need help scripting with addaction to a classname [SOLVED]
Federico 76 replied to Federico 76's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That's interesting, i'm trying to understand how the eventhandler works, just to see what i can do with it... But it gives me an error: "Error GIAR pre stack size violation". I'm not sure what i am doing wrong. For now i'm just testing a simple code based on what pierremgi suggested: addMissionEventHandler ["EntityCreated", { params ["_entity"]; if (_entity isKindOf "car") then { _entity lockCargo TRUE; _entity enableVehicleCargo FALSE; }; }]; Maybe i'm putting it into the wrong file... Should it be a initServer.sqf, a normal script, a initPlayerServer.sqf, or what? -
Need help scripting with addaction to a classname [SOLVED]
Federico 76 replied to Federico 76's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I did it! Luckly it was just a little typo made by Harzach : "FED_hasActions" has the plural "s" and "FED_hasAction" doesn't. I'll post the corret form of the script in case someone needs it. initPlayerLocal.sqf while {true} do { sleep 10; { if ((typeOf _x) in ["B_GEN_Van_02_vehicle_F"]) then { if (!(_x getVariable ["FED_hasAction", false])) then { _x setVariable ["FED_hasAction", true]; _x enableVehicleCargo false; _x addAction [ "Placeholder text", { params ["_target", "_caller", "_actionId", "_arguments"]; _target enableVehicleCargo true; _target lockCargo true; _target lockCargo [0, false] }, nil, 1.5, true, true, "", "(vehicleCargoEnabled _target) == false && count crew _target == 0", 5, false, "", "" ]; _x addAction [ "Placeholder text 2", { params ["_target", "_caller", "_actionId", "_arguments"]; _target enableVehicleCargo false; _target lockCargo false }, nil, 1.5, true, true, "", "(vehicleCargoEnabled _target) == true && count crew _target == 0 && (getVehicleCargo _target) isEqualTo []", 5, false, "", "" ] }; }; } forEach vehicles; }; Thanks everyone for helping! -
Need help scripting with addaction to a classname [SOLVED]
Federico 76 replied to Federico 76's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok, thanks JCataclisma and Harzach for your help! If everything fails i'll look for a workaround like Cataclisma suggested, for now i'm trying the solution suggested by Harzach, that's the result: - First i had to change the "_unit" that i put in my script to "_x", otherwhise i get the "undefined variable" error and it won't work at all. - Then it seems to work, exept for this part: if (!(_x getVariable ["FED_hasActions", false])) then { _x setVariable ["FED_hasAction", true]; In fact, the game keeps duplicating the action again and again. I tried to remove the "!" in the beginning, but then the script won't work at all... So i'll try to play around with "getVariable" and "setVariable", maybe i can get it to work somehow. -
Hi R3vo, first let me say thank you for your mod. I usually make coop missions for my friends and it really simplified my life a lot! Especially since i'm not that good in scripting stuff. Anyway i wish to report a couple of bugs i found with the "hostage" feature of the mod: 1- You can free the hostage from 15 meters away; 2- You can still "free" the hostage after he is dead. Again, thank you and keep up!
- 1251 replies
-
Yes, it would be nice to have the full list of ammo available, maybe with the option for show/hide the ones that the unit is not using.
-
Grimes Simple Revive Script
Federico 76 replied to KC Grimes's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello everyone! I just downloaded this script, and i came across the same problem... But since i found a possible workaround for singleplayer missions, and since a lot of people are still using the script, i thought that it would be nice to share the solution. Basically, it gives the player the opportunity to choose another playable unit on death, so that he can revive his previous character with the new one, and eventually retake control of the old one. Of course the whole thing won't help much if in your mission there is only one playable character. Usually i tend to make each single member of the player's squad playable, so he can maximize the squad potential. This is usefull if you play the mission as the squad leader, but it turns to be quite buggy if you play as a subordinate that can't give orders to the rest of the squad, so beware. Anyway, that's how it's done: Open with notepad the G_Unconscious.sqf file located in the G_Revive folder; Scroll down to this part: if (isPlayer _unit) then { disableUserInput true; titleText ["","BLACK", 1]; if (G_Revive_Black_Screen == 0) then { [_byVeh] spawn { _byVeh = _this select 0; sleep 3; if (_byVeh) then { titleText ["You are Unconscious. Wait for teammate to revive you.","BLACK IN", 9]; } else { titleText ["You are Unconscious. Wait for teammate to revive you.","BLACK IN", 4]; }; }; }; }; delete everything under the first line and add the "teamSwitch" command, now it should look like this: if (isPlayer _unit) then { teamSwitch; }; Than scroll down to: if (isPlayer _unit) then { [] spawn { sleep 3.25; _reviveDialog = createDialog "G_Revive_Dialog"; waitUntil {!isNull (findDisplay -1)}; G_Revive_Unc_Global_KeyDown_EH = (findDisplay -1) displayAddEventHandler ["KeyDown","if ((_this select 1) == 1) then {(findDisplay -1) displayRemoveEventHandler [""KeyDown"",G_Revive_Unc_Global_KeyDown_EH];closeDialog 0;player setVariable [""G_Unconscious"",false,true];}; false;"]; }; }; and remove the "_reviveDialog" line, like this: if (isPlayer _unit) then { [] spawn { sleep 3.25; waitUntil {!isNull (findDisplay -1)}; G_Revive_Unc_Global_KeyDown_EH = (findDisplay -1) displayAddEventHandler ["KeyDown","if ((_this select 1) == 1) then {(findDisplay -1) displayRemoveEventHandler [""KeyDown"",G_Revive_Unc_Global_KeyDown_EH];closeDialog 0;player setVariable [""G_Unconscious"",false,true];}; false;"]; }; }; Now when you die the team switch menu should appear... Known issues: -Once you're dead, if you click on "Back" in the team switch menu, or if you take control of another dead unit, you can still give orders to your squad members (if the selected character is the squad leader), you can also use first aid kits, even if it wont actually do nothing besides consuming the kit. -Probably, the respawn system for the player won't work anymore. Not sure if it was supposed to work with singleplayer anyway. I think bots respawn should be fine (hopefully). All this needs more testing. Finally, i'd like to thank Grimes for this noob friendly script that helped a lot of people. Cheers :)... -
Zeus AI Combat Skills
Federico 76 replied to Protegimus's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Yes, of course everything will work in the vanilla game... The point here was to find something that actually works with the mod, since it would be a shame to lose all the improvements of the mod just for this issue. Well, i guess i'll have to modify that part of the mission or disable the mod. Thx for help anyway, maybe in your list i can find something good for replace zeus AI. -
Zeus AI Combat Skills
Federico 76 replied to Protegimus's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Thx for reply again, but the script seems not to work well with the mod: for some reasons, as they see the enemy, they start moving around as usual... I made some tests and i noticed that this problem is caused by the FindCover.pbo, which seems overwriting any command given to AI (including "setUnitPos" command etc...) as soon as contact with enemy is established. I also tried to remove that file from the mod, and, even if i get the error message when i start the game, i'm still able to play... But then unfortunatly it's not possible to load any saved game made with the mod even if the saved game was created after the FindCover.pbo was removed. Well, it seems there's not much we can do... I'll try to get around the problem somehow. -
Zeus AI Combat Skills
Federico 76 replied to Protegimus's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Thanks mate, this looks very good for a fast set up of soldiers in cities, and i will use it for sure since it can save a lot of my time... But, let's say that for exemple i want to put some guys behind some cover like sandbags etc... Then i should really find some kind of command that actually tells them to hold the position without going around on their own. I just hope that this is possible to do with this mod, since it is a great improvement of the retarded vanilla AI :)... -
Zeus AI Combat Skills
Federico 76 replied to Protegimus's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Hello everyone, i'm trying this great mod right now, but i have a problem with it: Even with the "setVariable ["zeu_AIBypass", true]" command the AI soldiers are still moving on their own, and since they're supposed to defend a building and shooting from windows, it's necessary that they stand exact in the place i put them... I could try with "disableAI "move"", but with this they won't be able to turn around anymore. Any solution? Am i missing something? (I also used the "forcespeed 0"; "doStop this" and "disableAI "target"" commands.) -
Hello guys, i've just tried the mod and the AI now looks great, but i've a problem: in the editor seems like that the AI can now ignore the "dostop", "force speed" and the "setunitpos" commands when in fight... I ofthen use dostop and forcespeed to make an AI soldier (that is part of a group) hold the position especially when i put them in a bunker or when i want them to snipe from a window etc... So, basically, i want to know if there is a way to tell someone to hold the position without moving at all. And of course the "DisableAI "move"" command isn't good because it also freeze the soldier in one direction. Can anyone help me with that?
-
Invasion 1944 - DDay 2.0
Federico 76 replied to SFG's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Ok, thanx very mutch for the response. I'm going to try to find that module now. -
Invasion 1944 - DDay 2.0
Federico 76 replied to SFG's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Hi everyone... I've just downloaded and installed the mod, and sure it looks great , but i've got a problem: i think that i've intalled it correctly and everything seems to work fine, but when i watched the videos posted in the first page i noticed that i miss some parts, like the rifle bolting animation: in my game, while the bolt of the rifle works correctly after each shot, the soldier doesn't move his hand at all. Also, in those videos i can hear germans that actually speak german, while on my PC they still speak russian... And of course i've the 1.08 patch too. I've downloaded the mod from the first mirror (ArmedAssault.info), maybe i should try to redownload it form another one? -
Prevent units from moving
Federico 76 replied to PorkyJack's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Mmm... My squad leader give the "engage" order even if the group is in yellow combat mode... Am i missing something? :j: -
ArmA 2 Buglist - Content related bugs only
Federico 76 replied to Red_153D's topic in ARMA 2 & OA - TROUBLESHOOTING
AI can not see (and shoot) through the windows of the open houses that you can find in most cities... My version is 1.02, i don't know if this bug is present also in the previous versions.