everyone
Member-
Content Count
14 -
Joined
-
Last visited
-
Medals
Everything posted by everyone
-
Spawning explosion bombs other than the good 'ol GBU12 LGB
everyone posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
As usual for me, I set off to start putting together a mission that should take 20 minutes, but then get stuck on one tiny detail and spend three hours researching it without accomplishing a damned thing. Arma editing will be the death of me. So in past Armas, whenever I wanted to trigger an explosion I'd use: bomb = "Bo_GBU12_LGB" createVehicle at a specified marker. I want to do this in Arma 3, but there is no paveway in-game as of yet (or if there is, its class name has changed to something I can't find). I want to simulate a mortar strike (without going to the trouble of adding an artillery support module to pull it off), and for the life of me I can't get the 82mm mk6 mortar shell to explode. Any idea how to do it? I figured out that the mortar shell class name is Sh_82mm_AMOS, but using the line: bomb = "Sh_82mm_AMOS" doesn't work. Same for shell = "Sh_82mm_AMOS", grenade = "Sh_82mm_AMOS", and so on. Another question: I'm trying to simulate being fired upon by a mortar that is set up in a base you're assaulting at night. Creating the explosions should be easy (provided someone answers the above question), the other part of the simulation would be to make a muzzle-flash that would be visible to the players if they're looking at the base, in order to provide warning of the incoming mortar shells. Any idea how (or even if its possible) to trigger not an explosion, but just the muzzle flash? Its either that or set up an enemy mortar team to fire a couple shells at the player after the player sets off a trigger... I'm not sure which would be more efficient. -
I'm glad someone is taking a measured look at this. I spent twenty minutes yesterday trying to force an AI to shoot an anti-air rocket at an incoming helicopter, and it was generally a miserable failure. I've had similar poor experiences trying to get AT soldiers to engage hostile Ifrits. Come to think of it, relying on AI to take on anything at all generally turns out poorly...
-
Spawning explosion bombs other than the good 'ol GBU12 LGB
everyone replied to everyone's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Excellent, that is very helpful, thank you. Also, something I have always struggled with when editing Arma: is there any simple way to figure things like that out? I've googled high and low for a definitive list of class names and their associated function, but the best I can find are incomplete lists cobbled together by people brute forcing their way through a database. The best I've come up with is the this addEventhandler ["fired",{hint format["%1",_this]}] trick, but that is so inefficient that I can't decide if its funny or sad. Plus it didn't even end up working with my mortar explosion struggle last night. -
Unit initscript for flashlight
everyone replied to De_little_Bubi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hm still can't seem to get the group thing working. I made four units, then using the Group tool, dragged a blue line from from each unit to the one designated as the group leader. In his initbox, I put: Grp1=group this; Grp1 enablegunlights "forceon"; His light is on, the three squadmates' lights are not on. {_x enableGunLights "forceon"} foreach units Grp1; also doesn't seem to work. I'm not too worried, as it works when I enable it for each individual unit, but it would be nice to streamline the process since I'm going to have a few different patrols, all with their gunlights activated. -
Unit initscript for flashlight
everyone replied to De_little_Bubi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Interesting, while testing it out by spawning 300m away and then running closer to them (seeing if/when the off lights in the group would come on) the game froze and crashed, and my display driver crashed and recovered. Now the game crashes to desktop on launch... even after verifying the integrity of the game files in steam. This might take a while. Moral of the story: don't screw with those flashlights. -
Unit initscript for flashlight
everyone replied to De_little_Bubi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hmm, also noticing some oddities... after double-checking to make sure all four units were identically coded, I confirmed that all four were patrolling with lights on. Weirdly enough, when I move my spawn point to 300m away, only three of the four guys have their lights on. Might be something weird with the dynamic lights setting. I'll fiddle with it some more and see how it works out. So far though it appears to be (mostly) working, so thanks for the help guys. :) How would I make them into a group? From my earlier experience I remember creating groups manually by click-dragging from each unit to the group leader with the grouping tool. Do I just do that, then add blue=group this to the group leader's init? -
Unit initscript for flashlight
everyone replied to De_little_Bubi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
After years of working with Arma2, I'm still pretty terrible at figuring out scripting syntax (most of it is trial and error, and very frustrating). player action ["gunlighton",player] works when put into the player unit's init box, as does this action ["GunLightOn",this]; Neither command seems to work when applied to an AI unit however. Next I tried group this enableGunLights "forceon" in the init box of a leader of a group of units... voila, it worked, but only for the group leader (the guy whose initbox I put it in). I can also just put in this enablegunlights "forceon" and that does the trick as well for each individual unit. Maybe I'm just not grouping them correctly? It has been at least a year since I last really spent time with the editor, I'm just now getting back into it with the alpha, and the new layout keeps causing minor confusion... that could be it. Regardless, I clearly need to bone up on my syntax. What does adding a _ in front of a line do? I haven't figured that out, though I realize it has something to do with local vs global variables. -
Unit initscript for flashlight
everyone replied to De_little_Bubi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've been trying to get this to work also, with no luck. I've toggled through just about every setting for waypoints, and the only thing that makes them use their flashlights is combat mode... which also makes them spastic. If anyone has any luck figuring this out, it would be much appreciated. -
Warfare City/Camp models - prevent from random?
everyone posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
So some of the spaces that I'm trying to place capturable cities/camps in my warfare map are a little tight. The problem I'm running into is that there are four or five different models for cities and bases, and each load of the map chooses a random one to spawn. On one preview, the camp might be a very small one and fit with no problem at all. But on a second preview, the largest camp model will spawn instead, and be way too large, expanding into a nearby hillside, or building, and looking very out of place, as well as disrupting movement through the area. Is there some line I can place in the init line of the camp and city game logics that I place that will force them to spawn with a specific model, versus one that is randomly chosen by the game-engine? -
Warfare - Map default city locations
everyone posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi all, I've been messing around creating warfare missions lately, and have run into a couple problems: a couple of the maps I've played with (Zargabad and Lingor Island) have built-in city locations and in the case of Lingor, starting locations as well. In the case of Lingor though, the city locations don't work well: when the module autopopulates the map with capturable cities and camps, they tend to be in spots that don't work (blocking roads, halfway through buildings, built into hills, etc). After some digging, I learned that I could disable the rogue starting locations using the line BIS_WF_Common SetVariable ["sidePlacement",[false,-1,-1]]; in InitMissions.sqf. This has worked fine, and now the mission only uses the starting locations that I manually create. But I can't figure out how to disable the built-in cities, so that the mission only uses those that I've placed manually. I have a feeling it has something to do with the line BIS_WF_Common SetVariable ["customTownsScript",""]; but I don't know how to do it! To be fair, my knowledge of scripting is pretty terrible and I'm trying to learn. If this is something easily done through scripting, and there is a scripting tutorial/learning resource you know of that could teach me, feel free to point me towards it. :) -
Warfare - Map default city locations
everyone replied to everyone's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
For future people using the search function: Db replied to me with a tip that worked. Put a marker somewhere on the map where it doesn't cover any cities (off in the water works fine), name it BIS_WF_InitRegion0, and voila. That marker will cause the module to only auto-populate build-in cities within its boundaries. So if you put it somewhere where there are no cities at all, it will ignore everything except for those cities that you've entered manually. -
Warfare - Map default city locations
everyone replied to everyone's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Magicpanda: Yes, Db's site is where I've learned most of what I know about the warfare module (combined with a bit of digging through .pbos and playing with the example missions BI provide). Unfortunately, the map that Db uses for his examples does not seem to have the problem of built-in city markers, and thus the problem hasn't been addressed. I emailed him a few days ago but haven't heard back yet, I figure a response might be quicker here. :) Icebreakr: I'm not really sure what needs to be changed, or if it's something I'm just doing wrong myself! I'm not sure if the Warfare module is smart enough to auto-detect good places to put City gamelogics (maybe it just looks for places with roads and houses?), or if the module is keying in on something you do during the map making process (perhaps some sort of marker placed in cities, to help AI pathing, that is invisible in the in-game editor? Same goes for starting locations). For now, believe me: Lingor is simply amazing, and you shouldn't change a thing. I imagine this is a pretty simple script, so I'm hoping some scripting guru shows up and spits out a line. :D -
How do I set multiple actions for a trigger's activation?
everyone replied to everyone's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
got it! i'll go try that out. thanks for the help! -
How do I set multiple actions for a trigger's activation?
everyone posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I've been beating my head against the keyboard on this for a couple hours now and haven't been able to figure it out. I'm no coder, so this is like struggling through a foreign language here. Figure maybe someone here can give me the answer much faster than I would be able to find it on my own. :) I'm using the setTriggerStatement command to make a trigger activate at a specific time in a mission. My problem is that I want there to be TWO effects on activation. I can't figure out the syntax to do this however. basically something like: trig1 setTriggerStatement ["!alive dummy", "(obj_third6 = true; publicVariable "obj_third6")", "ok=false"]; obviously, the parantheses don't work (I tried!), but I'm trying to have 'on activation' do BOTH the obj_third6 = true, and publicVariable "obj_third6". Also, the trigger deactivation is unimportant... the example given by BI had "ok=false", and I have no idea what that means or does. Is that a good harmless thing to put in there, or can I just alternatively not put ANYTHING in for the 'on deactivation' variable? I guess I could just make two triggers, one for each effect... but that seems kind of ghetto. Plus, it would result in a LOT of extra triggers floating around (this event is already rather trigger heavy). Like I said though, coding is a pretty foreign language to me. For context, this is what's being done in the mission: After capturing a town, a trigger activates that starts a counter-attack. I spawn in six opfor infantry units outside the town, and have them attack. I want the mission to end once these enemies are dead. Because these events occur at the end of a lot of action in and around this town, I can't just have a simple trigger with the old 'opfor not present, end mission' action. My solution was to use a trick from a tutorial video I watched. I create a trigger for each group of enemies (so six total), and when that group !alive, the trigger spawns a public variable and sets it to true. Another trigger is set to activate and end the mission when all six public variables are true. Because the enemies these triggers look for are not present at the start of the mission (the only spawn once the town has been taken), I can't have the triggers checking for their presence from the beginning... so I tie the setTriggerStatements to the units spawning, so that the triggers start looking for their !alive status as soon as they spawn.