Jump to content

tryteyker

Member
  • Content Count

    1164
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by tryteyker

  1. Will the action be accessible when people are in the driver / gunner / cargo seat?
  2. tryteyker

    random items in ammobox

    switch-statement would be preffered (as said by panther & Das Attorney) Don't use BIS_Fnc_selectRandom here if you want reliable results (it has a tendency to ignore the first and last selection of an array) Check your syntax (as said previously). Where is _rNumber defined? That isn't a hard-coded variable as far as I know so you have to define it yourself. It's also kind of pointless to select a weapon and then make the whole thing dependent on numbers. I don't quite get you here. A much simpler script would be something like this: _ammobox = _this select 0; _randomprimary = ["M16A2GL","M16A4_GL","M4A1","M4A1_AIM_SD_CAMO"]; _randommags = (floor(random 11)); //It's important to note that floor random ALWAYS rounds down. 11 will NEVER be the case. _randselect = (floor(random 4)); clearWeaponCargo _ammobox; clearMagazineCargo _ammobox; switch (_randselect) do { // Switch-statement which uses the variable _randselect to select a case. Each case adds a different weapon to the ammobox. case 0: { _weapon = _randomprimary select 0; // select 0 simply selects the first entry ("M16A2GL") from _randomprimary's array. _ammobox addMagazineCargo ["30Rnd_556x45_Stanag",_randommags]; // this adds a random amount of magazine (up to 10) of the appropriate type to the cargo space. }; case 1: { _weapon = _randomprimary select 1; _ammobox addMagazineCargo ["30Rnd_556x45_Stanag",_randommags]; }; case 2: { _weapon = _randomprimary select 2; _ammobox addMagazineCargo [30Rnd_556x45_Stanag"",_randommags]; }; case 3: { _weapon = _randomprimary select 3; _ammobox addMagazineCargo ["30Rnd_556x45_Stanag",_randommags]; }; Note you'll have to pass the script the name of the ammobox you placed on the map. Untested the above but should work.
  3. Isn't "Surrender" already mapped in the default ArmA2? I'm pretty sure it is and it does just that - put the hands behind the players head. Just a thought.
  4. When we're already at the createVehicle array stuff, is it really faster than the regular createVehicle performance-wise?
  5. The () are unnecessary for createVehicle. Second, do you get any error? Also I'd try using _p_1_1 assignAsDriver _h1; before the moveInDriver command.
  6. tryteyker

    [CAMP] Lions of Kandahar

    I will retry without the AI Mods and report back with the results. I don't see JSRS causing issues unless you implemented custom explosion / gun sounds somewhere, but I can understand why you didn't include it in development. I was kind of foolish enough to start a mission with loads of addons loaded and now JSRS is a requirement even though that was not intended at all. :( //Edit Tested only with addons required by mission. No luck. The A10 gun run never shows up, I waited 5 real minutes with SOFLAM ready and laser on targets. Nothing. :( I replayed the mission from the absolute beginning.
  7. The waitUntil is the distance check. Everything gets created as soon as they're within 5 m of the IED marker. (@radeck)
  8. tryteyker

    [CAMP] Lions of Kandahar

    Here's what I use: All required addons (ALTHOUGH I do get an error. Explain below) JSRS TPWC AI LOS & TPWCAS STHUD STMovement (COSLX) (has been tested with and without, no difference) Getting an error upon startup of game with all the above mentioned addons loaded: "Cannot load texture: ons_core\inv\cc_130h.paa" (For clarification: I have @ons_oa) I didn't think this would be relevant at all so I left it. Any ideas if this affects the mission? Also, how do you handle the spawn of the Aircraft? Do they get spawned away from the player at a set distance or do they take off from the NW Airport on the map? This would help estimate flight time a bit since if it's the latter it is quite obvious that it takes a longer time.
  9. I think your second method is much more viable since the units automatically Eject and thus only use one type of parachute. Thanks.
  10. I can confirm Ajax's part about the regular "Extend Cargo Rope" bug. Doesn't work with a spawned MH-47E but does indeed work with an empty MH-47E.
  11. Use UPSMON for that. All you need to do is place a rectangular marker and add something to the init field of each squad leader and they'll patrol within the marker radius. That's what I guess you want to do.
  12. tryteyker

    [CAMP] Lions of Kandahar

    So, after fixing my lag issues for the most part I managed to play through to M6. Horrendous AI and saving was in my way a couple of times but I managed, only took me the whole night. I'm running into issues during M6 with the Special Forces part. After spending an hour or so clearing out the camp and the ZU I had to go back and forth to plant the Satchels etc, and when I finally reached the OP and called the CAS on the village nothing happened. :( I tried in various ways. Have my Laser Marker on Target for 5 mins straight, use sniper rifle for targeting, call Radio Trigger without targeting at all. Nothing helped. I think you missed a 0 here, as it clearly says "1 Minute 30 seconds", but I feel that you kind of meant 10 minutes 30 second. What I liked about the mission though that if you die you an just switch back to Rusty and do nothing (except hear the radio clutter from the Canadians dying 1 by 1 to the ZU or the camp haha), not sure if this was intended or not.
  13. tryteyker

    scripting in baby steps

    It's pretty good practice to end every statement with ;, same for scopes. This prevents errors when you edit the script a few hours / days / months later and forgot to put a semicolon there. What I also like to do is end a scope before I add content so I don't forget that. @meanmachine1 http://community.bistudio.com/wiki/Category:Scripting_Commands Includes OFP & Arma. //Edit Aaand ninja'd by Iceman haha
  14. I don't know anything about how UIDs are assigned so I can't help you directly. Did you adjust the UIDs to the specific player IDs?
  15. Not everybody has a UID of 12345678. Atleast not to my knowledge. I'm no expert in that stuff though.
  16. "--" is not a comment. // /* */ comment Are all valid comment lines. There are no permanent functions really, you can create Functions but you have to call them manually. The closest you can get to a constantly looping function is a function with a while loop. I'm not familiar with LUA at all so I'll pass you this link: http://seit.unsw.adfa.edu.au/coursework/ZEIT2305/Resources/SQF_Tutorial/basic_sqf.HTML Read through it, gives you the basics of the language, all other stuff is ingame commands (mostly). 2) What do you exactly mean by loop through arrays? If you have for example 3 values within an array & want to choose one of them you use (floor(random integer)). (Integer = numerical value without decimal, I suppose you know that) There is a function for this made by BIS (BIS_fnc_selectRandom) but I do not suggest using it. It doesn't randomly choose a value. Just a note: If you have an array like this: _array = [0,1,2]; This starts at a 0-based index. 0 would equal "_this select 0". 1 equals "_this select 1", and 2 equals "_this select 2". 3) nearestObjects. 4) ^
  17. Guys, I'm running into quite a problem here with setvelocity. What I'm trying to do is get an object ejected from inside a helicopter. Works well, I've set everything up, but I need checks performed when the addaction gets executed. So far I have these checks: if ((speed chinook) <= 50 && (getDir chinook) <= 90) then { ATV setvelocity [0,-20,0]; hint "less than 90 & low speed"; }; if ((speed chinook) <= 50 && (getdir chinook) > 90) then { ATV setvelocity [-20,0,0]; hint "greater than 90 & low speed"; }; if ((speed chinook) > 50 && (getDir chinook) <= 90) then { ATV setvelocity [0,-20,0]; hint "speedier than 50 but less than 90"; }; if ((speed chinook) > 50 && (getDir chinook) > 90) then { ATV setvelocity [-20,0,0]; hint "speedier than 50 and greater than 90"; }; Don't mind my English here, just something I set up. Now this obviously works reasonably well, but if the chopper is moving diagonally it's not gonna work well. An idea that just crossed my mind would be having a dozen of checks to see if the helo's moving diagonally and then use setvelocity adapted to diagonal movement but I don't think having alot more checks seems useful here.
  18. I'm actually using attachTo since it is supposed to simulate transportation of an ATV inside a Chinook (only issue there is that it's invisible when sitting inside the Chinook). So, I don't think your method is going to work, Mattar. It is also facing backwards automatically. I will definitely try the last line of your script though.
  19. disableAI. This will probably help you out. I don't see why you would shut off the AI though since if you have an invisible pilot that can perfectly well follow the Operator around (well, the AI has it's limits but yeah) with doFollow it seems quite unnecessary to shut off the AI and manually configure everything, or am I misunderstanding this?
  20. tryteyker

    scripting in baby steps

    http://forums.bistudio.com/showthread.php?78089-Mission-Editing-and-Scripting-Information-Links-only-NO-Discussion http://forums.bistudio.com/showthread.php?100559-Beginners-guide-Arrays http://www.armaholic.com/forums.php?m=posts&q=6751 Useful links, you should read through these. And my favorite link of all times: http://seit.unsw.adfa.edu.au/coursework/ZEIT2305/Resources/SQF_Tutorial/basic_sqf.HTML This gives you a great start with all the syntax explained. If you know this, all you need to learn is ingame commands.
  21. Well, I tried to get the AI to take off with a simple this engineon true and this flyinheight 400. Doesn't work. What I also noticed is that the Altitude does not display correctly when the MH-47's speed is 0 or if it points straightforward (heading of 000).
  22. tryteyker

    scripting in baby steps

    Learning process ruined :( Just a note about while do. If you are not giving it a condition to terminate after some time it will continue on and on and if you have other parts of scripts under the while loop this will not get executed.
  23. tryteyker

    scripting in baby steps

    while loop. Go figure out how it's done, f you have questions, ask away. Try to figure it out yourself first though.
  24. I could certainly try making a video, but it'll be really crappy because I'd have to use Windows Movie Maker (unless you have a good, free, video editing software you could recommend). I'll see what I can do. It's not really final yet though because I still have some velocity issues & the vehicle won't show up inside the vehicle. Also I noticed that the AI can't even fly the MH-47E for some reason. Is this intended? They simply don't take off.
×