Jump to content

Gil Galvanti

  • Content Count

  • Joined

  • Last visited

  • Medals

Everything posted by Gil Galvanti

  1. Hey, Is there any way to get the AI to immediately stop firing their weapon after using the doFire command? The only thing I've found to work is "disableAI "ANIM"", but as soon as you enable it again they continue firing. If you use doStop, they finish with the current clip they are shooting before stopping. Is there not a way to immediately stop the AI? Also on topic, is there a way to stop a civ AI from holstering their pistol? I tried setting behaviour to combat, but it didn't work.
  2. Hey, Is there any way to make the AI stop doing anything after you stop controlling them? Specifically this time I'm wanting a helicopter pilot to stop changing his altitude after I switch to gunner. But also it's annoying when I'm trying to observe something like a flashlight or laserlight, so I turn it on as the character, and then switch to another character only for them to turn it off. I tried "disableAI" and I tried "stop", but no use.
  3. Gil Galvanti

    Drone Training Broken?

    I'm still having the same problem, any fix yet? What's strange is it worked when I did the UAV, but then when it sent me back and I did the ULB, it went to a black screen, then when I restarted it did the same for both.
  4. Hey, Is there any way to return a value from a call to a .sqf file? I would just use a global variable, but the problem is when the function is called by 2 different objects in a row, and they are both modifying the same global variable at the same time, so you never know what the final value will be.
  5. Ah, that'll work, thanks.
  6. Hey, Is there any way to change the speed at which game time goes by without actually affecting anything other than the time of day? If something is supposed to happen every once a day, for example, I don't really want it to take a real day to happen again.
  7. Gil Galvanti

    Return Value From .SQF File?

    Ok, thanks for the help. Could someone explain to me the difference in all the function call commands? The documentation makes them seem like the same thing, there's call, call compile, spawn, execVM, preprocessFile, and loadFile.
  8. Gil Galvanti

    Return Value From .SQF File?

    Hmm...I'm confused on how you access it's return value though? If you do this: _test = [] execVM "script.sqf"; _test isn't the return value, it's a script variable.
  9. Gil Galvanti

    Civilians talking?

    No point creating a new thread since I have almost the same question. I know about how to use "unit globalChat", but I'm wondering what is a good animation to use for a standing civ talking while idle? The only one I see is "AidlPercSnonWnonDnon_talk1", but it switches to like they're holding a gun first and seems a bit too animated. I could use it if I have to, but is there any animation that is better?
  10. Hey, Is it possible to have a trigger activated each time the condition is satisfied, even if it has already been satisfied? For example, say the trigger is tripped by the presence of civilians. If one civilian walks into it and trips it, is there a way to set it to be activated again by any subsequent civilians walking into it, while the others that originally activated it remain in the trigger area?
  11. Gil Galvanti

    Trigger Activation Each Time?

    I changed owner to the unit name, and I was trying the first one that didn't use intruders. Any idea what _X is though? Does it need to be defined? ---------- Post added at 12:04 AM ---------- Previous post was Yesterday at 11:30 PM ---------- Ah, got it working, turns out I was already defining the trigger statements in a script which was overwriting what I was putting in the editor :). I'd still like to know what "_X" variable holds though.
  12. Gil Galvanti

    Trigger Activation Each Time?

    Ok, I'll try that out, thanks :). I'm confused though, what is _X? It's never defined...is it like thisList where it's an automatically set variable? EDIT: Hmmm...not working, maybe because I'm not understanding what _X is?
  13. Gil Galvanti

    Trigger Activation Each Time?

    No, I have it set to repeated. It only reactivates after it is deactivated. I'll have to play around with deactivating it with a trigger, but not sure that would work either. What I'm trying to do specifically is detect when someone is "trespassing" on someone else's property. It only works when the owner of the property is home though, so since the trigger is set to activate in the presence of a civilian, it automatically trips to start with since he is a civ, even though it's his own property. But in my scripts, I have ignoring the trigger if the owner is the only one in the trigger list. But then if a civ runs onto the property, it isn't detected because the trigger isn't reactivated since it's already activated by the owner himself being home.
  14. Hey, I see that findCover no longer works in ArmA 2. First, why? Why take out an important functional command? Second, how are we supposed to script units to find cover now without going through a long complex script of finding nearest objects, somehow detecting them as cover and then move the npc to use them as cover?
  15. Hey, I'm trying to figure out which unit trips a trigger in the game. I did a search and saw that "thisList" is an array created that has the list of units that meet the activation requirements. So I create a trigger and set to repeated, activated by presence of civilians, and put 2 civilians in the trigger area. When I try and print or use thisList it doesn't seem to do anything though. I've tried player globalChat "list="+str(thisList); and player globalChat "list="+str(thisList select 0); thisList also doesn't highlight like _this does in ArmA Edit. Am I using it wrong? I'm using an external script, does thisList carry over to external scripts or is does it just work in the editor? EDIT: One more thing I realized, I'm using it outside the trigger activation statement, does it not exist outside of the activation statement? Nevermind, it seems that thisList only exist within the activation, so I'll just pass it to a new array, sorry for the thread.
  16. Ah, good to know, thanks!
  17. Didn't want to make a new thread for this since it's along the same lines...is there an animation to punch? I saw there is one for boxing, but it's very long and they move quite a bit. I tried "npc1 playmove "StrokeFist";" but apparently StrokeFist isn't an action. Is there not just a simple punch action? EDIT: GAH, this is very annoying. Even using the boxing animation, it won't stop even after using: npc1 switchmove "standing"; npc1 disableAI "ANIM"; npc1 disableAI "MOVE"; How is that even possible? The npc animation is disabled? He switches to standing, but then immediately goes back to the beginning of boxing.
  18. Hi, Is there a way to make a unit move near a certain position, like once they are within a certain radius they stop moving to it? Or is the best way to do that just "if (unit distance position < x) then {doStop}"?
  19. Hey, I just got a new laptop and installed ArmA 2 on it. I had performance issues on my old laptop, but that was expected at 1.83GHz dual core with 4GB RAM. Now on my new laptop, it does run better (generally 30-40FPS), but it still seems to stutter every few seconds, especially when flying, even on low settings (another note, I get nearly the same FPS with very high as I do with very low settings). So what's the deal? Is ArmA 2 so poorly engineered that you need some sort of NASA supercomputer to run it smoothly with no stutter? Or is it somehow not utilizing the 8GB RAM and quad core i7 processor I have (running on 64-bit Windows 7)? I haven't tried patch 1.07 yet, I'm downloading it now, hopefully that will fix the problem, but we'll see. I'm a bit worried about it since when I tried the beta, the game crashed on startup giving me some error message about display drivers. EDIT: Oops, sorry, just saw the sticky thread for these kind of posts, can someone merge it for me? Or should I just repost it in there? EDIT AGAIN: Ok, disregard this, Patch 1.07 seems to have done the trick, runs at 60FPS with no stutter now, not sure what the problem was, but I'm glad they fixed it :).
  20. Gil Galvanti

    1.07 Bugs: Report them here please.

    Not sure if this has already been addressed, but I keep getting random no entry errors that say something along the lines of: "no entry @police\bin\config.cpp/cfgvehicles/land_fuelstation_army.spotableDarkNightLightsOff". It isn't always the same thing, but it always ends in ".spotableDarkNightLightsOff". I think one had to do with skoda. Is there some kind of fix for this? It's not a huge deal, but a bit annoying when it pops up in the editor when you load or hit preview. They are also all under one mod (@police, my own I'm working on), but the related models aren't even in that mod folder (I got one for a skoda, one for AH1Z, one for that fuel station, etc.). EDIT: Just got another one in game when I hit eject, saying ""no entry @police\bin\config.cpp/cfgvehicles/parachuteWest.spotableDarkNightLightsOff"
  21. Gil Galvanti

    OrderGetIn Permanent?

    Hahaha, wow I'm an idiot. For some reason I thought it worked the same as getOut, where it was executed at the time it was called. Thanks :). ---------- Post added at 08:20 PM ---------- Previous post was at 08:03 PM ---------- Ok, new question, and I've already started several threads so I feel bad starting a new one. I'm scripting a "go to store" thing for a civ. They get in their car, drive to the store, get out, go to the shopkeeper, then go back into their car. But when they get back into their car, the move command doesn't work. I've also tried moveTo and doMove. They work if I don't tell him to get back in his car. Also, setting a waypoint works, but they come up about 10 meters short of the waypoint. Any ideas why move wouldn't work in the vehicle? Or how to make the npc go closer to the waypoint? Here's the code I'm using right now: switch( (_unit getVariable "state") ) do { case "gotostore": { _dist = _unit distance getMarkerPos "store"; player sideChat "_dist="+str(_dist); if( vehicle _unit == _unit ) then { if( _dist > 15 ) then { [_unit] orderGetIn true; _unit setSpeedMode "LIMITED"; player sideChat "getin"; }else { player sideChat "gotostorekeeper="+str((_unit distance storekeeper)); _unit move position storekeeper; if( (_unit distance storekeeper) < 3 ) then { _unit setVariable ["hunger",0]; _unit setVariable ["state","gohome",true]; [_unit] orderGetIn true; _wp = (group _unit) addWaypoint [getMarkerPos "npcpark1", 0]; //if I use '_unit move getMarkerPos "npcpark1";' here it doesn't work }; }; }else { if( _dist > 10 ) then { _unit move getMarkerPos "store"; }else { doGetOut _unit; [_unit] orderGetIn false; }; }; }; case "gohome": { _dist = _unit distance getMarkerPos "npcpark1"; player sideChat "_dist="+str(_dist); if( vehicle _unit != _unit ) then { if( _dist < 5 ) then { doGetOut _unit; [_unit] orderGetIn false; //_unit moveTo getMarkerPos "npcpark1"; //player sideChat ("Moveto:"+str(getMarkerPos "npcpark1")); }; }; //_unit move getMarkerPos "npcpark1"; }; }; EDIT: Nevermind, it's working now for some reason. I think it has to do with me using the move command in a loop, but when I moved it to where it was only issued once (like in the code above) it was alright. Any suggestions to improve my code or how I'm handling things?
  22. Hey, It seems that the orderGetIn command permanently makes an npc want to get in the vehicle. If I use the doGetOut order, he gets out, but then immediately gets back in (the orderGetIn command is only being called once). I also tried unassignVehicle, which makes the npc not get in, but only until you reassign the vehicle with assignAsDriver, then he goes and gets back in again. I also tried the "allowGetIn false" command, which also prevents the npc getting back in as driver, but only until I set it back to true. Is there any way to just cancel the orderGetIn command? Why does it permanently make the npc want to get in the vehicle?
  23. Hi, I was wondering what the best method to assign a variable to a unit is. For example, if I wanted to keep track of npc's hunger. Currently I have several arrays, like: npcID = []; npcHunger = []; So npcID holds the npc object, and the corresponding slot in npcHunger would hold their hunger. But is this the best way to do it? Is there a better way than creating a new array for every variable and having it correspond with the object location in another array?
  24. Gil Galvanti

    Assigning Variables to a Unit

    Ah, exactly what I was looking for, thanks :).
  25. Hey, Is there a way to make a civ get into an empty vehicle? I tried the obvious by putting a get in waypoint on the vehicle but it doesn't seem to work. Is there something I need to synchronize to make it work?