Jump to content

Nafrey

Member
  • Content Count

    4
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About Nafrey

  • Rank
    Rookie
  1. Hey guys, I appreciate the responses! I did end up going the Event Handler route, using the "Hit" EH off the Biki, (was easier than I thought, in all honesty, and its better for mission performance anyway). I made a separate EH for every cacheCrate (if there's a better way for doing this, I'm all ears) and put all that code in my initServer.sqf. @zagor64bz Yeah I had the weapons cacheCrates1 to 4 pre-placed in the editor. I even had a crate stacked on top of another at some point for aesthetic. But I never thought that they'd be taking damage at round start, but I suppose it ties into what @JohnKalo said: It is still pretty strange to me why they'd only prematurely blow up after some distance was made between the player and the cacheCrates though. I'm going to be testing it out some more and experimenting with it. Thanks for the help guys!
  2. Hi all! I'm currently working on a mission that involves assaulting a compound that contains a weapons cache and some intel. I have most of the mission down pat, but ran into a weird problem with a trick I planned to use with the weapons cache. Basically, if any of the cacheCrate1 to 4 were damaged by a semi-sustained spray in the firefight, I would spawn a bomb with an area trigger, and automatically kill everyone inside the trigger area. Trigger type is set to None and Activation is set to None The trigger's condition is: (damage cacheCrate1 > 0.05) || (damage cacheCrate2 > 0.05) || (damage cacheCrate3 > 0.05) || (damage cacheCrate4 > 0.15) The problem is that for some reason, since the initial players' spawns are at a distance of 2km+ from the cache, the cache seems to be exploding prematurely without having taken any damage in any firefight, and it happens a minute or so after game start. Trying to understand it, I spawned a "setCaptive true" BLUFOR player unit and a vehicle around the cache location, hung around, fast-forwarded time for about 5 minutes, but no explosion happened. It was after I boarded the vehicle and drove away, getting some distance between me and the objects that the cache exploded on its own again. To make sure, I made sure to drive in both directions to determine that it was distance affecting the explosion/condition. Does it have something to do with object distance? Do objects take damage when out of view distance? What trigger behavior can explain why it's prematurely exploding? Thanks P.S I don't really know how to use eventHandlers yet, but I'm considering either "Dammage" or "HandleDamage" for this problem. With that said though, it would put my mind at ease if I can get some clarification on why this trigger is behaving this way
  3. Nafrey

    AI Artillery Script

    That was exactly it. Thank you, my guy. I'd spent the better part of yesterday going through the Biki and I never noticed the significance of the quotation marks, oh man. Thanks!
  4. Hi all, I've been stuck on this AI artillery problem for half a day now. I have 2 enemy mortars I wish to activate via trigger and script (separately, by that I mean they aren't grouped together and I have 2 triggers calling the script once for each mortar). Testing the trigger and script in game, I was originally getting an error for undefined variables (both _mortar and _target), but now I'm getting an error for "undefined variable in expression _target". In each trigger, I have: script = [mortarNumber, getMarkerPos markerNumber] execVM "eFireMission.sqf"; which, after some tuning, I turned into: markerTarget1 = getMarkerPos marker1; null = [mortar1, markerTarget1] execVM "eFireMission.sqf"; (does this difference do anything? I originally assumed that using "getMarkerPos" in the passed variable would work since "getMarkerPos" returns an array, doesn't it? And for my script, I incorporated a script I saw on the forums through a google search for artillery scripts from 7 years ago (user 2nd Ranger's post in that thread) for an MP mission I'm making for my friends and I: _mortar = _this select 0; //--- name of the mortar, arg passed from trigger _target = _this select 1; //--- central point around which mortar hits, arg passed from trigger if (isServer) then{ for "_i" from 0 to 8 do { _radius = 50; //--- random radius from the center _pos = [ (_target select 0) - _radius + (2 * random _radius), (_target select 1) - _radius + (2 * random _radius), 0 ]; _mortar doArtilleryFire[ _pos, getArtilleryAmmo[_mortar] select 0, 1 ]; sleep 2; //--- delay between rounds }; }; What am I doing wrong? Any help is appreciated, this is my first time scripting for Arma 3, I'm a little lost
×