Im quite new to the galaxy editor and my mapping knowledges are far back at the beginning of wc3.
Just for you to know how my experience is :o
My problem is as follows:
I created my hero, and the ability to place a litte bomb, everything works fine but now i want when the hero placed the bomb - change the button from "place the bomb" to "detonate the bomb" which (who did expect this) detonates the bomb.
atm my solution is to give the bomb an ability to explode it - which needs to be activated on the bomb right now, but i cant figure out how to tell the bomb to explode, when pressing the detonate button on the hero.. :)
Create a validator that only returns true for the bomb.
Create an "Issue Order" effect that checks the validator and issues the order to detonate.
Create a "Search" effect with unlimited range that uses the Issue Order you just set up.
Create an ability that uses the Search effect.
Make some requirements and apply them to the abilities. Requirements can count how many units a player owns, so you can make a requirement with a "Show" which counts the number of bombs and only shows if the count is 0, and then another one that shows when the count is 1 or more. You can even put both buttons on the same command card location because only one will show at a time.
they are attached to each ability (pocket bomb - for placing a bomb & Boom! for detonating)
but if i want to test it, ingame it only shows the pocket bomb ability, eiter or not i place a various number of bombs, the Boom ability wont appear (i havent put the buttons on the same location @ the command card)
Did you add "pocketbomb" to the Tech Alias field of the unit's data? I forgot to mention that part. That's how it gets counted by the tech (and you can actually count units of different types for the same requirement by giving them the same alias)
You need to put the same requirements under "Use" as well. I didn't think about this earlier, but merely hiding the button may not stop a player from queuing up the ability several times before it the unit ever gets placed.
mh something is wrong and i already dont know what.
for further explanation: The pocket bomb ability creates a unit (pocket bomb). The Boom! ability orders the bomb to destroy itself with the given effects.
If you mean i have to add the "pocketbomb" to the Tech Alias field of the pocket bomb itself - ive done it - nothing changed :D
the interesting thing is when i add the "pocketbomb" to the Tech alias field of my hero -> the abilities change - i can only hit the Boom! button - no suprise - because "pocketbomb" is 1, because there is the hero with that tech alias.
it doesnt seem to work correct with the created units from the ability "Pocket Bomb" that creates the bomb units...
well and i put the requirements under "Use" also.
do i also have to place the requirements where i add the abilites to the command card?
The Hero shouldn't have the Tech Alias. You don't want to count the Hero as a bomb for purposes of determining whether or not the Hero has placed any bombs. If you count the Hero, then the count is always going to be at least one.
for now, its enough if i have both buttons next to each other, but thx 4 the help :)
ill try it tomorrow, maybe theres another way to realize this
update: after some trys with the trigger editor finally i got it done - with 2 simple triggers, not what i wanted originally but it works fine so far :)
Hi out there!
Im quite new to the galaxy editor and my mapping knowledges are far back at the beginning of wc3. Just for you to know how my experience is :o
My problem is as follows:
I created my hero, and the ability to place a litte bomb, everything works fine but now i want when the hero placed the bomb - change the button from "place the bomb" to "detonate the bomb" which (who did expect this) detonates the bomb.
atm my solution is to give the bomb an ability to explode it - which needs to be activated on the bomb right now, but i cant figure out how to tell the bomb to explode, when pressing the detonate button on the hero.. :)
i hope someone can help me
greets
@Cryfor: Go
Create a validator that only returns true for the bomb. Create an "Issue Order" effect that checks the validator and issues the order to detonate. Create a "Search" effect with unlimited range that uses the Issue Order you just set up. Create an ability that uses the Search effect.
thx, i found another way myself but ill try yours too.
the only thing i need to figure out is how to change the button @ my hero after planting a bomb to the detonate button - with the detonate ability
@Cryfor: Go
Make some requirements and apply them to the abilities. Requirements can count how many units a player owns, so you can make a requirement with a "Show" which counts the number of bombs and only shows if the count is 0, and then another one that shows when the count is 1 or more. You can even put both buttons on the same command card location because only one will show at a time.
hmm maybe i'm too stupid or dont see it right
my requirements:
bombdeploy (Species: Terran, Techtype: Ability)
contains under "show": CountUnit(pocketbomb,Total) == 0
bombdetonate (Species: Terran, Techtype: Ability)
contains under "show": CountUnit(pocketbomb,Total) >= 1
they are attached to each ability (pocket bomb - for placing a bomb & Boom! for detonating)
but if i want to test it, ingame it only shows the pocket bomb ability, eiter or not i place a various number of bombs, the Boom ability wont appear (i havent put the buttons on the same location @ the command card)
so whats wrong? :o
@Cryfor: Go
Did you add "pocketbomb" to the Tech Alias field of the unit's data? I forgot to mention that part. That's how it gets counted by the tech (and you can actually count units of different types for the same requirement by giving them the same alias)
You need to put the same requirements under "Use" as well. I didn't think about this earlier, but merely hiding the button may not stop a player from queuing up the ability several times before it the unit ever gets placed.
mh something is wrong and i already dont know what.
for further explanation: The pocket bomb ability creates a unit (pocket bomb). The Boom! ability orders the bomb to destroy itself with the given effects.
If you mean i have to add the "pocketbomb" to the Tech Alias field of the pocket bomb itself - ive done it - nothing changed :D
the interesting thing is when i add the "pocketbomb" to the Tech alias field of my hero -> the abilities change - i can only hit the Boom! button - no suprise - because "pocketbomb" is 1, because there is the hero with that tech alias.
it doesnt seem to work correct with the created units from the ability "Pocket Bomb" that creates the bomb units...
well and i put the requirements under "Use" also.
do i also have to place the requirements where i add the abilites to the command card?
@Cryfor: Go
The Hero shouldn't have the Tech Alias. You don't want to count the Hero as a bomb for purposes of determining whether or not the Hero has placed any bombs. If you count the Hero, then the count is always going to be at least one.
yeah i know, i removed it from the hero, it doesnt work either :\
@MasterDinadan: Go
I tried to get it to work myself and I'm running into problems. It may be easier just to use triggers.
for now, its enough if i have both buttons next to each other, but thx 4 the help :)
ill try it tomorrow, maybe theres another way to realize this
update: after some trys with the trigger editor finally i got it done - with 2 simple triggers, not what i wanted originally but it works fine so far :)