Map Database  •  FAQ  •  RSS  •  Register  •  Login

Setting AI Attack

<<

baileys90

Peasant

Posts: 1

Joined: 09 Oct 2013, 14:58

KaM Skill Level: Expert

Post 09 Oct 2013, 15:22

Setting AI Attack

Hi, i'm trying to create a campaign and actually i'm on missions 1 and 2 but i have a problem. I can't set ai attack correctly. I tried to change attack type and conditions several times but the enemies never attack. :( I use kamremake's editor.
This is, for example, the script of player 2( at the moment there is 1 attack only):

  Code:
!SET_CURR_PLAYER 1
!ENABLE_PLAYER 1
!SET_AI_PLAYER
!SET_MAP_COLOR 36
!CENTER_SCREEN 113 3


!SET_AI_START_POSITION 114 3
!SET_AI_NO_BUILD
!SET_AI_CHARACTER RECRUTS 10
!SET_AI_CHARACTER WORKER_FACTOR 3
!SET_AI_CHARACTER CONSTRUCTORS 0
!SET_AI_CHARACTER TOWN_DEFENSE 100
!SET_AI_CHARACTER EQUIP_RATE_LEATHER 1000
!SET_AI_CHARACTER EQUIP_RATE_IRON 500
!SET_AI_CHARACTER ATTACK_FACTOR 100
!SET_AI_CHARACTER RECRUT_COUNT 0
!SET_AI_CHARACTER TROUP_PARAM 0 6 3
!SET_AI_CHARACTER TROUP_PARAM 1 6 3
!SET_AI_CHARACTER TROUP_PARAM 2 6 3
!SET_AI_CHARACTER TROUP_PARAM 3 6 3

!SET_AI_DEFENSE 96 8 6 0 13 0
!SET_AI_DEFENSE 99 7 6 2 13 0
!SET_AI_DEFENSE 124 22 4 0 10 0
!SET_AI_DEFENSE 124 19 4 2 16 0
!SET_AI_DEFENSE 89 4 4 3 20 0
!SET_AI_DEFENSE 109 19 5 0 12 0
!SET_AI_DEFENSE 112 16 5 2 13 0
!SET_AI_DEFENSE 118 18 4 0 10 1
!SET_AI_DEFENSE 103 3 4 0 13 1
!SET_AI_DEFENSE 107 10 5 3 13 0
!SET_AI_DEFENSE 118 12 4 3 10 1


!SET_AI_ATTACK TYPE 1
!SET_AI_ATTACK TOTAL_AMOUNT 12
!SET_AI_ATTACK TROUP_AMOUNT 0 1
!SET_AI_ATTACK TROUP_AMOUNT 1 0
!SET_AI_ATTACK TROUP_AMOUNT 2 1
!SET_AI_ATTACK TROUP_AMOUNT 3 0
!SET_AI_ATTACK COUNTER 15000
!SET_AI_ATTACK TARGET 1
!COPY_AI_ATTACK 0


!SET_ALLIANCE 0 0
!SET_ALLIANCE 2 1
!SET_ALLIANCE 3 1

!SET_HOUSE 21 124 4
!ADD_WEAPON 16 200
!ADD_WEAPON 18 200
!ADD_WEAPON 20 200
!ADD_WEAPON 24 200
!ADD_WEAPON 26 20
!SET_HOUSE 27 117 8
!SET_HOUSE 13 122 9
!SET_HOUSE 19 119 3
!SET_HOUSE 11 114 3
!ADD_WARE 1 9999
!ADD_WARE 2 9999
!ADD_WARE 7 9999
!ADD_WARE 8 9999
!ADD_WARE 9 9999
!ADD_WARE 10 9999
!ADD_WARE 12 9999
!ADD_WARE 13 9999
!ADD_WARE 27 9999
!SET_HOUSE 12 110 7
!SET_HOUSE 19 124 12
!SET_HOUSE 20 107 3


!SET_STREET 106 3 !SET_STREET 113 3 !SET_STREET 118 3 !SET_STREET 106 4
!SET_STREET 107 4 !SET_STREET 108 4 !SET_STREET 109 4 !SET_STREET 110 4
!SET_STREET 111 4 !SET_STREET 112 4 !SET_STREET 113 4 !SET_STREET 114 4
!SET_STREET 115 4 !SET_STREET 116 4 !SET_STREET 117 4 !SET_STREET 118 4
!SET_STREET 119 4 !SET_STREET 120 4 !SET_STREET 121 4 !SET_STREET 123 4
!SET_STREET 113 5 !SET_STREET 121 5 !SET_STREET 122 5 !SET_STREET 123 5
!SET_STREET 113 6 !SET_STREET 123 6 !SET_STREET 110 7 !SET_STREET 113 7
!SET_STREET 123 7 !SET_STREET 110 8 !SET_STREET 111 8 !SET_STREET 112 8
!SET_STREET 113 8 !SET_STREET 114 8 !SET_STREET 116 8 !SET_STREET 123 8
!SET_STREET 114 9 !SET_STREET 115 9 !SET_STREET 116 9 !SET_STREET 117 9
!SET_STREET 118 9 !SET_STREET 119 9 !SET_STREET 121 9 !SET_STREET 123 9
!SET_STREET 119 10 !SET_STREET 120 10 !SET_STREET 121 10 !SET_STREET 122 10
!SET_STREET 123 10 !SET_STREET 121 11 !SET_STREET 121 12 !SET_STREET 123 12
!SET_STREET 121 13 !SET_STREET 122 13 !SET_STREET 123 13

!SET_UNIT 0 112 4
!SET_UNIT 0 113 4
!SET_UNIT 0 114 4
!SET_UNIT 0 114 5
!SET_UNIT 0 113 5
!SET_UNIT 0 112 5
!SET_UNIT 0 112 6
!SET_UNIT 0 113 6
!SET_UNIT 0 114 6
!SET_GROUP 15 96 8 6 3 6
!SET_GROUP_FOOD
!SET_GROUP 15 124 22 4 3 6
!SET_GROUP 17 99 7 6 3 3
!SET_GROUP_FOOD
!SET_GROUP 17 124 19 4 3 3
!SET_GROUP 17 112 16 5 3 6
!SET_GROUP 15 109 19 5 3 6
!SET_GROUP 21 89 4 4 3 6
!SET_GROUP 17 53 24 7 3 3
!ATTACK_POSITION 47 20
!SET_GROUP 15 50 45 0 3 3
!ATTACK_POSITION 29 17
!SET_GROUP 17 54 27 6 4 4
!ATTACK_POSITION 47 29
!SET_GROUP 15 49 31 7 2 2
!ATTACK_POSITION 42 22
!SET_GROUP 15 42 26 7 2 4
!ATTACK_POSITION 37 17
!SET_GROUP 15 51 23 7 2 2
!ATTACK_POSITION 42 16
!SET_GROUP 21 82 13 4 3 4
!ATTACK_POSITION 36 35
!SET_GROUP 17 46 33 6 2 2
!ATTACK_POSITION 41 33
!SET_GROUP 15 57 26 6 3 3
!ATTACK_POSITION 29 17

Do you have any suggestions?
Thank you very much
<<

Skypper

User avatar

Knight

Posts: 436

Joined: 28 Jun 2013, 09:37

Location: Dutch :D

KaM Skill Level: Fair

Post 09 Oct 2013, 16:53

Re: Setting AI Attack

try to use dynamic script, in the editor self there are also a few options for attack commands.
personally i never use static scripts
Greets Skypper (Totally Insane)

- Beginning map maker -

Return to Map Design

Who is online

Users browsing this forum: No registered users and 4 guests

cron