HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Redesh needs some trigger help.

12-18-2004, 04:48 PM#1
Redesh
This is a basic trigger but it won't work for some reason. I'm hoping that I can't see any noticable error.

Here's the triggers...

Events
Unit - A unit starts the effects of an ability
Conditions
And All (Conditions) are true
Conditions
(Ability being cast) Equal to Buy Iron Ore
Or - Any (conditions) are true
Conditions
(Unit - type of (Target unit of ability being cast) equal to Marketplace Buying Lumber
(Unit - type of (Target unit of ability being cast) equal to Marketplace
Actions
Set Wealth[(Integer((Name of (Owner of (Casting Unit)))))] = (Wealth[(Integer((Name of (Casting unit)))))] - 800.00)
Set Wealth[(Integer((Name of (Owner of (Target unit of ability being cast)))))] = (Wealth[(Integer((Name of (Target unit of ability being cast)))))] + 800.00)
Player - Add -500 to (Owner of (Target unit of ability being cast)) current Gold
Player - Add 500 to (Owner of (casting unit)) Gold

The above trigger doesn't subtract the variables to the owner of the target unit. But it does add and subtract the gold.

Here's the trigger that displays Wealth.

Events
Player - Player 1 (Red) types a chat message containing -OR as An exact match
Conditions
Actions
Game - Display to Player Group - Player 1 (Red) the Text (Wealth + (String(Wealth[(Integer((Name of Player 1 (Red))))])))

Any solutions to my problem?
12-19-2004, 04:16 PM#2
Guest
Quote:
Set Wealth[(Integer((Name of (Owner of (Casting Unit)))))] = (Wealth[(Integer((Name of (Casting unit)))))] - 800.00)


The indexes for those aren't the same. Also, shouldn't the index be the player number:

Quote:
Game - Display to Player Group - Player 1 (Red) the Text (Wealth + (String(Wealth[(Integer((Name of Player 1 (Red))))])))

Is the player's name an integer?
12-19-2004, 05:02 PM#3
Redesh
I figured that it should be player number on my own. But thank you anyways.
12-19-2004, 07:03 PM#4
Guest
You're welcome.