Jump to content

johnnyboy

Member
  • Content Count

    2683
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by johnnyboy

  1. johnnyboy

    setDriveOnPath for boats

    I just ran 2 tests with the amphibious Marshall vehicle. In test 1 the Marshall traveled up river through 3 water positions and then stopped (there are about 20 water positions in the path array). On Test 2 the Marshall successfully ran through all 20 water positions. This should mean we can make a path of markers up a narrow river, and have an amphibious vehicle follow that path. Thanks, but I don't think that is relevant. My goal is to have an AI boat travel up a narrow river by following an array of position markers placed in the river path. Driver AI is terrible so boats can't do this very well using waypoints. But setDriveOnPath eliminates path finding and drivers move reliably from point to point (at least on land they do). I was hoping to get the same result for setDriveOnPath. I know I can use UnitCapture, but that is alot more work to record all possible boat paths on a good river map like Isla Duala.
  2. johnnyboy

    setDriveOnPath for boats

    The boat doesn't move - no error is given. I'm sure my code is clean. If I change the boat to an atv and make first position in array a land position, the atv will move that position (which means the code works, but the engine code must just exit if vehicle not a land vehicle). If first position on land and next positions on water, atv will drive to first position, and then drive underwater for awhile until he finally flips over. This makes me think it will work with water positions for an amphibious land vehicle. I'll try that next just for fun.
  3. johnnyboy

    Make static vehicles drivable?

    The Trawler is easy to move for AI. I did it in two of my missions (Leper Island and Last Tango in Tanoa 1). You can see the moving trawler in action in the video at top of Leper Island link. You simply attach the trawler to a boat or mini-sub that has an AI driver. You position the trawler so the ai driven boat is inside it and not visible to a player (and to the rear so you see the wake behind the trawler). Give the AI driver waypoints and it moves nicely. It can turn crazy because ai driven boat's turning radius is much smaller, but if you give it mostly straight waypoints with gradual turns it looks fine. The big static submarine can also be moved by attaching it to a mini-sub. Regarding @phronk's drive boat/goat video, great minds think alike! haha. I've never see that video until just now ( @phronk I swear I didn't rip you off bro!), but I built JBOY_Longboat exactly the same way. Hide the zodiac and attach a longboat to it, then it is a fully usable wooden boat for players and AI. I also provided option of attaching a usable static weapon to front of wooden boat. See the video at top of this JBOY Longboat post. As for the heavy equipment, you could attach them to a hidden ATV like Phronk's video, but it wouldn't animate well I don't think. Maybe for a limited cutscene usage it would be good. There might be some cool usages of AI driving it though...like a bulldozer pushing a car off a cliff or something (great, now I'm instantly derailed thinking about a Bulldozer script...goddammit I'll never finish my next mission).
  4. It would take a little work. You could put that code into a fired event handler, and every time the ai chose to fire, they would fire bursts or auto. So you run forEach allUnits loop to assign the EventHandler to every unit and you're done. Should work. You may also need to do this: In the fired eventhandler you want to first delete this eventhandler for the shooter, then run my code to auto fire, then re-add same eventhandler to shooter. We delete the EH because you don't want the EH executing every time the auto-fire loop makes him fire.
  5. I posted a force auto fire solution in this thread yesterday:
  6. I just tried this and it works. I placed a player unit and an AI machinegunner named dude in the editor. Then from the debug console I execute this code and he fires full auto with short pauses between bursts. Unit needs to be in behaviour COMBAT, or he shots into the ground. dude setbehaviour "COMBAT"; _logic = createGroup west createUnit ["Logic", [0,0,0], [], 0, "NONE"]; _n = [dude, _logic] spawn { params["_dude","_logic"]; sleep 1; // give unit time to raise his weapon in combat mode { _logic action ["useWeapon", dude, dude, 2]; // 2 is burst mode sleep .3; } foreach [1,1,1,1,1,1,1,1,1,1,1,1]; }; You probably want to use a while loop instead of a foreach loop. I was just being lazy in my loop selection for a quick example. You may also want to have other conditions liking pausing loop during reload, some way to terminate loop when some condition is met (time elapsed, player commands to stop via addaction, or whatever).
  7. @Tova, btw, I am very interested in your final script. Please post it when finished. It will be awesome for building clearing cutscenes and many other uses.
  8. onEachFrame is going to work for you, I am confident of that. You can even do it with a loop. In my Last Tango in Tanoa Episode 2 mission, I rotated an AI (El Cojon) via a loop so he could track and shoot flying birds. It worked pretty smooth as you can see in vid below. This code could be easily tweaked to work for you I think. You may want a smaller dir increment than .25, as I have cojon turning fast to track a bird in flight. Skip to 1.25 in video for watching cojon (non-player ai on right) for first good view of him swiveling left to shoot a bird.
  9. Hey VD, I'm glad you're back at it. When you solve this issue regarding ai walking through placed objects, please post it. I have a big long cave I'm working on, and have an issue with AI clipping through walls. I've tried invisible wall barriers but they aren't working 100%. That scenario is now in my backlog, so no hurry on my end.
  10. johnnyboy

    Can I repeat a unitCapture?

    For that you need to record 2 paths. One to the island, and one back. You probably want to record your 2 starting points in variables. After player takes the boat taxi and moves away from the boat, You need to setpos the boat into the return path start position, and flip the boat's direction so when player comes back the boat is facing correct way for path back. Another way to do that is to sense when player is in boat, and black out screen for a few seconds and show some sort of text like "Boat taxi embarking". While screen is blacked out you start running the unitCapture path which will flip the boat instantly to starting direction of recorded path. Then you fade back in and boat is on its way. There's no way to have AI driver turn boat around and position itself correctly, so you have to deal with an immersion breaking trick either way. In that Mabunga swamp mission I had multiple paths recorded throughout the swamp, so besides player 4 boat insertion, enemy pirate patrol boats on other paths would be triggered periodically. It all worked smoothly.
  11. johnnyboy

    Door lock script

    Your if statement looks fine to me. Run your mission from the editor, hit escape and paste the following into one of the debug variables and see what is returned. Do you see "Toolkit" in the array of returned items? items player
  12. johnnyboy

    Can I repeat a unitCapture?

    You can play the same unitCapture multiple times. I'm sure of it. In my Property of Mabunga mission I have a zodiac insertion sequence up a canal into the swamp on Altis, with 4 zodiacs all playing the same unitCapture data, but starting a few seconds apart.
  13. johnnyboy

    JBOY Bean Bag Shotgun

    These are solid ideas man. We should be able to restrain/cuff suspects like in Swat 4. And we have "Swat 5" to look forward to! https://voidinteractive.net/
  14. johnnyboy

    [sp camp] Gambit Royale

    hmmmm...I wonder if that brief case is ticking...
  15. johnnyboy

    Old school, but so old I might as well be ancient.

    Welcome back LoR. Its still a good community. OFP changed gaming for me forever. I used to haunt the OFPEC editing site (back then I was intimidated by the OFP BIS forum). I remember how proud I was when I published my first OFP Burning Barrels script, and General Baron complimented me on it. Ha. Remember THobson's "Abandoned Armies" mission? That was an amazing work.
  16. johnnyboy

    JBOY Bean Bag Shotgun

    I like it, good thinking. And a few of Beno's mirrors on the walls too. Thanks Zagor. Its fun to put the bean down on some AI, then they stand up, then you bean 'em down again!
  17. johnnyboy

    Arma3 Videos

    Get the scripts at this forum link:
  18. johnnyboy

    [Release] MIL_Mirror

    Hail to the King, baby! That is an awesome addition to ARMA bro. Thanks alot. Looks and sounds perfect.
  19. johnnyboy

    [Release] MIL_Mirror

    I hope Georgie talked you off the ledge Frodo! setObjectTextureGlobal! I've been there mate. Sometimes you just spin your wheels and go crazy...
  20. johnnyboy

    Scripting General & Library

    Thanks for listening! Its just an idea. But I think especially in a SP mode, if I'm surviving and want to butcher a goat without being seen, its an immersion breaker to have everyone in the world consider me an enemy later. I definitely like your silent takedown ideas too. On a related note, one thing cool about open world games like GTA and Red Dead Redemption, is having some NPC remember you for a witnessed deed later. That is cool, immersive, and impressive when it happens. To implement that, we need to add negative (and positive?) encounters to NPC specific variables (or NPC clan specific variables). So the next time the NPC or his Clan sees you they react: "Get that goat rustler!" or "Need some food? I appreciate your help fighting those bandits.". Etc. I guess what I'm getting at is player reputation with an individual NPC, or reputation with a Clan/Group of NPCs. Easy for me to say, as I'm too busy on other projects to contribute to this...haha. Oh no, more ideas are coming in dammit! ... I can't stop them... Real time Wanted Poster: Once player is flagged as a bad guy, create wanted posters by projecting a camera on signs or posters placed here and there. It could be real time by creating a unit, and you set his face, uniform, and headgear to match the player. And set enableSimulation false, and place the unit in front of some generic background. This would have to be an out of the way location, and could even be done 10000 meters up in the air. Point a camera on the poster unit face, and broadcast the camera on any "Poster" Signs placed in game. Text on Poster could be customized real time also with Player Name. These posters can be pre-set up with a generic .paa/.jpg of some character, then replaced later with live camera when Player actively becomes a bad guy. Wouldn't it be cool to walk into a town and see your face and name on a wanted poster? (Then you would know how I feel every time I go to the post office.)
  21. johnnyboy

    Scripting General & Library

    IMO a player should be penalized only if another player or AI witnessed the killing. So maybe you should ckeck for near humans and check their knowsAbout value and distance to the killer.
  22. johnnyboy

    JBOY Fish School script

    Good idea! But Alias beat us to it: https://steamcommunity.com/sharedfiles/filedetails/?id=1600341018
  23. johnnyboy

    JBOY Fish School script

    Thanks man! Ideas mainly flow from observing what vanilla arma does, and what is missing. Half my ideas come alive via two commands: attachTo and setVelocity (fish schools, flying chickens, longboats, birds of prey, jumping fish, dog attack, etc.).
  24. Hi Haleks. I'm interested in seeing your code for making rabbits run faster. I might want to apply it to JBOY dog. It pisses me off that human AI can outrun a dog! 🙂
  25. johnnyboy

    JBOY Fish School script

    Thanks EO, I appreciate it. Do you have a link to your "animals extended module"? I'm curious about it.
×