Home   Help Search Login Register  

Author Topic: respawn a.i run to planes and take off and fight  (Read 1255 times)

0 Members and 1 Guest are viewing this topic.

Commando

  • Guest
respawn a.i run to planes and take off and fight
« on: 02 Nov 2003, 16:38:28 »
I came up with a idea for a sector control mission but i would like the a.i's to be in the game to  :) when checking out the original sector control mission templates you can see a lot of waypoints and when you play the waypoints newer disapear when you have died and respawned.
So i wonder if there's any way to make a.i's get in vehicles say like plane and go and fight some other planes   :o
anyone know's how it can be done?

Rappy

  • Guest
Re:respawn a.i run to planes and take off and fight
« Reply #1 on: 02 Nov 2003, 20:29:34 »
you can script basic AI stuff like that indeed.

Even add randomness, like:

#start
;; AI decides what to do this time
?(random 1 >= 0.8):goto "airassault"
?(random 1 >= 0.6 AND random 1 < 0.8): goto "ground_assault"
?(random 1 < 0.6 AND random 1 >= 0.4): goto "random_patrol"
and so on

then create the behaviors for each part
like:

#airassault
_AI domove getmarkerpos "airfield"
_AI getin _plane

now there are various things you could do with that, like have an array  of enemies and let him randomly choose one, or let him choose from those that are in air, or just closest known enemy, well lets say the AI wants to go to their base straight away

_AI domove (getmarkerpos "enemybase")



that was rather simplified but I just thought of a quick example, I love using randomness in most of my own scripts so this can be pretty much infinite fun as long as you can figure out things for him to randomly do and make it more and more advanced in the process.

Like why not basing it all on the knowsabout factor, if some other AI has found some enemy tank, but has nothing to fight it then the new AI that perhaps just spawned could get into a tank instead of a jeep, or get into a chopper, OR not get into a chopper if there is a shilka spotted nearby.

Could get pretty fun eventually and end up with the AI being a worthy opponent.

you dont need any waypoints or preplaced info really, just give objects or markers for various positons that are important, like the sectors you must fight over.

so you could just start out with the AI working its way to taking over sectors, then as it gains more info as time goes by about the enemy(you) the AI could alrdy start showing intelligence via various parameters.

for example you could have a variable:
_hostilenum = 0
every enemy AI sees adds +1 to that

you could use that number later on for various effectors on AI making choices.
?(_hostilenum > 5): goto "getmorehelp"

etc.

well kinda fell in love with that idea currently myself aswell and perhaps should start doing a sp mode for my own mp mission, could be fun as coop vs AI :)

Hope you got some good ideas from here however.



Commando

  • Guest
Re:respawn a.i run to planes and take off and fight
« Reply #2 on: 04 Nov 2003, 09:07:45 »
Oh cool! I can't write scripts but i wonder if you can post an example script or mission? I got great ideas and i can do pretty good mpmissions so maybe we should work togheter

Rappy

  • Guest
Re:respawn a.i run to planes and take off and fight
« Reply #3 on: 04 Nov 2003, 14:03:23 »
Ahh ok, well, when I'll start on the script (which I might do sometime soon) I'll post it here, I am kinda busy with other things atm though.

That script should be quite big eventually with all the nice functions, randomness and variation added.

However if you got ideas of things to add post it here, I arent some coding genius but I eventually manage to get most things working :D