HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Why isnt this working?

02-09-2006, 09:48 AM#1
SmileyJeff
Trigger:
AI Hire
Collapse Events
Time - Every 5.00 seconds of game time
Conditions
Collapse Actions
Collapse Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked player) controller) Not equal to User
((Picked player) Current gold) Greater than or equal to 3000
((Picked player) Current lumber) Greater than or equal to 3
GoblinActive Equal to False
Collapse Then - Actions
Unit - Order Goblin Laboratory 0046 <gen> to train/upgrade to a Goblin Crusher
Player - Add -3 to (Picked player) Current lumber
Player - Add -3000 to (Picked player) Current gold
Else - Actions
Collapse Player Group - Pick every player in (All allies of Player 2 (Blue)) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked player) controller) Not equal to User
((Picked player) Current gold) Greater than or equal to 3000
((Picked player) Current lumber) Greater than or equal to 3
PandaActive Equal to False
Collapse Then - Actions
Unit - Order Panda Tavern 0047 <gen> to train/upgrade to a Pandaren Warrior
Player - Add -3 to (Picked player) Current lumber
Player - Add -3000 to (Picked player) Current gold
Else - Actions

It should be able to work when a computer player has 3000 gold and 3 lumber or more. But now it doesn't Why?
02-09-2006, 09:52 AM#2
Whitehorn
Who is allied to player 1 and player 2? Are they set to computer?
02-09-2006, 09:55 AM#3
SmileyJeff
Allies to player 1 are:
player 3,4,5

Allies to player 2 are:
player 6,7,8

I set them to computer slot when i play, so that i can choose to add a computer AI to play with me. The trigger above is mean for AI. But it is not set to computer as default in world editor.
02-09-2006, 09:57 AM#4
Whitehorn
Players 3, 4, 5, 6, 7, 8 are all computer, yes?
02-09-2006, 10:28 AM#5
SmileyJeff
Not all, either 1. 3,4,5 or 6,7,8 can be human players too.
02-09-2006, 10:38 AM#6
Whitehorn
Any chance on seeing GoblinActive and PandaActive?

Are you sure the computer players meet all the resource conditions?

You may want to put checks at stages to see which does and dosnt work (a game message).
02-09-2006, 10:48 AM#7
SmileyJeff
PandaActive or GoblinActive is activated when the laboratory or tavern sells a hired unit. It works fine with it. I made a cheat code, when i type -rich, it will give AI 5000 gold and 5 lumber. If they had it, a message will popup.

[edit]
I notice something weird, the message will only pop up once, even its under every 5 seconds event. Why?
02-09-2006, 04:46 PM#8
Captain Griffen
Firstly, that's bad triggering, as it's leaking with the player groups, twice every 5 seconds.

So, does the trigger actually run? That's the first point. Put in debugging messages to see what the trigger actually does, the different variables at each point, etc.