HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

why doesn't this work?

08-25-2005, 09:13 PM#1
duckduck
Quote:
Events
Player - Player 1 (Red) skips a cinematic sequence
Conditions
Actions
Unit - Set life of Blood Mage 0000 <gen> to 100.00%
Unit - Set mana of Blood Mage 0000 <gen> to 100.00%
Unit - Reset ability cooldowns for Blood Mage 0000 <gen>
Unit Group - Pick every unit in Init_SoldierUnitGroup and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
Unit Group - Remove all units from Init_SoldierUnitGroup
Unit - Create 4 Swordsman for Player 1 (Red) at (Position of Blood Mage 0000 <gen>) facing (Facing of Blood Mage 0000 <gen>) degrees
Unit Group - Add all units of (Last created unit group) to Init_SoldierUnitGroup
Unit - Create 2 Archer for Player 1 (Red) at (Position of Blood Mage 0000 <gen>) facing (Facing of Blood Mage 0000 <gen>) degrees
Unit Group - Add all units of (Last created unit group) to Init_SoldierUnitGroup
when i do that, it heals the bloodmage and resets the abilities, but creates massive amounts of swordsman and archers
08-25-2005, 10:23 PM#2
Tim.
Everytime you pick 1 unit out of the unit group you create 4 swordsmen and 2 archers. If there is 5 units in the unit group you will get 20 Swordmen and 10 archers. Get it?
08-26-2005, 12:43 AM#3
duckduck
um... no...
how would i fix it though?
08-26-2005, 05:52 PM#4
Spathis
Move these actions outside the loop:

Unit - Create 4 Swordsman for Player 1 (Red) at (Position of Blood Mage 0000 <gen>) facing (Facing of Blood Mage 0000 <gen>) degrees
Unit Group - Add all units of (Last created unit group) to Init_SoldierUnitGroup
Unit - Create 2 Archer for Player 1 (Red) at (Position of Blood Mage 0000 <gen>) facing (Facing of Blood Mage 0000 <gen>) degrees
Unit Group - Add all units of (Last created unit group) to Init_SoldierUnitGroup
08-26-2005, 06:36 PM#5
Tim.
Exactly.

All the actions in the loop will run the amount of times as the amount of units in the group. X units = X times. Hense by taking anything out of the loop you do not want run 10 times you will only get those actions running once.