-
Content Count
21 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout fro
-
Rank
Private First Class
-
[Campaign Creation] Error in campaign structure
fro replied to manzilla's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I have been looking everywhere on how to make a campaign. I have some missions that I have made pretty similar to each other and thought it would be somthing to try out. Manzilla, you said that you found some info on packaging a campaign, do you still know where that is? Thanks for the help! -
I believe the answer should be yes, you should keep everything the same, for the most part. You will only need the following line to appear once: this addAction ["Recruit Units","bon_recruit_units\open_dialog.sqf",[],-1,false,true,"","player distance _target < 5 && leader player == player"]; So if you were using a trigger, like I do, you will not need it if you put the code into the init if the barracks that you named brk. (notice in the line provided by bon, and that I also quoted here, will require you to change _target to the name of your barracks which, if I remember right, you named brk) If you do decide to put it in the init of the barracks, then you should be able to recruit units from the barracks as long as the barracks is not destroyed. I don't believe you should have to worry about that unless there is a chance that the enemy will come near your base. Some times they like to shoot rockets at certain objects within a base. So basically if there is a slight chance that the enemy may be near your base then also put the following line into the init of the barracks: this allowDamage false; It basically makes the barracks invincible. One last thing, by putting this code in the init of the barracks, you will have to "look" at the barracks in order to have the action appear, just like when you come up to a ladder and want to climb up or down it. Don't let all this get you down. It takes time to be able to figure all this out. I am still learning alot.
-
Fruity Rudy, If you do come back to this post I have some suggestions. Suggestion 1: For your common.hpp question from earlier, if you open up the file in either "bon_loadoutpresets/dialog" or "bon_recruit_units/dilog" you will find a message from Bon stating: "Always replace my Common.hpp with the latest version, if no version specified, consider it as version 1.0. However, never include two Common.hpp at the same time in the Description.ext." The versions are: bon_recruit_units v 1.092 bon_loadoutpresets v 1.091 So to simply state it, you need to use the "bon_recruit_units" common.hpp file because it is the newest of the two files you have in your mission folder. Suggestion #2 You have been using the following code in the init of your player: player addAction ["Recruit Units","bon_recruit_units\open_dialog.sqf",[],-1,false,true,"","player distance brk < 5"]; Don't be offened but did you or did you not run around the barracks? It is fine if you didn't, I only ask because giving the player only a 5 meter radius to satisfy the condition is kind of small. I ran into a simmilar problem with this when I first started out. Try changing from < 5 to < 20 and see what that does. Also, as a side note, you can change the "player addAction" part of your code to "this addAction" and only the unit with the code will be able to run the action. If that makes sense, then GREAT! If not, then don't worry about it and forget it. Haha, also an fyi this is what my code looks like in my unit's init: this addAction ["Recruit Units","bon_recruit_units\open_dialog.sqf",[],-1,false,true,"","player distance barracks_1 < 20"]; Suggestion #3 If you are going to do any editing you will find out that you do alot of testing. One way of testing if this script will even work (as in you have everything lined up and ready to go except how you want to call the script) is, create a trigger and move it so the activation radius is just outside of your player. Group your player to the trigger and then put these variables into the trigger: axis a: 50 axis b: 50 angle : 0 Activation: Group Leader (the trigger must be grouped to the player (or unit you want to use) before you can choose this) Repeatedly should be selected Present should be selected don't worry about any time settings Condition: this On Act: usbrkrecruit = player addAction ["Recruit Barrack Units", "bon_recruit_units\open_dialog.sqf"]; On Dea: player removeAction usbrkrecruit; Now hit preview and once you're in the game, move toward the trigger (if you set it close you wont have to move far) once you are in the trigger it should give you an action to "Recruit Barrack Units." Select it and see that your units are in the list. Exit the list and move away from the trigger, and you should see that the action disappears. This should prove to you that the script will work and that something is wrong with how you are calling the script (if anything is wrong, just remember to up the distance). Please keep us posted.
-
R.Flagg I used this code to help spawn vehicles with this script, I believe you can use it to help place a specific init into specific types and factions of units if(side player == west) then { if(_unittype isKindOf "Man") then { [b]***place code here***[/b]; }; if(_unittype isKindOf "USMC_Soldier_Base") then { [b]***place code here***[/b]; }; }; if(side player == east) then { if(_unittype isKindOf "Man") then { [b]***place code here***[/b]; }; if(_unittype isKindOf "RU_Soldier_Base") then { [b]***place code here***[/b]; }; }; basically if you want all russian soldiers that are not spetz or MVD to have a certain init then use RU_Soldier_Base or if you want to split them up and have a different init for the AT or the AA variants then use RU_Soldier_AT or RU_Soldier_AA (respectively). you can find the hierarchy here: http://community.bistudio.com/wiki/ArmA2:_CfgVehicles
-
ArmA 2: CfgVehicles - Vodnik Class troubles
fro replied to fro's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Shuko, Thanks for replying. I have tried the following in my script: _GAZ_Vodnik_HMG = typeOf _unittype GAZ_Vodnik_HMG = typeOf _unittype "GAZ_Vodnik_HMG" = typeOf _unittype _unittype = typeOf _GAZ_Vodnik_HMG _unittype = typeOf GAZ_Vodnik_HMG _unittype = typeOf "GAZ_Vodnik_HMG" _unittype typeOf "GAZ_Vodnik_HMG" _unittype typeOf _GAZ_Vodnik_HMG _unittype typeOf GAZ_Vodnik_HMG "GAZ_Vodnik_HMG" typeOf _unittype _GAZ_Vodnik_HMG typeOf _unittype GAZ_Vodnik_HMG typeOf _unittype and none of them worked... anymore help would be greatly appreciated -
ArmA 2: CfgVehicles - Vodnik Class troubles
fro posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hey everyone, I have been messing with a script all night and can't figure it out. I am using bon's AI recruitment script to spawn vehicles along with soldiers. It is working great except for one thing. when I try to spawn a Vodnik (2xPk) two of them appear and for the ambulence version 3 pop up. In bon's script (more specifically the recruit.sqf file) I have entered several lines of code. The part that I believe is messing up is: if(side player == east) then { if(_unittype isKindOf "Tank") then { _unit = _unittype createVehicle (getMarkerPos "ruhvyspawn"); }; if(_unittype isKindOf "BTR90_Base") then { _unit = _unittype createVehicle (getMarkerPos "ruhvyspawn"); }; if(_unittype isKindOf "GAZ_Vodnik_MedEvac") then { _unit = _unittype createVehicle (getMarkerPos "ruvhopspawn"); }; if(_unittype isKindOf "GAZ_Vodnik") then { _unit = _unittype createVehicle (getMarkerPos "rulgtspawn"); }; if(_unittype isKindOf "GAZ_Vodnik_HMG") then { _unit = _unittype createVehicle (getMarkerPos "rulgtspawn"); }; if(_unittype isKindOf "Kamaz_Base") then { _unit = _unittype createVehicle (getMarkerPos "rulgtspawn"); }; if(_unittype isKindOf "UAZ_AGS30_RU") then { _unit = _unittype createVehicle (getMarkerPos "rulgtspawn"); }; if(_unittype isKindOf "UAZ_RU") then { _unit = _unittype createVehicle (getMarkerPos "rulgtspawn"); }; }; I am finding the vehicle classes from: http://community.bistudio.com/wiki/ArmA2:_CfgVehicles I believe that there has been a mistake where it lists the vodniks further down the page. The Vodnik heirarchy goes as follows: -GAZ_Vodnik_HMG --GAZ_Vodnik ---GAZ_Vodnik_MedEvac If I am reading this correctly they are all a part of the GAZ_Vodnik_HMG "Family" which is the BPPU varient and I have a hard time believing that. Also most the other classes usually start with a (name your unit)_Base model and then work into the different variants. To get to the point I want to know what the proper hierarchy for the Vodnik is and how we can bring this to the attention of someone who can fix the Bohemia Interactive Wiki. Thanks for the help in advance. -
Heli drops troops, retreats, comes back with more
fro replied to andysfile's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hey Andysfile, I have been working on the same thing, were you able to find a solution? -
Land a Helo Any place you want!
fro replied to peppy's topic in ARMA 2 & OA : ADDONS - Configs & Scripting
Hey Peppy, I am not sure how this is a "precise" landing script. It does make the helo land but in neither of your missions above did the helo land where you said it would. Is it just me? I have been trying to make my own script where I have an endless loop of one helo dropping troops off and coming back to base to get more. I keep getting stuck on the return trip. The helo, before I used your script, wouldn't land. It would come close to its last waypoint and then hover. Your script has made it possible to land the helo, but now the troops won't get into the chopper. Anyway, thanks for the help! -
Hey Bon, Everything worked out! I was also able to create vehicles with your recomendation. The only minor problem was that at first the script said it had spawned the vehicle but hadn't, so I changed the spawn position to a marker and now it works great! I changed this line from your previous post: _unit = _unittype createVehicle _spawnpos; to: _unit = _unittype createVehicle (getMarkerPos "vehspawn"); I didn't have much time to see what else I could do, but maybe later. For now it works great for me. Thanks!
-
Hey Bon! I was searching for a better way to recruit units than what I already have (add action type) and noticed this. I downloaded the example and to my dismay found out it was made for Arma 2 OA... I am in no way an expert script writer but, I took a look at your scripts and didn't see anything that would keep me from using it in Arma 2 vanilla besides the unit names. I am at work now and will try this out later tonight, but figured I would ask if this is even possible. I have to say I am a fan of your work. I used the weapons preset script of yours and it is awsome! I believe it is alot better than refilling ammo boxes. Keep up the great work! EDIT: Ok, I have extracted the bon_recruit_units folder from the downloadable mission and this works very well. Step by step I (for those who may want to know): 1. Extract the bon_recruit_units folder into a preexisting mission folder. 2. Change the types of units in the recruitable_units.sqf to Arma 2 friendly types (from US_Soldier_AA_EP1 to USMC_Soldier). 3. Create any inanimate object like a barracks, as I did and name it, for this example, brk. 4. Create a trigger with the following parameters: Condition -> player distance brk < 20 On Activation -> recruit = player addAction ["Recruit Units","bon_recruit_units\open_dialog.sqf"]; On Deactivation -> player removeAction recruit; And that should be it!!! It took me a minute to find out how the dismissing worked but all you do is look at the soldier you want to dismiss and select Dismiss from the Action Menu (so if anyone wants to know). My only real problem is that once you get within 20 meters of the barrack I named brk the Action will not go away, even if I go outside of the trigger. removeAction for some reason does not work. Any help with this will be great, it is kind of annoying having the "Recruit Units" action up all the time. Also, is there a way to create vehicles like hummers and tanks with this? I tried adding "HMMWV" as a unit type in the recruitable_units.sqf file but it only displayed an error message. Thanks for the hard work Bon!!! LAST EDIT: I just got the action to go away. I placed this addAction ["Recruit Units","bon_recruit_units\open_dialog.sqf"]; into the Init of a Barracks and it works when you are within about 5 meters and looking at it, then disappears if you look away or move further than 5 meters or so away. Hope this helps! Still if anyone has an Idea of how to get removeAction to work I would like that more. I find it a hassle to have to look at the barrack in just the right way. I would rather just be near it to call the recruit script.
-
Bon, Thank you for the help! I had to tweak it just a little to finally get it to work. I don't know why it has to be shown like this but this is what I did to make it work: if(side player == west) then{ #include "presets_west.sqf" }; if(side player == east) then{ #include "presets_east.sqf" }; I had to tier the if-then statement for the game to recognize the #include statements. I also had to change "playerside == west/east" to "side player == west/east". Thanks for the help and I have to say I love this program!
-
Hey everyone, I am creating a multiplayer mission where two opposing sides, USMC and Russia, have access to the load out script. I want for the USMC players to only have access to USMC weapon loadouts and not the Russian loadouts and the same for the Russian players. Has anyone tried to do this? I have been working on it for a while and can't figure it out. Any help would be awsome, thanks.
-
Thanks, I will try that out!
-
Teleporting for one side only
fro replied to BittleRyan's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks for the help guys! That did the trick. I am playing with the teleport right now. However I ended up changing the teleport.sqf. I was able to fix the error message but in the game it wouldn't teleport when I clicked on the map. I ended up changing it to: _id = _this select 2; hint "Click on the map to teleport to that location"; player removeAction _id; onMapSingleClick "player setPos _pos"; I got it to do what I wanted to do. I can teleport all over the map, but once you activate the teleport command it doesn't go away and any time you click on the map it WILL teleport you. For me that is no big problem as I am using this to help make my single player missions. I don't know what one would have to do in order for you to comand each teleport and end it once you teleported. That may come in handy for someone elses mission later. Oh well, Thanks again! -
Haha, I was writing "C:...\ArmA 2\arma2.exe-mod=@Medevac" and not "C:...\ArmA 2\arma2.exe" -mod=@Medevac. To answer your last, I was looking there but nothing at the time was showing up. However, with your help, it is fixed and working great! I am playing with it right now. Only problem I have seen so far is that I don't see an option for the rescue mission... I have tried placing AA guns between me and the game logic. The chooper gets trashed and the hint "chopper is blowed up" appears but no option to rescue the fallen comrades. Do I have to change a script to enable the option? Also for anyone with the problem of putting the -mod=@Medevac for Vista. I open games from the "Games" menu in the start menu. I don't like to clutter my desktop with millions of shortcuts. You can still add the mod suffix by right clicking the game icon in the "Games" menu, selecting cstomize, select "edit" for the first option "play" and in the property menu after the target it should read "C:\...\ArmA 2\arma2.exe" -mod=@Medevac Thanks for the awsome mod and all the great help!