Jump to content

johnnyboy

Member
  • Content Count

    2683
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by johnnyboy

  1. johnnyboy

    prevent AI from flanking

    You did it again Grump. enableAttack solved my problem. Units still moved forward fighting semi-aggressivley, but didn't break formation and exit the tunnel to flank. Thank you sir! You are the MAN! Thanks for the suggestion gc8. I was already trying many combinations of disableAI without getting the results I wanted.
  2. Hi guys. I've created a long tunnel/cave using big rocks and castle ruins objects. I want AI to move through cave and fight player and other AI aggressively. I have waypoints moving them through cave, and when not in combat, they move through the cave no problem. I am using formation DELTA and FILE, to funnel them through the cave. I also have a constantly running loop to set there Behaviour from COMBAT to AWARE, to keep them from getting bogged down. It works ok for some of the AI units, but not others. PROBLEM: Instead of moving through cave, some AI units choose to turn around and exit cave and find a path outside cave system to go around to other entrance of cave. How do I prevent AI from flanking and choosing this alternate path? I looked at Restriction Zones but don't think that will work. I'm hoping I can eliminate the alternate path somehow, so they will follow most direct (and dangerous) route dictated by their waypoints. My fallback will be to code a script to advance them forward using doMove to defined positions, but that is a lot more work to achieve. Any of you smart guys have an idea? Also, is there a way to make AI maintain formation under fire?
  3. johnnyboy

    Accurate moving

    Hey Grumpy, what's the code to display the bounding box lines in your screen shot?
  4. johnnyboy

    Dog walk script

    Hi Cheyenne. Regarding dog collision, that is a problem I do not know how to solve. My dogs have the exact same problem. When making missions using the dogs, I try to pick locations where there are few buildings or walls. Regarding dog running many meters away from destination try this: sleep .3 seconds instead of .1 seconds Change all your playMoves to not execute on every loop iteration (as I explained on previous post). I think dog is overshooting position because it is executing a series of stacked playmoves. Here's some code from my JBOY_dogCommand script. This script is a constantly running loop to process different commands/actions for a dog (sit, heel/follow/, move to a position, attack, etc.). In the Attack section of that code, I have the while loop below that controls how dog chases a victim to attack. Download my demo mission from JBOY Dog thread to see more details. In the code below, there is a lot of stuff you don't need (like the while conditions), but you should see the stuff you do need. You probably want the while condition to simply end when dog is near target. // Use _last_anim variable to guarantee you do not playmove the same move that is already running. // Any time you want to play a different animation, you must also set the _last_anim variable to the new animation being played if !(_last_anim == "Dog_Sprint") then {_dog playMove "Dog_Sprint"; _last_anim = "Dog_Sprint";}; // This loop makes dog chase target unit _jj = 0; while {( (alive _dog) and !isNull _targetObj and (alive _handler or isNull _handler) and ( ((_targetObj distance _dog) > 4 and alive _targetObj AND !isNull _targetObj) or ((_targetObj distance _dog) >2 and (!(alive _targetObj) or (typeOf _targetObj!="Man")) and isNull(_dog getVariable "vPack")) ) and ((_dog getVariable "vCommand") == "attack" ) )} do { _jj = _jj + 1; // ********************************************* // bark while chasing // ********************************************* if ( (_jj mod 9)==0 and (random 100) > 30 and !(({_x isKindOf "Animal"} count attachedObjects _dog) > 0) ) then // if no prey in mouth, then bark & growl { _sfx = (["barkmean2","barkmean1","barkmean3","growls3","bark2","bark1"] call BIS_fnc_arrayShuffle) select 0; dummy= [_dog, 0, _sfx,""] execVM "JBOY_Dog\delaySay.sqf"; }; // ********************************************* // Keep moving to target pos, and check for change of target // ********************************************* if (typeName (_dog getVariable "vTarget")=='STRING') then { _targetObj = objNull; } else { _targetObj = (_dog getVariable "vTarget"); if (speed _targetObj < 1) then { _moveToPos = getposatl _targetObj; } else { _moveToPos = _targetObj modelToWorld [0, 0, 1.5]; }; _dog doWatch (_targetObj modelToWorld [0, 0, 1]); //sleep .1; _surfaceNormal = surfaceNormal getposatl _dog; _dog setVectorUp _surfaceNormal; _dog moveTo _moveToPos; }; sleep .3; };
  5. Of course. And thanks for the credit. No I don't. I should make one, since I have more links than fit on my signature line. If I make one, I'll let you know.
  6. Very cool. But why the VDA prefix instead of VD????? No way we're gonna forget man...
  7. johnnyboy

    Dog walk script

    Hi Cheyenne. You can try my dog command scripts if you like: JBOY Dog. I think your simple script above will work better with a sleep time of 1 second. Sleeping .01 means you are stacking 100s of run animations so dog "runs to infinity" as you say. Also, you only want to playmove an animation once, until you want to playmove the next different animation. Only execute a playMove if you want to change the current animation being executed, like this: if !(_last_anim == "Dog_Run") then { _dog playMove "Dog_Run"; _last_anim = "Dog_Run"; }; At top of your loop set _last_anim to "", then replace your playMove line with code like I posted above, so when the condition is true, the particular animation only runs once. So in your script, replace every playMove line with my suggested If statement (but modify the Animation names for each condition...run/walk/sprint/sit).
  8. johnnyboy

    [MP] Gun Game (Vanilla/Modded)

    Maybe I live under a rock and am ignorant. What is Gun Game? I have no idea what this scenario or what gameplay type it is. Why should I play it? Please provide a short description of it to interest us Gun Game noobs. I clicked on links in original post and still have no idea.
  9. Very helpful. Thanks for posting this!
  10. johnnyboy

    GF Blood Stains and SFX LITE Script

    Thanks for pointing that out George!
  11. johnnyboy

    Animate PAA

    Hey Connor, that is really slick man. Great idea. I hope @Grumpy Old Man doesn't watch your example vid in top post and see the dancing banana marker... He'll definitely abuse that feature.
  12. I agree with Grumpy (but hate to admit that!!!). Removing whitespace will also have the NEGATIVE effect of making the code less readable and maintainable. I say bring on whitespace, indentation, and comments!
  13. johnnyboy

    [sp camp] Gambit Royale

    This gonna be good! Song suggestion: Awesome song...lame video..lol
  14. Haha. I know how that goes! This is great and impressive stuff. Thanks Rydgier and Gunter.
  15. johnnyboy

    JBOY_SpearGun

    Hi guys, I was gone for a 10 day unplugged vacation, so just reading posts now... The script in current form would not work with shark mods. Its doable, but would take some work. Thanks George.
  16. johnnyboy

    JBOY_SpearGun

    That is probably a good idea for the fish spears. For AI its all bets off once the guy goes ragdoll. The spear can appear one meter away.
  17. johnnyboy

    JBOY_SpearGun

    Thanks GidaBoy! Yes, I have a Fish School script that is almost ready. But I am leaving on vacation for 2 weeks, so I won't publish it until after that (probably 3 or 4 weeks). With this script, a school of fish will travel from point A to point B. Or a school can continuously circle around a fixed position (radius of circle set by a parameter, and type of fish set by parameter).
  18. johnnyboy

    Wiki's creations [ArmA 3]

    Its good to see you back at it Wiki. You can't keep a good man down! I hope to try this mission out later tonight. Thank you! EDIT: Just finished the mission and loved it. Thanks much WIKI. Reminded me of classic OFP/ARMA missions, and reminded me why I love ARMA. Graet job.
  19. Hey guys, I think you're a bit off topic and hijacking this thread...maybe you should start PMing on this stuff (and keep this about VD's scripts). :)
  20. Sorry mate. I'm strictly a scripter. I think Gibs requires object modeling skills of which I have none. Good luck in your quest.
  21. Guys, I have a serious problem. I can't make any progress on Episode 3 of Last Tango in Tanoa, until I get past this big obstacle. What's a good name for this Goat Keeper character? He is the protector and keeper of one the last remaining "Leopard Goats" (an endangered species). I've got writer's block, so I am crowd sourcing this problem here. So far these are the only names I can think of: Zagoat GrumpyOldGoat LazyLarrow FroggyLuvsMeSomeGoats PierreDeChèvre GeorgeGídaBoy AZGoader GoatyMcGoatFace Phronkadelic Christine Lagarde Any others? Which name best fits this character's personality? Pick one of the above or suggest another. Legal Disclaimer: If the names above resemble any person or poster, living or dead, that is purely coincidental.
  22. I promise not to create a mission where there is an action titled "Ride Goat".
  23. johnnyboy

    GF Visors Script - Mod

    Hey GeorgeGídaBoy, I really like this one. I am definitely going to use the diving mask one. Great job.
  24. johnnyboy

    Help with dialog

    Its all the beef hula hoops that make @Larrow beautiful. And his sweet code of course.
×