Warcraft III resources & community, 2003–2006 · archived

Resources

9 posts
#1

Resources

I get tired of only having lumber, gold, and food so i want to make a map where u need lumber, food/population as a whole, gold/gems, water, stone, and the amount of soldiers you have.

Is there anything in spells or does anyone know how to make one. I'm trying to use it in my roman map so it is more realistic. If anyone has any other ideas plz tell me.
#2
Variables and a Leaderboard for each player. Use indexes... if you need more help, PM me.
--donut3.5--
#3
i was thinking about that but how do u subtract the resource if u spend some stone for instance say something costs 50 stone but i only have 10 on the leaderboard how to i stop it from working. like amount in stone=50 o rmore to spend
#4
This is how I would do it.
First you would need to create a variable for the resource being spent.
(Lets say a "temple" costs 10 gems. Lets make an integer variable [P1Gems].)

Trigger name: BuildingTemple

Events
Unit finishes construction

Conditions
Unit-type of (Constructed Structure) equal to (Temple)

Actions
If/
Owner of (Constructed Structure) equal to (Player 1 Red) AND [P1Gems] equal to or greater than 10
Then/
Do Nothing
Else/
Remove (Constructed Structure)
Message to Owner of (Constructed Structure): "You haven't got enough resources to build this building".

Of course you need need to make If/Then/Else triggers for however many players there are in the game. Thats just how I would do it - other people might have other ways :)
#5
thankyou for you help i will try that
#6
how do i find the p1 gems thing i made the variable. i was making the condition, i got the half about owner of unit but to find integer condition that sais the varibable is greater then 10 i cant find it
#7
I'd do it differently:

Variablelist:
Gems : Integer Variable : Array from 12
Constructingplayer : integer variable

Trigger name: BuildingTemple
events: unit begins constructing
conditions: unit-type of constructed structure = temple
actions: set Constructingplayer= Player number of owner of constructing structure
If: Gems[Constructingplayer] >= 10
then: set Gems [constructingplayer]= (Gems[constructingplayer] - 10)
else: remove constructing unit from the game
Message to owner of constructing structure : blabla

EDITED The constructingplayer
#8
is (contructingplayer) suppoose to be a player variable not integer
#9
Constructing Player is (Owner of (Constructing Unit), its an event response. You can use my method or Eleandors method, whichever one you find more comfortable/easier, they both work.