Would this be possible? AI CAR?
#1

Would it be possible to script an AI RC Baron which would specific team in specific area? I mean like with the limitations of samp... that looks impossible but I want to hear your opinions too.
Let me explain a little bit more:
User1 uses the CMD to activate AI RC Baron or w/e car.
AI RC Baron spawns and follows and kills players in specific area e.g the area the RC was spawned... but without me driving it instead it would be an "AI BOT" "NPC" or whatever.
Reply
#2

I don't know much about NPC plugins but I think spawning it, following, killing can be scripted.. But what about making the NPC shoot from RC Baron.
Reply
#3

Quote:
Originally Posted by coool
Посмотреть сообщение
I don't know much about NPC plugins but I think spawning it, following, killing can be scripted.. But what about making the NPC shoot from RC Baron.
Yeah I mean those can be done but shooting a rc baron...
Reply
#4

Maybe it can be done by using FCNPC_SetKeys
Reply
#5

Vehicle movements dont work well with any kind of NPCs. Even driving a car around a corner usually looks bad. Sure this would be possible with both FCNPC and RNPC, but it would look terrible, not even close to a real player.
Reply
#6

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Vehicle movements dont work well with any kind of NPCs. Even driving a car around a corner usually looks bad. Sure this would be possible with both FCNPC and RNPC, but it would look terrible, not even close to a real player.
So what do you suggest to use ?
Reply
#7

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Vehicle movements dont work well with any kind of NPCs. Even driving a car around a corner usually looks bad. Sure this would be possible with both FCNPC and RNPC, but it would look terrible, not even close to a real player.
Using Give/SetVelocity and SetQuaternion you can make damn smooth movement (FCNPC) that isn't path based. If you can wrap your head around quaternions and most importantly, correctly rotating them it wouldn't be much of a problem to make the movement of a plane alright.

Technically that should be possible without big issues. The hardest part would still be calculating the correct rotations for a plane (also considering turns, ascending, descending) and a good path finder (so that it would actually be able to hit players while at the same time not crashing into every tree).

If you ignore the rotations at the beginning, it should be quite easy to do.
Reply
#8

Quote:
Originally Posted by NaS
Посмотреть сообщение
Technically that should be possible without big issues. The hardest part would still be calculating the correct rotations for a plane
Yep, thats what I was talking about. Youll have to reverese engineer the GTA physics for really believable movement. Ive tried that once, but soon realized that the GTA dev team is huge for a reason. Also, without a graphics card on the server side, performance is gonna be painful if youve got several of the planes flying around.
Reply
#9

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Yep, thats what I was talking about. Youll have to reverese engineer the GTA physics for really believable movement. Ive tried that once, but soon realized that the GTA dev team is huge for a reason. Also, without a graphics card on the server side, performance is gonna be painful if youve got several of the planes flying around.
You could create recordings of making turns or any sort of things then translate the playback position/rotation but would require additional updates to FCNPC.
Reply
#10

Hmm I've tried around with RC Planes and rotation on Paths, it's quite easy.
Y rotation can be ignored if the curves are limited to a decent degree. Calculating the X and Z Rotation is either easily possible by euler -> quat conversion or use Gamer_Z's QuaternionStuff Plugin (that also allows correct x,y,z rot but didn't mess with that yet).

The path isn't too hard either, I tried writing a "brute-force" random path generator and it generates nice routes which look good when the NPCs fly them. Plus they never crash into Buildings or whatever, using ColAndreas (they even find little holes and fly through 2km long Tubes I mapped in the Map Editor). This is of course not doing what you wanted, but it could be adjusted to that (adding a target shouldn't be too hard).

It's already dangerous if they are rapid-firing, given the auto-aim that they have. So if you let these fly somewhere near the Player you can be sure he will die eventually.

So, if you are seriously interested in doing this, this could serve as proof that it's possible (without much complexity).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)