HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

2 Questions

10-08-2006, 06:33 AM#1
D40-88
Hi, I've created a custom map with custom start locations so the "melee" triggers will not work.
I want to make it so the first hero for the player is given free of gold/lumber but only cost the 5 food like a melee game; how do I do that?

What are the triggers necessary to make it so when the player finishes building their first (and only first) altar (doesn't matter which race's altar), the player gets a specific amount of gold/lumber.
This is my backup plan is the first question cannot be answered!

Thanks!
10-10-2006, 05:00 AM#2
D40-88
OMG, no one ever had my problems?
No one ever wanted to play a custom game where the first hero comes free?
10-10-2006, 05:56 AM#3
Captain Griffen
Melee triggers don't stop working if you have custom start locations; it's just no longer a melee map (ie: nothing except terrain edited).

The 'Melee' triggers are what you are looking for, I presume.
10-10-2006, 06:16 AM#4
SentryIII
I'm gonna take a wild guess and say he has custom triggers.

Collapse JASS:
call SetPlayerState(Player(0), PLAYER_STATE_RESOURCE_HERO_TOKENS, bj_MELEE_STARTING_HERO_TOKENS)
10-10-2006, 08:02 AM#5
Fr0zenLord
Make 1 boolean variable (Array size of how many players you have)
(For example I use the name "ExtraMoney")

Trigger:
Event - A building begins construction
Conditions - ExtraMoney[Player Number Of owner Of Constructing unit] = true
Collapse Conditions Or any are true
- Unit type of contructing unit equal to "YourAltar1"
- unit type of constructing unit equal to 'YourAltar2"
Collapse Actions - add YourGold to owner of constructing unit
- add YourWood to owner of constructing unit
- set ExtraMoney[Player Number Of Owner Of constructing unit] = false

Ok, The part next to extra money [Player Number Of Owner of constructing unit] is its index - scroll down, find "Player Number" then you'll see "Owner of unit" click that then find "Constructing unit"
That will work once for each player

Btw where YourAltar1, do that for each (MAKE SURE, you have the condition "OR any Conditions are true", its at the very bottom of the condition list, its name is "Or" (i think)

Good luck ^_^

Edit, I think the event may be "A unit begins constructing" or "A building begins constructing"
10-10-2006, 09:10 PM#6
D40-88
Quote:
Originally Posted by SentryIII
I'm gonna take a wild guess and say he has custom triggers.

Collapse JASS:
call SetPlayerState(Player(0), PLAYER_STATE_RESOURCE_HERO_TOKENS, bj_MELEE_STARTING_HERO_TOKENS)

Yeah I have custom triggers which disables that melee trigger.

Quote:
Originally Posted by Fr0zenLord
Make 1 boolean variable (Array size of how many players you have)
(For example I use the name "ExtraMoney")

Trigger:
Event - A building begins construction
Conditions - ExtraMoney[Player Number Of owner Of Constructing unit] = true
Collapse Conditions Or any are true
- Unit type of contructing unit equal to "YourAltar1"
- unit type of constructing unit equal to 'YourAltar2"
Collapse Actions - add YourGold to owner of constructing unit
- add YourWood to owner of constructing unit
- set ExtraMoney[Player Number Of Owner Of constructing unit] = false

Ok, The part next to extra money [Player Number Of Owner of constructing unit] is its index - scroll down, find "Player Number" then you'll see "Owner of unit" click that then find "Constructing unit"
That will work once for each player

Btw where YourAltar1, do that for each (MAKE SURE, you have the condition "OR any Conditions are true", its at the very bottom of the condition list, its name is "Or" (i think)

Good luck ^_^

Edit, I think the event may be "A unit begins constructing" or "A building begins constructing"

Thanks, I'm gonna try that out ASAP. So glad someone can answer my question.

EDIT: Ok, I've tried it but have no idea how to find the "condition" thatr you stated. Is it boolean comparison, and which is it?
Also, what is Youaltar1? Is it a variable or an actual altar for each race?
10-12-2006, 05:53 AM#7
Fr0zenLord
Extra money is a boolean, array size (Number of players you have)

In boolean comparison, theres a dropdown box, above it, (that has a list of custom booleans in it) you select it from there

And YourAltar1 is a Unit type comparison

(Like, Unit type of constructing unit equal to Human Altar)
WARNING, its not a "Unit" comparison
10-12-2006, 07:03 AM#8
D40-88
Hi, I've included what I made so far. I think I've gotten everything except I couldn't find "constructing unit" anywhere!!!
I've attached a screen of my trigger.
Attached Images
File type: jpguntitled.JPG (35.1 KB)
10-12-2006, 07:27 AM#9
Fr0zenLord
Constructing unit = Constructing Structure, same thing :P XD

I think thats, it

So your trigger does this...

Soon as a building begins constructing if its (YourAltar) then add (YourGold) to the owner, and (YourWood) to the owner, and then not work for that player again

(If so you've got it XD)!
10-12-2006, 08:22 AM#10
SentryIII
Quote:
Originally Posted by D40-88
Yeah I have custom triggers which disables that melee trigger.

That's great to know...

...

So... did you try that function call I gave you? You know, the one that allows a player to train the first hero for free?
10-12-2006, 05:04 PM#11
D40-88
Quote:
Originally Posted by SentryIII
That's great to know...

...

So... did you try that function call I gave you? You know, the one that allows a player to train the first hero for free?

OK, I've just tried that and it works exactly like it should in a melee game.
How do you know about these preset functions, is there a contents?
It answers the 1st question I had but regardless, I thank all you guys who helped me!!!