HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Summoning Unit From Shop

11-17-2008, 09:33 AM#1
slicer
hi.
this is my first post to this board.

im making a map like hero defance.

i want players can send creeps to other team's base while their income get higher.

but cant find how to do it.

tried it but it doesnt works fine.

here r codes...


Trigger:
Start Income
Collapse Events
Time - Elapsed game time is 1.00 seconds
Conditions
Collapse Actions
Collapse Player Group - Pick every player in (All players) and do (Actions)
Collapse Loop - Actions
Player - Set (Picked player) Current lumber to 5
Player - Set (Picked player) Current gold to 150
Wait 29.00 seconds
Trigger - Turn on Income <gen>
Trigger - Turn off (This trigger)

Trigger:
Income(Initially Off)
Collapse Events
Time - Every 30.00 seconds of game time
Conditions
Collapse Actions
Collapse Player Group - Pick every player in Players and do (Actions)
Collapse Loop - Actions
Game - Display to (Player group((Picked player))) the text: ((You get + (String(Income[(Player number of (Picked player))]))) + gold coins.)
Player - Add Income[(Player number of (Picked player))] to (Picked player) Current gold
Player - Set (Picked player) Current lumber to 25
Multiboard - Set the text for (Last created multiboard) item in column 4, row 3 to (String(Income[1]))
Multiboard - Set the text for (Last created multiboard) item in column 4, row 4 to (String(Income[2]))
Multiboard - Set the text for (Last created multiboard) item in column 4, row 5 to (String(Income[3]))
Multiboard - Set the text for (Last created multiboard) item in column 4, row 6 to (String(Income[4]))
Multiboard - Set the text for (Last created multiboard) item in column 4, row 8 to (String(Income[5]))
Multiboard - Set the text for (Last created multiboard) item in column 4, row 9 to (String(Income[6]))
Multiboard - Set the text for (Last created multiboard) item in column 4, row 10 to (String(Income[7]))
Multiboard - Set the text for (Last created multiboard) item in column 4, row 11 to (String(Income[8]))

Trigger:
Increase Income
Collapse Events
Unit - A unit Sells an item (from shop)
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Sold Item)) Equal to Chicken --!!((this is an item))!!--
Collapse Then - Actions
Set Income[(Player number of (Owner of (Buying unit)))] = (Income[(Player number of (Owner of (Buying unit)))] + 1)
Unit - Remove (Sold unit) from the game
-------- How summon creep? --------
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Item-type of (Sold Item)) Equal to Spider --!!((this is an item))!!--
Collapse Then - Actions
Set Income[(Player number of (Owner of (Buying unit)))] = (Income[(Player number of (Owner of (Buying unit)))] + 2)
Unit - Remove (Sold unit) from the game
-------- How summon creep? --------
Else - Actions
11-17-2008, 12:24 PM#2
Anitarf
If your creep is supposed to be the same as the sold unit then instead of removing the sold unit, just move it to the creep starting position and order it to move or attack move wherever.
11-17-2008, 12:32 PM#3
slicer
i want summon 4 creep at difference spots when u buy. how can i make it?