Jump to content

johnnyboy

Member
  • Content Count

    2683
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by johnnyboy

  1. johnnyboy

    AI Pathfinding in Custom Compound

    {_dude enableCollisionWith false;} forEach myArrayOf Objects; Put your corridor objects in an array called myArrayOfObjects, and the unit can then collide with them via the above command.
  2. You deserve a medal for the tedious grunt work dude. Thanks much.
  3. johnnyboy

    AI Pathfinding in Custom Compound

    Experiment with putting waypoints at either end of the narrow corridor, and do the following on the unit that you want to pass through: _dude disableAI "FSM"; _dude disableAI "AUTOCOMBAT"; In my Property of Mabunga mission, I wanted AI to move directly to next position without considering terrain, roads, etc., and the above worked. However, they weren't threading the needle like in your case, but it might work. If that doesn't work, add this: _dude disableai "PATH"; For my JBOY Dog, I disabled PATH sometimes so dog moves directly from one position to another and ignores objects in his path (and clips). The dog is an "Agent" though, so I don't know if the AI will perform the same way as the Dog Agent. If one of the above works, then you may have to script funneling multiple units through the corridfor somehow (stack up at entrance using FILE formation, sending them through the corridor one at a time using MoveTo commands maybe). Maybe just waypoints would work if you are lucky, but don't start a group through the corridor until the entire group is stacked behind leader facing toward the corridor in FILE formation (script a way to know when all in line behind leader). Its work to get it done. Another possibility is set one of those narrow wooden walking bridges just below the surface. The bridges have building positions that AI can move from/to. You make your waypoints to a bridge position outside corridor, then order him to next position on bridge that is inside the compound, and he will walk the wooden bridge without deviating. If bridge is just below surface it would look good. You might be able to use a dock object for this also. Worst case, you can move unit(s) to entry point, set their direction toward corridor, and play an animation loop on them to get them through. Its doable, but work. Sad that we have go to these lengths... Good luck.
  4. As the man said: "Only about 8 or so buildings left and all residential buildings will be done for Altis, Malden, and Stratis...maybe this weekend" "Tanoa / CUP compatibility will not be included by then." @phronk: You might want to list the maps supported in your original post.
  5. Goddamn Phronk, that's brilliant. Now we know your true calling: Interior Decorator. There's room for all people in the ArmaVerse. Questions: Is this a mod? Does it support color schemes? I want only pastels in my furniture selection. Is your algorithm considering the Feng Shui of furniture placement? All kidding aside, this is really cool and will be used in a mission I'm working on. Thanks for caring about ambience. Its important for immersion! One Suggestion: It would be cool if there is a way to blacklist a building using a marker or something. A mission editor may need to custom decorate a particular building tailored to the scenario's story line.
  6. I was just following your example screenshot. To do all vehicles do something like this (exact syntax untested): {vehicle _x allowdamage false} foreach thisList; thisList should be list of all units in the trigger area. Note that the screenshot you posted has a condition of "player in thislist". You may want to change that to "true" instead, so any units in the trigger area execute the code. Edit: @Muzzleflash is correct. My suggestion here would not cover unoccupied vehicles. For that you need to script a nearObjects check and more if they must be within the area of the trigger.
  7. Add this to OnActivation: vehicle player allowDamage false; Add this to OnDeactivation: vehicle player allowDamage true;
  8. johnnyboy

    Animation issues

    Glad to help man. I got a chuckle out of "rubber ducking" as I had to google it to understand it. :)
  9. johnnyboy

    Animation issues

    I don't know how BIS does it, and I see your point. Why do the extra work, when there should be a way to flow the animations.... However, I just created a test mission with a player and guy named "dude" in front of him. Via the console I executed the two statements below, and it performed as desired (both anims ran sequentially and looked smooth). Try it out. dude switchMove "Acts_welcomeOnHUB02_AIWalk"; dude addEventHandler ["AnimDone",{hint "2nd move playing"; dude switchMove "Acts_welcomeOnHUB02_AIWalk_2"}];
  10. johnnyboy

    Animation issues

    Hey Lexx. If you have a series of animations you want to play one after the other, the animDone eventhandler may help. You switchmove the first animation, and create an animDone EH on the unit that switchmoves the next animation when first one done. Not sure if it will be smooth or not, but its worth a try. Good luck dude.
  11. johnnyboy

    Help!

    Do this to recover the workshop version: 1. Subscribe to the workshop mission. This puts a .pbo file on your hard drive. 2. Download a PBO extractor tool like this one: http://www.armaholic.com/page.php?id=16369 3. UnPBO the PBO file using the tool. This will unpack the directories and files into a directory structure. 4. Move the unpacked directory into your Missions folder where missions you are editing are. You will then have your mission back available to the Mission Editor. Note: Please name your Topic something descriptive other than "Help!". This helps others who have a similar problem find your problem and the solution.
  12. I just looked it up. If you want to set a greater detection distance then edit the JBOY_dog_create.sqf script and modify this line: _dog setVariable ["vEnemyDetectDistance", 75, true]; // Distance at which dog can detect an ememy And if you are interested in taking on the challenge of wind direction affecting detection, this would be the script to modify: JBOY_DogEnemyDetectionLoop.sqf I definitely plan to add that some day. One good use case would be stealth missions where player is trying to infiltrate a camp that is patrolled by AI guards with dogs. Wind direction would then influence player's decision on direction to approach from.
  13. in the current release, dog senses enemies at 75M, and will stop, growl, and look in the enemies direction. You can see an example of that in the v.1.2 Tracking and Swimming video in first post. It works great when moving through jungle...the dog warns you before you make contact. It currently is not wind dependent, but I plan to add that someday.
  14. Hi Barbara, welcome to the forums. If you change your script to create multiple dogs (for example named plyr_dog1, plyr_dog2, plyr_dog3) and assign those dogs to an array: DogArray = [plyr_dog1, plyr_dog2, plyr_dog3]; Then you could change your add action commands to execute the code per dog in the array like this: player addAction ["Dog: Sit", { {_x playMove "Dog_Sit";} foreach DogArray} ]; player addAction ["Dog: Sit", { {_x playMove "Dog_Walk";} foreach DogArray} ]; player addAction ["Dog: Sit", { {_x playMove "Dog_Sprint";} foreach DogArray} ]; You would have to edit your script, but you can make it work. And you might be interested in this script: JBOY Dog (the author is kind of a jerk, but the script is feature rich).
  15. UPDATE: Agent Killed event handlers DO return source (unit who killed them). Agent HandleDamange handlers DO NOT return source (unit who caused damage). I can use the Killed EventHandler, so my problem is solved. Original problem statement: Goddamn chickens are pissing me off. I have a scenario where player and AI unit are hunting chickens in a field, and I want to keep score of how many flying chickens were killed by each. Here's the problem: Chickens created as Agents, play walking and pecking animations so look natural. That is good! But their HandleDamage and Killed eventhandlers do not return a value in Source, so I can't credit the unit who killed it. Bad! Chickens created as Vehicles do NOT play walking and pecking animations. Bad! But their HandleDamage and Killed eventhandlers DO return a value in Source. Good! My workaround was to attach a vehicle chicken to the walking Agent chicken, and use the vehicle chicken's eventhandler for crediting shooter. That works about 70% of the time. But the other 30%, the Agent chicken is killed and attached vehicle chicken is not killed, so shooter does not get credit for the kill. Is there a way to play the chicken Agent behavior FSM on the Vehicle chicken, so it has the same brain as an Agent chicken? How would I do that? I may end up recording timestamps for shots fired per units, and compare with Agent Killed timestamps and credit unit with closest timestamp. But if I can get a vehicle chicken to behave like an agent chicken that would be cleaner.
  16. @Tajin and @FireWalker thanks for your thoughts on this. But I was WRONG! (first time that has ever happened to me). Killed EventHandler DOES include source (shooter) for Agents so my problem is solved. Damaged EventHandler does NOT return source/shooter, but I only use that for the "poof of feathers" effect when hit. Yay, I can move on.
  17. johnnyboy

    Advanced Train Simulator (ATS)

    This is fantastic dude. I love it.
  18. @Larrow, thanks man, that was a seriously helpful post. You are the man. I'm going to delve into how that function uses the playback data with setvelocitytransformation function. When stopping mid-stream, I want to actually slow to a stop, and when resuming playback, accelerate from stopped to whatever the recorded velocity is. This means that during my "stop" and "resume" timeframes, I need to override the recorded data's velocity (to slow to a stop, and to re-accelerate to match recorded velocity). So I think I do need my own version of the sproc, and add my own variables to control stop/resume. To restart (after slowed stop), I may have to read ahead in the playback data to find position closest to stopped position, and then restart from that _nextTime.
  19. Hi guys, I browsed the function viewer and googled, but I can't find the source for BIS_fnc_UnitPlay. I'd like to make my own version and see if I can modify it to: Stop vehicle movement before path script is complete. Terminating the script handle isn't doing it for me. Start and stop vehicle along the same path. I want to pause the movement, and resume movement on demand. Where can I get the code for this function? I found it in the function viewer under A2OA finally...
  20. @das attorney is correct. I just need this during a movement recording session, where there is no other activity. It will be played back in a real mission later. Thanks all for your input.
  21. I need to record driving a very precise land vehicle path to be played back later via BIS_fnc_UnitPlay. I want the driving to be set to a particular speed. While driving the truck as player, I don't know how to force a constant speed, using w key keeps accellerating, and if I Iet off w or use s, I decelerate too much. It appears limitSpeed and ForceSpeed only work on AI. Any ideas?
  22. That works perfectly Pierre. That is thinking outside the box! Merci mon ami! Well I actually tweaked your solution a tiny bit, here's what works for me: onEachFrame { if (speed vehicle player > 10) then { vehicle player setFuel 0 } else { vehicle player setFuel 1; }; }; @das attorney, thanks dude, but Pierre's suggestion got me there, so I'm moving on!
  23. Thanks HazJ, that should work! I'll report back after trying it.
  24. Thanks Kenny, for the compliment and offer to help. Due to time constraints, I don't see me working on MP stuff for a few months though. Bomb sniffing for SP will likely come sooner.
×