Warcraft III resources & community, 2003–2006 · archived

variable type for player properties?

11 posts
#1

variable type for player properties?

What kind of variable type player properties uses? I tried Interger and Real, they don't accept these.

I'm trying to make something like:

Player - Player 1 (Red)'s Current lumber becomes Greater than (lumber variable)
... etc for all players ...
#2
Yeah, there's the event "Player - Player 1 (Red)'s Current lumber becomes Greater than 1000.00" (though it sounds like you already know of it and are after the condition)...

The condition would be "(Player 1 (Red) Current lumber) Greater than 1000".
It's an Integer Comparison with the fuction "Player - Player Property".
#3
I know that, but if I make lumber triggers instead of properties variable:

Player 1 - 12 current lumber becomes greater than 0 event trigger
Player 1 - 12 current lumber becomes greater than 1
event trigger

and then I will have loads of trigger doing "on" and "off"

I want the variable type, so I only do 1 trigger:

Player 1 - 12 current lumber becomes greater than (variable)

.. then I only need a few "set variable = lumber number" in some triggers.
#4
I think you want to use a variable as an event ?
That is not possible
#5
Then why there's "variable" in event prompt screen... ah nevermind. I'm going alternative way. Problem solved.
#6
haloboycsI know that, but if I make lumber triggers instead of properties variable:

Player 1 - 12 current lumber becomes greater than 0 event trigger
Player 1 - 12 current lumber becomes greater than 1
event trigger

and then I will have loads of trigger doing "on" and "off"

I want the variable type, so I only do 1 trigger:

Player 1 - 12 current lumber becomes greater than (variable)

.. then I only need a few "set variable = lumber number" in some triggers.


Integer Variable, if I'm not wrong.
#7
Aye I wish I were able to use variable IN event part. But the thing is variable is in event prompt that it never is used. Silly Blizzard, I always thought it is possible.

My solution is this:

Anti Share Lumber 1
    Events
        Player - Player 2 (Blue)'s Current lumber becomes Greater than 0.00
        Player - Player 3 (Teal)'s Current lumber becomes Greater than 0.00
        Player - Player 4 (Purple)'s Current lumber becomes Greater than 0.00
        Player - Player 5 (Yellow)'s Current lumber becomes Greater than 0.00
        Player - Player 6 (Orange)'s Current lumber becomes Greater than 0.00
        Player - Player 8 (Pink)'s Current lumber becomes Greater than 0.00
        Player - Player 9 (Gray)'s Current lumber becomes Greater than 0.00
        Player - Player 10 (Light Blue)'s Current lumber becomes Greater than 0.00
        Player - Player 11 (Dark Green)'s Current lumber becomes Greater than 0.00
        Player - Player 12 (Brown)'s Current lumber becomes Greater than 0.00
    Conditions
    Actions
        Player - Add -1 to (Triggering player) Current lumber

Anti Share Lumber 2
    Events
        Player - Player 2 (Blue)'s Current lumber becomes Greater than 1.00
        ..
    Conditions
    Actions
        Player - Add -1 to (Triggering player) Current lumber

Anti Share Lumber 3
    Events
        Player - Player 2 (Blue)'s Current lumber becomes Greater than 2.00
        ..
    Conditions
    Actions
        Player - Add -1 to (Triggering player) Current lumber


See how silly is that :( .. I was hoping to put variable in "greater than (lumber limit)"

Or is there to put something like "Trade gold 20, CTRL Trade gold 100, Trade lumber 0, CTRL Trade lumber 0"?
#8
In gameplay constants you can change the amount of gold and lumber traded, right
And you may set the lumber amount to zero
#9
Ok can you tell me which? I only find the top 2.

First one "Ally Trading Increment - Control Click = 100"
Second "Ally Trading Increment - Normal Click = 20"

They effecting BOTH gold and lumber.. I do not want lumber to be tradeable, and leave gold tradeable.
#10
Then disable trading for BOTH, gold and lumber
and create a trigger like '-trade #player #gold'
were
'#player' is the playernumber OR playername of the target and
'#gold' the amount of gold that shall be send...

or do it via adding a 'trading'-spellbook to the hero.
in it several dummy skills with different gold-values set.

OnCast(whatever dummy skill)
display dialog to owner of triggering unit

the dialog contains a button for every (living) ally of the owner.


now you got some ways - proceed as you wish.
#11
Lord Raszul
or do it via adding a 'trading'-spellbook to the hero.
in it several dummy skills with different gold-values set.


Ohhh that's good idea, why I haven't think of it. I'm going to attempt on creating it.