Jetting for AI?

Scripting questions, discussions, etc
  • 1
  • 2
17 posts Page 2 of 2
cybore
Posts: 29
Joined: Fri Feb 13, 2015 10:18 am
by cybore » Sat Sep 19, 2015 6:32 pm
The value is set in the datablocks, for both the player and the ai. Problem is, there is very little movement in any direction when "jetting" (other than straight up). I dunno if this is an issue on my end or an issue in 3.7. After checking, the last version that I used that I don't have trouble with Air Control is version 3.0. I'm baffled. :?
rlranft
Posts: 298
Joined: Thu Feb 05, 2015 3:11 pm
 
by rlranft » Sun Sep 20, 2015 4:48 am
The value is set in the datablocks, for both the player and the ai
Set to what?

And if you're confirming that this works as expected in 3.0 but not in, say, 3.1 then that would give a better starting point for someone to start looking into this...
cybore
Posts: 29
Joined: Fri Feb 13, 2015 10:18 am
by cybore » Sun Sep 20, 2015 7:24 am
Value is set to 0.3, and air control works fine up to version 3.5.

I was able to get jetting working for the ai in 3.0. Since that is the best version of T3D that I could get "aircontrol" to work correctly, I did what Steve_Yorkshire suggested. I exposed the getAI()Move function to script and activated the mJetting Trigger. The "setMoveTrigger" function is already set up in 3.7, so I copied that function and moved it over to 3.0. Easier than I thought it would be.

It works pretty good, but I'll need to beef it up a bit to make the ai more aggressive. Thanks for the help! I'll keep this thread updated with my progress.
cybore
Posts: 29
Joined: Fri Feb 13, 2015 10:18 am
by cybore » Mon Sep 21, 2015 12:37 am
I was wondering, can maxForwardSpeed be changed "on the fly" via script? I noticed the higher my maxForwardSpeed was set, the more "air control" I had. If I could set maxForwardSpeed to a higher variable upon using the "mJetting" trigger via script, it would solve my "air control" issues.
marauder2k9
Posts: 211
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Mon Sep 21, 2015 2:14 pm
an if statement and a bool will help you here
Caleb
Posts: 20
Joined: Tue Feb 10, 2015 5:01 pm
by Caleb » Mon Sep 21, 2015 9:23 pm
I was wondering, can maxForwardSpeed be changed "on the fly" via script? I noticed the higher my maxForwardSpeed was set, the more "air control" I had. If I could set maxForwardSpeed to a higher variable upon using the "mJetting" trigger via script, it would solve my "air control" issues.
You can't (or rather shouldn't) change DataBlock values during runtime, but you can use setMoveSpeed instead. Have the maxForwardSpeed set to something high like 20 or so, then when the AIPlayer is spawned just reduce the speed with %bot.setMoveSpeed(0.5). Then when the AIPlayer is in the air set it back to max with %bot.setMoveSpeed(1).
cybore
Posts: 29
Joined: Fri Feb 13, 2015 10:18 am
by cybore » Tue Jan 05, 2016 5:26 pm
The video is not of high quality (I need to work on that), but here is a video of the AI "jetting" and "skiing" around. Still needs some tweaking, but it's getting there.

  • 1
  • 2
17 posts Page 2 of 2

Who is online

Users browsing this forum: No registered users and 3 guests