Jump to content

CptBBQ

Member
  • Content Count

    93
  • Joined

  • Last visited

  • Medals

Everything posted by CptBBQ

  1. Hi guys, I´ve been trying to figure this out for a while now but couldn´t find any info on the issue. I there a way to create and configure the "OFPOR site" module during a mission and via script? What I want to achieve is having a random amount of sites on random positions with random strength and so on. Also, the units shouldn´t be there at the mission start. I don´t think this can be done via editor but I don´t know if it´s even possible to do it by script. All I´ve found so far is the class name "site_opfor" and that "createUnit" should be able to create any class defined in cfgVehicles. But how do I setup all the parameters? Thanks in advance. Cheers CptBBQ
  2. I think I forgot to mention something important. The module provides an option called 'observation post' (or similar) which causes the units to take positions in military buildings. That´s the part I´m interested in. I totally forgot there are quite a few other options to that module... So basically I´m looking for a flexible and performance friendly way to garrison opfor units in buildings. I guess there are mods that can do this but I was hoping to accomplish it with vanilla content only.
  3. Early bump, because I´m really stuck on this issue...
  4. Thanks again. Is there some kind of "howTo:cba"-thread I haven´t found yet? I don´t want to stray even more off-topic.
  5. Thanks, Sickboy. This was more about the general use of XEH´s than about triggers. Now I know I can´t use the same eventhandler for global events and where-local events, because the parameters will differ.
  6. Well, the description for both events says "First param must be the object to check". So I suppose the example given by Riouken wouldn´t work with whereLocalEvent because the first parameter is a position...?
  7. Thanks, Riouken! I´m starting to get the hang of it. Also, at first I thought 'parameter one' would be the name of the EH - after all it´s a parameter, too :o ------------------------------------------------------ EDIT: Wait... that made me think. What if the EH contains more complex code, accessing several parameters via "_this select x". Now, depending on the kind of event that is raised the number of parameters might vary. So my question would be, what will "_this select 0" return, if the event is raised with CBA_fnc_remoteLocalEvent?
  8. Could someone please explain this for dummies? :o I´ve recently started experimenting with XEH´s and I´m still wondering how to put them to best use... thanks
  9. CptBBQ

    Grenades - Gameplay

    I can´t believe this hasn´t been mentioned yet: Someone gets killed with a live grenade in his hand? That thing better goes off! I weep for grenades that die with their owner :( Also: Thumbs up for 'cooking' grenades.
  10. Hi all! I´m currently planing a simple ambient civilian script and I´d like to get some additional input before I get started. First up, I know there´s already a module built in for this purpose but that doesn't work for me perfectly in some aspects. Also, this is meant as a little scripting practice for myself. Anyway, I´m aiming for a straightforward approach without sacrificing too much resources to the feature. Also, I don´t want it to eat up my 144 groups limit, so I cannot use waypoints. The problem I see is, how would I keep track of each single unit, to issue them a new move order, as soon as the previous order is completed. Or in other words, what would be the most efficient way to check the distance to an individual target position for about 100 units? I came up with two simple concepts, but I´ve got no idea which one would be more efficient - or whether any of them is actually any good... Trigger method - create 1 trigger per unit - order unit to move towards trigger - unit reaches trigger - script is fired that places the trigger on a new random position - goto step 2 'Loop' method - store all civ units in unitArray - store individual target positions with setVariable "inside" each civ unit - iterate through unitArray, checking distance to target for each unit - if distance is smaller than x a new target position is chosen - goto step 2 Which method would you go with? Do you have an idea for a different approach? Any input is appreciated. Cheers, CptBBQ
  11. Wow, I really feel enlightened now =) Thanks for all the infos. I actually feared 50 parallel scripts could be problematic, even if most of them were 'sleeping' at any time. I think now I´ve got a good idea of what my script will have to look like. Thanks again to all of you. Cheers, Bbq
  12. So, you´d say having something like 40 triggers active for this purpose wouldn´t be too bad for the performance? I´m actually hoping triggers are the way to go, but I don´t know how badly their resource demand adds up when used in those numbers.
  13. Well, maybe I´m doing it wrong, but mostly I have problems with vehicles. Parked vehicles spawn on the weirdest positions, ignoring editor placed objects. And it seems to be impossible to get a decent moving traffic using alice. Also, I heard there are some MP issues which I´d like to avoid. I was hoping to be able to use my script for pedestrians as well as civs in vehicles and in houses, mostly on a dedicated server.
  14. Well, I´ll definitely wait and see what the ACE guys decide to do with the game.
  15. I don´t want to sound demanding but is this the whole changelog? 92MB have to amount to some more changes, don´t they? ;)
  16. Thanks for all the insights, guys. Too bad there´s a limit on light sources. I´d also like to know where that limit might be.
  17. Hi all! I recently played some night missions in Zargabad and I noticed there were only a hand full of working street lamps in the city. I was wondering if there was a way to switchLight "ON" all the other lamps but I didn´t get very far. By now I´m starting to doubt that there is an easy way to do this, but maybe someone here has an idea. Or perhaps there´s some kind of addon for this purpose? Anyway, thanks in advance. Cheers, CptBBQ
  18. Thanks Demonized. Unfortunately, these class names also affect only some of the lamps. E.g. the lamps along the main road going east to west just south from the mosque (see screen-shot below) cannot be addressed that way. At night some of them are lit and some aren´t. Maybe they are already damaged at game start, but I can´t even figure out their class name to test it. I tried "typeOf cursorTarget", "typeOf nearestObject" and such but I got no results. Any help is appreciated. screen-shot:
  19. Thanks, that looked promising but it didn´t work :( I´d guess the street lamps in Zargabad have different class names than the ones on Chernarus.. Any suggestions?
  20. thx, zapat. I´ll look into this some time soon.
  21. I simply determined the correct distance for dropping the bomb by trial and error and it does work most of the time. So, if air friction is constant it shouldn´t be the cause of the problem - or am I missing something here? Also: in older versions of the script, which were less optimized for performance, I noticed the bombing would miss every time when no player was near to observe it - very strange... Sorry for threadjacking, everyone. I´m just baffled that this doesn´t seem to be a problem in similar scripts by other people.
  22. Hmm.. I once made a similar script using waypoints instead of 'doMove'. While it had its problems, the plane (AFAIK & IIRC) always flew in a straight line towards its target. Maybe it´s worth a try. The one thing I couldn´t get to work was having the bombs reliably spawn and drop at the exact right moment. No matter how and how often I check the distance to target - on one of 5 or 6 runs the bombs were dropped way too late (never too early) hitting the ground up 150m behind target. On the next try with the same route to the same target the bomb hits exactly where it should. I can only guess this is caused when the host computer is too busy in the moment the bomb should be released. Is there any chance one of you has already encountered and solved a similar problem?
  23. and that made me lol ^^ well, my code should only give you a smaw-round when the fired weapon is a smaw, and only up to two times. Celery´s solution should rearm you if the fired round is a a "MAAWS_HEAT", without a limitation. Both should work from within the units init-line. But as I´m unable to test my code atm I can only hope to nudge you in the right direction.
  24. what I would try: this setVariable ["smawAmmo", 2] this addeventhandler ["fired", { [indent]_ammo = (_this select 0) getVariable ["smawAmmo", 0]; _weapon = _this select 1; if ((_ammo > 0) AND (_weapon == "SMAW")) then { [indent]_ammo = _ammo - 1; (_this select 0) setVariable ["smawAmmo", _ammo]; (_this select 0) addMagazine "MAAWS_HEAT"}];[/indent] };[/indent] }; completely untested though... ----------- edit: after re-reading your post, I understood what you really wanted to achieve ^^ But it should work now...
×