A
Amfidamant
Guest
I was makin a map, when i encountered 2 problems i couldnt solve. I made a building that spawns (using create unit at region) a few units and they go do what they have to for computer player 1 RED. Now, i also made upgrades for units.
Problem is, that i cannot upgrade the units.
First i was using this code
I added the iron forged swords to barracks techree- researches available, also added units to units trained. But units dont upgrade.
Next problem is about spawning more units.
First i thought to make my unit barracks have research available and just added select unit and shop sharing to barracks abilities, but it didnt work. Then i made it sell an item called Horse breeding. What item does, is that it casts ability "item horse breeding".
To it i made a trigger
This code was supposed to research upgrade Horse breeding (based on animal war training with 0 values set) and using this code
Create 2 knight at position of my choice.
But in any way, it doesnt work at all.
I hope i explained everything clearly.
Thanks, Amfi
Problem is, that i cannot upgrade the units.
First i was using this code
Code:
Event - Every 300 seconds of game time
Condinion - N/A
Action - order barracks 0000 <gen> to research Iron forget swords
Next problem is about spawning more units.
First i thought to make my unit barracks have research available and just added select unit and shop sharing to barracks abilities, but it didnt work. Then i made it sell an item called Horse breeding. What item does, is that it casts ability "item horse breeding".
To it i made a trigger
Code:
Event - Unit- a unit begins casting ability
Conditions - (ability being cast) equal to item Horse Breeding
Actions- if (all conditions are true) then do (Then - actions) else do (Else -actions)
if - conditions
(reseaqrched tech type) not equal to Horse breeding
then-actions
Unit-Order Barracks 0000 <gen> to research Horse breeding
else-actions
do nothing
Code:
Event - Time- every 40 seconds of game
Conditions - N/A
Actions- if (all conditions are true) then do (Then - actions) else do (Else -actions)
if - conditions
(reseaqrched tech type) equal to Horse breeding
then-actions
Unit-Create 2 Knight for player 1(red) at (point (my point)) facing defauld building degrees
Else-Actions
Do nothing
But in any way, it doesnt work at all.
I hope i explained everything clearly.
Thanks, Amfi


