Jump to content

lawman_actual

Member
  • Content Count

    258
  • Joined

  • Last visited

  • Medals

Everything posted by lawman_actual

  1. I've been messing around with this for a day or two and I'm still having some difficulty. I've got the four units I want to spawn in, but I can't seem to get them to move where I want. Here's the script I'm working with; _newgroup = createGroup west; _leadunit = "B_Soldier_GL_F" createUnit [getMarkerPos "respawn1",_newgroup,"",0.5,"CORPORAL"]; sleep 1; "B_soldier_AR_F" createUnit [getMarkerPos "respawn1",_newgroup]; sleep 1; "B_medic_F" createUnit [getMarkerPos "respawn1",_newgroup]; sleep 1; "B_Soldier_F" createUnit [getMarkerPos "respawn1",_newgroup]; player groupChat "checkpoint 1 passed"; _wpPos = getMarkerPos "point1"; _thisobjective = _newgroup addWaypoint [_wpPos]; _leadunit setCurrentWaypoint _thisobjective; player groupChat "checkpoint 2 passed"; The checkpoints are all passing so I know the script is finishing. Note that I also ran a groupChat to call out _wpPos after it was set; the coordinates came back correct, so I know that it is correctly selecting 'point1' as the waypoint destination Everything else works Ok, but the units just stand there and don't move anywhere. ---------- Post added at 10:32 ---------- Previous post was at 10:29 ---------- Disregard my last. Discovered a second later that adding the radius makes it work. :rolleyes: ---------- Post added at 11:54 ---------- Previous post was at 10:32 ---------- Slight problem adding something to the init of a created unit. I can get the unit to spawn just fine using a code like this; _leadunit = "B_Soldier_GL_F" createUnit [getMarkerPos "respawn1",_newgroup,"",0.5,"CORPORAL"]; But I need to make it so that newly spawned units trigger a script on their death. So I tried the following; _leadunit = "B_Soldier_GL_F" createUnit [getMarkerPos "respawn1",_newgroup, _leadunit addEventHandler ["killed", {null = [] execVM "respawni.sqf";}],0.5,"CORPORAL"]; No Dice. The script carries on, but the unit I want doesn't spawn in. Seems weird since the code I've added is almost exactly the same as what I've placed in the init of starting units; this addEventHandler ["killed", {null = [] execVM "respawni.sqf";}]; The above works just fine.
  2. I'm trying to work on a basic system whereby a deceased unit is added to a count of units "on standby". When there is (for example) 4 units on standby, the 4 dead units are replaced by a new fireteam, who are then assigned an objective from scratch and wander off to do their thing. So my query is about how I go about referring to these newly spawned units after they have spawned? Example Let's say I've spawned just 1 new unit. I want that unit in a group, and I want to move that group somewhere. ???? join groupleadersname How?
  3. Ok, so you're saying you add the new unit to a group through the createUnit command and then you have to control it through it's group? I attempted to work with this yesterday but I couldn't get the group to create. I read on the BI page on createGroup that; " An HQ (center) for that side must already be in the Mission.sqm or have been initialized with createCenter" This might explain why I couldn't seem to get the new unit to join a group. I had a radio trigger that was supposed to display units within a group in sidechat so I could check if the unit was being added properly, but it would only return "any". From what I could gather the group wasn't being created. How do I create a "HQ centre" in the Mission.sqm? Thanks
  4. Fairly newbie question but bear with me - I'm only just starting to get the hang of this scripting business. I want to be able to check throughout a mission I'm making that a variable is being altered correctly, so I made a radio trigger to display to me the value of the trigger. Only problem is I can't figure out how to get the variable to be "called" as part of the text... In my init.sqf file I define a global variable - the number of units available on standby: standbyUnits = 0; Now I call a radio trigger so that my unit (dag1a1) can check this value at any time... dag1a1 groupChat standbyUnits; I figured that by placing the variable name where the text is usually typed, the engine would type the value of the variable as the chat. Apparently not... How can I achieve this? I've checked the radio trigger with some text and it works fine. Many thanks.
  5. lawman_actual

    Display variable in chat

    Understood. Thanks again both of you
  6. lawman_actual

    Display variable in chat

    Thanks very much, worked a charm! Not that I understand why... Can you explain what the format ["1%" is doing?
  7. Greetings all. Here's what I'm trying to achieve: *Mission Starts* 1) Each soldier moves to its own individual point on the map 2) Each soldier waits until all soldiers have reached their destination 3) When all soldiers are in position, units wait for a short time 4) After time has elapsed, units open fire on a given target Problem is I don't understand the right way to do this. Should this all be done in a new file (.sqf or some such?) or would some of this take place in game (in script boxes of triggers/units etc.) Real basic request but I'm very much struggling to understand how to put together this mission, and no matter how many help articles I read I can't seem to answer it. Thanks, Lawman
  8. Hey Guys, few quick questions. 1) Is there a way to quickly transfer a saved loadout (through the armoury) to a member of my personal squad (an AI unit) I have a set of kits I like to equip my units with but it takes ages to do every time I get a new unit. I see the"transfer" option, but nothing happens when I try this. Not sure if this is related or not. 2) How does the respawn work? I've seen the phrase "respawn" mentioned a few times but no idea how to make it happen. (Note that I'm playing single-player) 3) What causes my save game to disappear? Sometimes when I load up ARMA again there is no option to "resume" the scenario and I have to start again Side notes: I absolutely love the concept and how it works. I've got so much extra play time from this game as a result so a MASSIVE thank you to anyone involved. I really enjoyed brief moments of urban combat I've encountered, but sadly these seem to be pretty rare (bases aren't placed inside cities for obvious reasons). Maybe you could think of a way of optionally including some towns/cities as objectives? Many Thanks, Lawman Actual
  9. lawman_actual

    Waypoint Eventhandler

    Hey Firstly, apologies for posting in a slightly unrelated discussion. I've only just joined the forum and don't seem to be able to start threads! Couldn't find any explanation for this yet... In any case, I'm pretty new to editing in ARMA, and I'm having a little trouble figuring out how to use waypoints how I want to... What I want to happen: - Mission starts, friendlies are stood around for a short period of time "at ease". - After a set time period, each individual soldier moves separately to their own unique location, with orders to hold fire. - When all units are in position, they wait say 3 seconds before opening fire (all at roughly the same time) - Soldiers move (independently again) to their next location and repeat. Sadly, I can't get units to pause before going to their waypoint. The mission starts and they just move straight from one point to the next. I've tried using the timer box in the waypoints and no number seems to have any effect. I've also tried placing something in the condition box (alphamove == true) or something to that effect, but no joy. Also if you can provide any advice on how to get units to be "at ease" but not moving from their starting point that would be useful. And finally any advice on how I'd go about making sure all units are in position before they open fire would be great. Best, Lawman
×