Jump to content

CarlGustaffa

Member
  • Content Count

    6420
  • Joined

  • Last visited

  • Medals

Everything posted by CarlGustaffa

  1. CarlGustaffa

    deleteVehicle on a whole convoy

    I made it working as suggested (using the name), but I still have to deal with each separate vehicle. Can I do mulltiple forEach loops within a line? I.e. {_x deleteVehicle} foreach crew {thislist select _y} forEach vehicle thislist??? Have NO idea what such a syntax would be, and I'm getting nowhere. Just for fun though, would be nice to know Edit: Here is one that the engine don't like the syntax of (type code, expected array): This is what I ment with a one-liner; one line to delete all crew in all vehicles, pluss all vehicles. Basically just clear the area. Same goes with dead units if any within the trigger area (another similar problem). <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> {deletevehicle _x} forEach {([thislist select _x] + crew (thislist select _x))} forEach thislist
  2. Hi Here is a little code snippet that won't work for me. I thought you could use curly braces {}to indicate "blocks" of code that the engine would read as a whole line. Maybe I misunderstand. Sorry to bug you all with so many noob questions The code goes something like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> //Unit counter loop report _iCount=0; while {_iCount<1} do { sleep 10; _gAlpha = {alive _x} count units gAlpha; _gBravo = {alive _x} count units gBravo; _gCharlie = {alive _x} count units gCharlie; _gDelta = {alive _x} count units gDelta; _gPlatoon = _gAlpha + _gBravo + _gCharlie + _gDelta; _gWest = WEST countSide list tUnitCounter; _gEast = EAST countSide list tUnitCounter; _gResistance = resistance countSide list tUnitCounter; {hint format ["UNITS:\n gAlpha: %1\n gBravo: %2\n gCharlie: %3\n gDelta: %4\n gPlatoon: %5\n\n West: %6\n East: %7\n Resistance: %8", _gAlpha, _gBravo, _gCharlie, _gDelta, _gPlatoon, _gWest, _gEast, _gResistance] }; }; When curlys are removed and everything put to one line, it works as it should. Is this possible? If so, where is my mistake?
  3. Guess the topic sas it all; anyone knows how to 'cancel' a dismissed waypoint? Make them somehow get back together and advance to the next, other than making them see an enemy (reacting to an alarm i.e.) Any ideas on this one?
  4. CarlGustaffa

    Possible to advance on dismissed wp?

    Well, it sortof works. They will start moving and doing cycles again, but other waypoint info (speed, combatmode etc) are ignored for the corresponding waypoints after that.
  5. CarlGustaffa

    Possible to advance on dismissed wp?

    Not 100% sure here, but I really believe I have tried the synching. Maybe adding a few units and quickly delete them again would do the needed trick? Any invisible units available for this? I really like how they behave while being dismissed but not having them react to anything but enemy makes the dismissed waypoint a bit useless imho. It should react to a sync OR units spotted.
  6. Hi Having problems with ending my mission based on boolean or integer variables. I put in radioAlpha (for quick testing) activation trigger iSeized=2 (fully seized, incl some other objectives regarding destroyed vehicles), and in my so called Win trigger I check against condition iSeized==2. Using it as a lose trigger it works, but setting it as a win1 trigger, nothing happens. The briefing.html contains some debriefing sections labelled i.e. name="Debriefing:End1" in the end of the file, but not sure if this is related to the trigger not working. Where might my mistake be? Edit: Btw, the end trigger actually works, since the text I put in as an effect shows up. But the mission doesn't end with the correct debrief. Edit2: Oh darnit! Never mind!! I didn't wait for the ending to actually take place, as it delays 3-4 seconds to happen. :S Debriefing shows up too. Oh well, lesson learned
  7. CarlGustaffa

    Can't End my mission

    Hi This reply is mostly for fellow newbies, as I'm sure it's very obvious to the vets. Yes, I obviously use more than one ending, but because of that T72 that has several "modes", it caused me some confusion. But yesterday I had a little breakthrough, and I think I'll be able to handle that tank tomorrow I use now the following for my end system: iSeized=2 IF iSeized==1 (objective) && bBmp (objective) && bShilkas (objective). These three objectives *need* to be done before the ending system will activate, but all "required" tasks doesn't actually "need" to be done. Prepare for ending IF minimum conditions are met (iSeized==2) Play some music, and let player have some additional time to complete optional objectives. IF iSeized==2 THEN play music, bWaitForMusic=true Okay, music has ended and it is time to actually activate the end triggers: End1: bWaitForMusic && !(bChoppers) && !(bRadio) Gives a minimum win, say; score 100. Remember that the minimal win condition, iSeized=2, is already checked above prior to the bWaitForMusic being set. End2: bWaitForMusic && bChoppers && !(bRadio) Gives a small win, say score 300, since bRadio was marked as a required objective, but actually isn't. End3: bWaitForMusic && !(bChoppers) && bRadio Gives the medium win, say score 600, since the "required" but hard to do radiotower was destroyed. End4: bWaitForMusic && bChoppers && bRadio Gives a maximum win, say score 1000, since all required and optional tasks were complete. Now, for other newbies the following might be interresting I could not get these triggers to work properly because of one single yet extremely important thing: Even with radiotriggers to "set it off", I could not get i.e. the !(bChoppers) to work, and I couldn't believe why. Then I set another radiotrigger to do bChoppers=false, and voila --- it worked?!? I was shocked, surpriced, and stumbled. Then it struck me; even if I use bMyVariable to denote a boolean variable, how would the game engine know this? And all I had to do to make everything work the way it was supposed to, was to initialize variables so that their "type" would be correct. All bMyBool set to False as default, all iMyInteger set to 0, maybe even sMyString set to "empty" or whatever. You get the picture. Even if you check against TRUE, it might not trigger when you later decide to check against FALSE and it was never set to FALSE. Maybe it's a classic newbie mistake, I don't know. Just thought I would share my lesson
  8. Thank you, got everything working now thanks to this. Arrays and nested arrays are never easy. The group array doesn't make it any better
  9. CarlGustaffa

    Can't End my mission

    Hehe, it is But also a bit painful since always tend to end up in different difficulties each day... Such as this new one: I have a "minimum required objectives" setup to even start the endmission system. This consist of i.e. 3 objectives being met. However, one of these objectives is to destroy a tank with a 70% probability even showing up on the map. For the objectives, it works fine, as the objective doesn't show up if the tank doesn't appear or is killed in a minefield. But how do I add this as a minimum condition for the ending system to trigger? I.e. in the condition field (b denotes a boolean value): bObjA && bObjB && bObjT72 What I need is something like this as a single condition: if bT72Activated (set by the tank itself if it enters the map) then requirements are bObjA && bObjB && bObjT72 else requirements are bObjA && bObjB However, there is a twist here. By default the bObjT72 is set to "HIDDEN", and it will run over some mines within a trigger. Only if the tank makes it out of the trigger will the status (kill that tank) be set to "ACTIVE". If the mines kill the tank it will not show as an objective, and as such it willl not be a required objective to start the endmission system. How on earth would such a syntax look like for a condition field?
  10. CarlGustaffa

    In Need of Scripters

    I was planning to use some of the radio snippets from GTA Vice City, and place as sound for closed houses in ArmA. Nice ambience Need to convert it to a "radio-ish" sound tho, and bring it seriously down in size - small snippets only, once in a while. Could be cool. Don't know about the "legality" of reusing stuff from other games, but I only create for myself for now anyway, so not a big deal.
  11. CarlGustaffa

    Say / PlaySound

    I'd try the globalRadio or groupRadio commands, although I've never played with those (yet). My voice "acting" makes texted radio messages my only choice
  12. Well, actually, I've read it twice now..... Only one line on the backside of it though naturally No seriously, the manual actually has a little info on waypointing and synching, but far too little. This game/system/entertainment system needs something better than a manual, a bible would be more appropriate. At least save us from the embarrasing leaflet provided...
  13. CarlGustaffa

    Say / PlaySound

    Yup, I use say for custom soundeffects. I think theyneed to be in mono, and will give a directional clue. Playsound I believe can be stereo but remains the same when you turn around, no doppler effect etc. However, I rarely use playsound. But can someone answer me why it is so damned hard to get custom sounds to work properly? The trigger works, and the sound sometimes plays and sometimes not. So the sound "format" is okay (ogg). But somehow the engine simply *refuses* to do what it's told Unpacking pbo's, I often see soundfiles in a completely unknown (to me) format. I thought ogg was to be used I was planning to use some cool alarm sounds, but it feels I'm stuck with that horrible bell or cheezy other alarm - yuck... I use the FDF soundpackage in case it should matter, but I can't live without it now Am I doing something wrong, or is the engine having some known problems I'm unaware about? I haven't had any problems with custom tunes though.
  14. Sorry, my competence with this scripting language is just not good enough to understand what is going on within that code. I'll wait until I get better before I try to implement any of that But, slightly back on track to something (I thought) I understand... The line: {showpos = _x addAction ["Pos Data", "getposaction.sqs"]} forEach thislist works when placed in the "On Activation" line in a trigger, but using this: [thislist] exec "bat\attach.sqs" instead, combined with the script: _allunits = _this {showpos = _x addAction ["Pos Data", "getposaction.sqs"]} forEach _allunits exit just gives me a "generic error" message. Where am I going wrong? What is it that I don't understand? I've spent almost the whole day trying to figure this one out, trying various "hit & run" approaches. This stuff makes me crazy sometimes, but very cool when something actually works
  15. Hi From he wiki I see that setgroupID now supports giving the name for each group as you see fit, no longer restricted to only the given Alpha, Bravo, etc. Very nice. But is it possible somehow to have i.e. a member/leader/radioman of Alphateam call Bravoteam in such a way that he is identified as another groups teammember? I.e. "Bravo5: Thanks for the support, let's head home" Or have him call certain groups but without using sideChat? Using the sideChat seems awefully limited with only two working sides (for west; HQ or Firefly, rest will work as HQ). I wish a future patch could address this limitation. I was thinking of having this dummyguy going in and out of groups to chat, but I feel this would look bad especially when playing the groups leader, having this dummy guy popping in and out of the group... Not to mention what this could do to possible counting events that takes place. But for now, is there any way around this?
  16. CarlGustaffa

    Can identified groupmember sidechat?

    Great, that will possibly do the trick. Group ID's can "fix" the names, and all other uglyness I'm stuck with is the number 1 sign after his ID. Not perfect, but far better than I actually hoped for. Case closed. Maybe the wiki should be updated with info saying sideChat don't work in init fields? Spent too long time figuring out that was my main source of error
  17. This would be nice to have on my singleplayer map experiment as well (just learning this stuff). I'm able to use the following line if placed on individual units: this addEventHandler ["killed", {_this select 0 exec "EH-killed.sqs"}] I'm also able to attach the EH to all units within a trigger if the code is placed within the trigger itself, such as: {_x addEventHandler ["killed", {_this select 0 exec "EH-killed.sqs"}]} forEach tAreaCounter (tAreaCounter can be replaced with *this* in this example). But I'm having problems when trying to execute this from init.sqs. In that regard I have a couple of additional questions: 1) How can I achieve this from init.sqs? 2) How can I assign it only to a given side(s) or units within the trigger area, also preferable from init.sqs? 3) In case of multiplayer (coop) later, how can I remove all the inventory of this players inventory at his killed-spot, and place them there, so that he has to go there unarmed and pick it up as part of his "being killed punishment"? What I'm trying to achieve here is that if I as a player kill an enemy, he should die and be removed within a certain time. I can go there quickly and grab his weapons, but only if he is still there. If a player is killed in a multiplayer game, all his weapons should be placed where he died, and he should respawn "naked". Any ideas?
  18. Hi Edit: Grouping is the correct term, not synching. Found a peculiar setup in one of the builtin singleplayer missions. In M05SanitaryOperation.Sara there is a group leader and two members. The group leader is also actually grouped to a marker (type empty). The group has only one HOLD waypoint to go to. What on earth is the purpose of this grouping? Never seen a marker been used before. Also, there is a chopper flying over us as the mission is started. Does it have a purpose, such as telling the enemy ground units what is about to happen (knowsabout)? Or is it simply for shows.
  19. CarlGustaffa

    Lighting

    I use the editorupdate to put some lamps into the map, then I turn them off in the init.sqs with: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ~1.0 lamp1 inflame false That ~1 seems important, as it takes a while for the engine to turn on the lamps automatically. Do it instantly, and it will turn off the lamps, THEN the engine will set them to auto or something. Then I replace those uberlights with something to better suit my personal taste, with this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _brightness = 0.1 _color = [0.2, 0.2, 0.05] _ambient = [0.2, 0.2, 0.05] _offset = [1,0,4.5] _name = lamp1 _light = "#lightpoint" createVehicleLocal getPos _name; _light setLightBrightness _brightness; _light setLightAmbient _ambient; _light setLightColor _color; _light lightAttachObject [_name, _offset] The _offset variable will vary depending on the lamppost used. Adjust those other to suit your needs, but I find the default lights waaaay too strong. Example, I also have an artillery firecommand that is at night lit in a weak red color; enough to read maps and to work, but weak enough to keep the nightvision going. Not sure about realism here though Now, since this is a base we're suppose to take, it would have been nice to get rid of those actions that comes with the object. I expect real players to nose around, switch the light on, and ruin the moment
  20. I would like to hear your solution. I suddenly experienced the same problems using a chopper from the empty list. They wouldn't do what I expected no matter how I synched, triggered, waypointed and whatnot. I ended up using a regular chopper with pilots already in. First waypoint was a "get out" actually to stop them from taking off. Then I synched a "get in" with my trigger. The cargo was already in using the movein (and assignas, but I don't think that is necessary). Then and only then, was I able to get my rusky heli to land on a H and unload the transport before returning home to its base. I think maybe also I had my upload transport ON the H instead of near it, not sure if this can cause any problems. Using vehicles from the Empty list, seems to cost me a lot of problems... Targeting problems, vehicle occupants not reorganizing when someone dies as is te case with some vehicles from a certain side (with personell already in). Well, still learning, and I guess I'll do that for a loooong time
  21. Hi How can I obtain the object classname for the closest object you're positioned at. What I want to achieve is a hint that says "house" if the closest object is a house. I'm trying to destroy quite a few hayballs on a field so that artillery can use it without any object hazzle. I could go with destroying by theirs object id within a forEach, but I would like to know for the sake of curiosity Any tips?
  22. CarlGustaffa

    How to obtain object classnames

    Well, I've now ried most of the "higher levelhierarchy names" (including "All" which gave lots of funky crashaction ), but nothing appears to take care of those haystacks. Similarly, I couldn't find "streetlamp" in that list, which name I use in a similar fashion. The area I'm talking about is SSE pf Mercalillo on Sahrani. In case you'd like to demolish some hay I can place a "Street-Objects/Lamp 2" from the editor (with the editor upgrade), but the name "Lamp" is nowhere to be found within the CfgVehicles list. Edit: Can't use countType as it needs typeinfo. It is this typeinfo/classname I'm trying for obtain for certain objects.
  23. CarlGustaffa

    Weapononback action...

    I'm a bit curious to why so many now obsolete actions are still listed on the wiki, under ArmA Actions Such as this mentioned "WEAPONONBACK" action. Anyone with wiki access should update this section to lessen the confusion for newbies (myself incuded in that newbie group). However, when I try to do that action (had to try ), I'm getting an errror message saying "Error 1 elements provided, 2 expected"? Ehh, what's up with this then? Same goes for several/most other actions. I tried using ["WEAPONONBACK", "M4AIM"] and oposite but nothing. I tried true, but nothing. I tried "TAKEWEAPON" from an ammocrate (waypoint on act.) and that works, so I think I got the syntax about right. I prefer the current relaxed method for typical city scenarios, but a mountainpatrol at ease would rarely carry it this way but rather have it on back. At the same time, I wouldn't like players or myself to immediately know if the enemy was being in safe or careless mode just by watching their weapon holding. The animation is already built into the engine, maybe BIS should upgrade with 2 new behaviours; SAFE BACK and CARELESS BACK, and rename the current ones to SAFE LOW and CARELESS LOW. Dunno, just an idea. It seems like this feature is highly asked for.
  24. CarlGustaffa

    How to obtain object classnames

    The typeOf command was "sortof" the command I was looking for, but unfortunately it doesn't give me the information I need to destroy mapobjects by "class" (not objectname). Looking at the provided example, I came up with something like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">hint format["0: %1\n1: %2", typeOf (getPos player nearobjects 10 select 0), typeOf (getPos player nearobjects 10 select 1)] It picks up triggers as "EmptyDetector" and myself as "SoldierWMiner" if I play an engineer, and gamelogics as "Logic". Similarly, I get the lamps name instead of "streetlamp". But positioned close to a house it still reads i.e. "Land_budova1", while I'm looking for the output "house" which is what I use to destroy this building with. For those hayballs, I'm actually getting zero output, and sometimes (even with a greater radius) I'm getting some weird division by zero error. Btw, destroying hayballs per ID simply turns them from laying to standing with animation, although the collision detection is removed. Are these different "classes" (not object names) listed somewhere? I'm awefully new at this btw.
  25. Hi Having a problem with a trigger condition. How do I get a trigger to trig on named units (or units within a specific group), but in an unnamed vehicle (people can choose whichever vehicle they want). Since AI won't use the provided vehicles (motorcycle) in the suggested fashion (waypoints disregarded no matter what combatmode), I have to provide the AI testguys with a temporary M113. But it still puzzles me. How do I trig on named units or groups in an unnamed vehicle?
×