| 07-05-2004, 11:53 PM | #1 |
I know I am posting a lot, sorry, having more trouble than I would have expected though, these should be simple triggers :( Okay trigger 1 Code:
TestStockSetup
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
For each (Integer A) from 0 to 40, do (Set StockCountUnit[(Integer A)] = 10)
Set i = 0
Set StockUnitType[i] = Attacker
Set i = (i + 1)
Set StockUnitType[i] = Mage
Set i = (i + 1)
Set StockUnitType[i] = Worker
Set i = (i + 1)And Trigger 2: Code:
Unit Group - Pick every unit in AntiAirTowerGroup[(Integer A)] and do (Actions)
Loop - Actions
Hero - Add 1 experience to (Picked unit), Hide level-up graphics
Hero - Modify unspent skill points of (Picked unit): Set to 0 points
Set i = 0
Neutral Building - Remove StockUnitType[i] from (Picked unit)
Neutral Building - Add StockUnitType[i] to (Picked unit) with StockCountUnit[i] in stock and a max stock of 9999
Set i = 1
Neutral Building - Remove StockUnitType[i] from (Picked unit)
Neutral Building - Add StockUnitType[i] to (Picked unit) with StockCountUnit[i] in stock and a max stock of 9999
Set i = 2
Neutral Building - Remove StockUnitType[i] from (Picked unit)
Neutral Building - Add StockUnitType[i] to (Picked unit) with StockCountUnit[i] in stock and a max stock of 9999For some reason it will not add the units to be sold. The StockCountUnit(x) is correct. Can you not add a unit to be sold by refering to a unit-type variable? Or am I missing something else? |
| 07-06-2004, 08:50 AM | #2 |
Well first of all... when you ask for help, plz post what the trigger is supposed to do. Its not that easy to figure out what was in your brain when you wrote the triggers without havin a single clue of what its supposed to be. And is trigger 2 a part of trigger 1? When you say trigger 2 it means its another trigger; not another part. Ok but i DO understand your trigger, just in case others do not you should allways post that kind of stuff :D OMFG I EDITED BUT THE EDIT DIDNT WORK! Nvm ill help: THe problem is you cannot use "Integer a" in trigger 2. Integer a can only be used it loops such as the first on used in trigger 1. What is the AntiAirTowerGroup in trigger 2 supposed to be? What number did you THINK integer a was? Anyways, if you post alot of triggering questions, you might consider joining my new triggering forums! Check sig for link |
| 07-07-2004, 02:51 AM | #3 |
Okay, I am usually clear, it was late, sorry bout that. This is supposed to set the number of units available to sell in all tower types. The first testing trigger sets up dummy info to test if it works: StockCountUnitType[x] is the available stock StockUnitType[x] is the type of unit to be stocked Trigger 2 is only part of a trigger, sorry, for now, to test it, I have it in my player set up triggers, so that snipet runs through for all players (IntergerA). AntiAirTowerGroup[x] is a players group of a certain type of unit, the unit that is supposed to be able to sell the stock units (And yes they all have the sell unit ability) Anyway, the trigger worked fine until I switched the actual unit type and an integer to array entries, thats why I was wondering if you can use variables when doing the add unit for sell function. Hope that is more clear. Thanks. Edit: Erm, well everything is working now... I have no clue why it wasn't before :( oh well I guess |
