Announcement

Collapse
No announcement yet.

what controller should i extend....

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    what controller should i extend....

    I am working on my second mod, for my first mod i created scriptedAIControllers to control my pawns. I do not want to create scriptedControllers for my new mod, but i am not sure which is best suited for me to extend for my current project... Can an experienced Controller scripter help the kid out??here is description of what my pawns goals are...

    i do not want to prescript there paths.
    i do want them to patrol an area (as oppose to running around my entire level)
    a leader may emerge so squadAI is not out of the question but i do not want to constrain my pawn/bot to a squad

    im doing preliminary research and it will save me time if i extend from the correct controller class...
    thanks in advance for helping....

    #2
    The bot (bot.uc) class is the most basic of the aicontrollers for a bot, it basically contains all the information for how to do everything (like weapon selection, powerup use, movement etc) then has a decision function that decides what it should do next, a function to execute these decisions and some states to enter that use the basic functions. Either you could extend bot and override the decision function to make it do what you want, or perhaps extend whatever it is above (aicontroller?) bot and make your own functions. I think you'd want to take the first option so you dont have to make all the functions about how to move around and choose weapons etc. If you make a subclass of bot and override the decision function (i think its called WhatToDoNext) with an empty function you get a bot that just stands there like a dummy

    Dont know if thats what your after, hope it helps.

    Comment


      #3
      thanks a lot playa. i appreciate it.
      Ive decided on extending bot. Heres my issues. I have five different pawns with their own model, textures, attributes (airspeed, dodgespeed, etc.)..... but I want them all to use the same controller. Currently my gametype spawns the controllers which in turn spawn the pawns. So i want the controller to randomly pick one of five pawntypes to control. In my last mod i spawned the pawns then the controllers but thats not the way deathmatch does it so I d like to do it their way this time. Any idea how to randomly choose a pawn (or how to randomly choose anything for that matter?)

      Comment


        #4
        A dynamic array of pawn classes. var array< class<Pawn> > PawnClasses; Set them up in defaults, then pick a random one with PawnClasses[Rand(PawnClasses.Length)].

        Comment


          #5
          ooh nice!!!
          thanks for the quick reply...

          Comment

          Working...
          X