Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Graphicscore

[Q][.NET]AI Drive to Coords, Fly Helicopter to location and land on gr

Recommended Posts

Graphicscore

 

 

 

 

 

Got it! It was just some mistakes in the parameters. Now all there's left to do is to care for some stupid bugs like the pilot leaving the chopper in mid-air when we arrived over the target. Ugly blood puddle on the ground. Poor pilot. RIP

Thanks for your great help. :^:

Nice ! I'm glad I could help you :)

 

Graphicscore, you can generate this one by Visual studio ;)

 

Best wishes,

Paul.

Oo, Really ? Where ?

 

It's called "Code map". MSDN explains https://msdn.microsoft.com/en-us/library/jj739835.aspx

 

All the best,

Paul.

 

I wonder if that feature is available in the free editions.

 

I actually have the paid students edition(#ThanksSchool)

 

But you can't tell me that this is organized, it looks kinda messed up XD (Auto generated by VS)

 

Ah what am I talking, take a look for yourself XD

 

PBeTd.png

 

It's hard to tell from that graph (as with mine). I think you get a better visualization of the architecture by creating a "dependency graph". You can find that in the menu bar above (I mean in VS). Architecture -> Create dependency graph.

ngaxy0.png

 

I don't know your knowledge about software architecture. Have you heard of "separation of concerns" or the SOLID principle or design patterns? I use a strategy pattern in my Autodrive mod.

 

Yes I know this principe and you're right that I really need to get my source organized :)

Share this post


Link to post
Share on other sites
Cyron43

I didn't say your code is not well organized. :) A code map is just not quite the right choice to analyze the architecture. At least you grouped members to their classes, which I didn't in my code map.

 

On topic: This TASK_VEHICLE_DRIVE_TO_COORD function seems to strictly use a terrain follow approach. I implemented code that changes the altitude with keystrokes (W 20ft up, S 20ft down) but it has no effect. Come on guys, it's someone else's turn now. :)

Edited by Cyron43

Share this post


Link to post
Share on other sites
Graphicscore

I didn't say your code is not well organized. :) A code map is just not quite the right choice to analyze the architecture. At least you grouped members to their classes, which I didn't in my code map.

 

On topic: This TASK_VEHICLE_DRIVE_TO_COORD function seems to strictly use a terrain follow approach. I implemented code that changes the altitude with keystrokes (W 20ft up, S 20ft down) but it has no effect. Come on guys, it's someone else's turn now. :)

 

How do you change the altitude ? Maybe you could trick the AI by clearing the driving task, call a Driving Task to 20ft above/underneath you and then clear it again and restore the original route. That would be kind of a work around, it's ugly but it should do the deal somehow ;)

Edited by Graphicscore

Share this post


Link to post
Share on other sites
Cyron43

 

I didn't say your code is not well organized. :) A code map is just not quite the right choice to analyze the architecture. At least you grouped members to their classes, which I didn't in my code map.

 

On topic: This TASK_VEHICLE_DRIVE_TO_COORD function seems to strictly use a terrain follow approach. I implemented code that changes the altitude with keystrokes (W 20ft up, S 20ft down) but it has no effect. Come on guys, it's someone else's turn now. :)

 

How do you change the altitude ? Maybe you could trick the AI by clearing the driving task, call a Driving Task to 20ft above/underneath you and then clear it again and restore the original route. That would be kind of a work around, it's ugly but it should do the deal somehow ;)

 

Well that's what I do anyway. I trigger the driving task (in general) each time when the user changes a parameter - but I'm not certain if I do Task.ClearAll() before. I'm gonna have a look.

 

EDIT: Jep, ClearAll() is called each time before but that doesn't mean much. I need to call Task.ClearAllImmediately() when releasing the autodrive mode or the character is stuck. However I can't do that in this case because ClearAllImmediately() causes the character to warp out of the vehicle and I need to warp him back in immediately after. You can even see that when you look very closely. It's an ugly trick but I haven't yet found a better way. Otoh ClearAll() works flawless when changing speed in a car/bike/boat. *shrugs*

 

EDIT2: It just hit me! It's just a thought and maybe I'm wrong. Is that what ClearSecondary() is for? Is sitting in a vehicle a primary task and the character warps out because ClearAllImmediately() also clears the primary tasks? So driving would be a secondary task if I'm right. But shooting while driving would be a tertiary task then. *confused*

Nah the difference is in "immediately". So how many thread cycles do we have to wait with ClearAll()? *confused*

@Crosire?

Edited by Cyron43

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.