Home   Help Search Login Register  

Author Topic: AI Enhancement: Adding Unit Attributes  (Read 679 times)

0 Members and 1 Guest are viewing this topic.

Al

  • Guest
AI Enhancement: Adding Unit Attributes
« on: 21 Nov 2003, 17:11:42 »
hi all,

I'm trying to enhance the AI using a finite state machine model.  As part of my efforts I need to add certain attributes/parameters to the units and groups I intend to use, e.g. a variable state to track a group's state; obj for objective; mission etc.

Is there any way to achieve this *without* creating a new addon class?

cheers,
Al

_hammy_

  • Guest
Re:AI Enhancement: Adding Unit Attributes
« Reply #1 on: 29 Nov 2003, 03:18:22 »
probably not

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:AI Enhancement: Adding Unit Attributes
« Reply #2 on: 30 Nov 2003, 13:17:32 »
I would base this on group-names.

Have an array with various groups and then make up various state-variables for each group.

Example:

state_groups = [group1,group2,group3]

group1_state = "state_guarding"
group1_mission = "mis_guard"
group1_objective = gamelogic_guard
group1_obj_pos = getpos gamelogic_guard

group2_state = "state_moving"
group2_mission = "mis_rearm"
group2_objective = ammocrate1
group2_obj_pos = getpos ammocrate1

group3_state = "state_moving"
group3_mission = "mis_destroy"
group3_objective = bunker1
group3_obj_pos = getpos bunker1


etc etc...  8) hope this is near what you have in mind