Need help. GUI spell!

13est

New Member
Reaction score
5
This is a spell that I posted for help a while ago, thanks to all who helped me.
But I will need some more help here it goes: My tower attacks, when the attack hits it deals 250 "fire" damge to all enemy units around the attacked unit. The trigger works fine except it also deals damage to my own units.

This is what I use.

Trigger 1
Code:
Event: Unit enters playable map area.
Action: Set "unit" = Entering unit
add to my trigger the event, unit takes damage
This above works fine.

Trigger 2
Code:
Event: (none) Event added by above trigger
Condition: - damage source = my tower of choise
Action: create dummy unit for owner of damage scourse at position of attacked unit.
Unit Group - Pick every unit in (units with 300 AoE of last created unit([U][I]Here's the problem[/I][/U]:banghead:*) and to actions
Loop - actions
cause last created unit to damage picked unit dealing 250 of attack type siege and damage type normal
Create special effect,
Destroy special effect
[loop stop]
wait 0.5 seconds
pick every units in units of type dummy unit and remove picked units from the game.

*Can I use - Pick units in 300 range matching condition? I tried but I can't get it to work.:confused:


(I don't have all the triggers or words in it, only the most important. If you want the whole I can add them. It looks just about this)

If I made it unclear just say that and I will try to correct me.<3

Any help will be helpful;)
 

turok255

New Member
Reaction score
30
So... it damages your units too? Okay heres a way to fix that.

Make a unit group variable and set it to enemy units only then have him damage the unit group.

That or.

Picked unit belongs to an enemy of player = to true.

Somthing along those lines will work.
 

WolSHaman

knowledgeably ignorant
Reaction score
51
instead of creating the unit at position of attacked unit, create the unit at position of unit(your variable), because it won't detect the attacked unit, but it should detect the position of unit
 

turok255

New Member
Reaction score
30
instead of creating the unit at position of attacked unit, create the unit at position of unit(your variable), because it won't detect the attacked unit, but it should detect the position of unit

From what i read it works just fine it just hits his units to and he dosen't want that.
 

13est

New Member
Reaction score
5
instead of creating the unit at position of attacked unit, create the unit at position of unit(your variable), because it won't detect the attacked unit, but it should detect the position of unit

If I do this wont all *variable* Unit be 'triggered'?
 

WolSHaman

knowledgeably ignorant
Reaction score
51
If I do this wont all *variable* Unit be 'triggered'?

Probably, but if you wanted to fix it you could make it so that the triggers read like this:
unit- a unit enters playable map area
action- add event <triggering unit> takes damage> to your other trigger


then for the other trigger have

unit- create one dummy unit for <owner of damage source> at <position of triggering unit> and then it should work.
 

13est

New Member
Reaction score
5
This doesn't fix the problem.

The problem is that it is targeting both enemy units adn allied units.
 

WolSHaman

knowledgeably ignorant
Reaction score
51
oh... well then instead do this action--->unit group- pick every unit in unit group matching condition-->boolean comparison, matching unit is an enemy of owner of damage source equal to true, then pick units and do action
action- create special effect etc.
create 1 dummy unit at position of picked unit
add expiration timer
order last created unit to damage picked unit, dealing X damage of type blah
 

13est

New Member
Reaction score
5
well then instead do this action--->unit group- pick every unit in unit group matching condition-->boolean comparison, matching unit is an enemy of owner of damage source equal to true, then pick units and do action

I can't seem to get the right trigger. Could you be more specific i'll try more it made me a bit smarter:D but still don't work.
 

turok255

New Member
Reaction score
30
Anyone ever feel like they are invisable? :rolleyes: Well it looks like he has you on the right course.
 
T

The Mapmaker

Guest
OK, your problem is that you did not specify the trigger to attack ONLY enemy units. Making the trigger attack all units within a 300 radius of the dummy unit is your problem. So you need to add a classification condition, which is usually a boolean.

And might I ask: Are you trying to make your tower do splash damage?

Edit: Looks like WolSH is already telling you the problem.
 

13est

New Member
Reaction score
5
This is what it looks like for now.
Doesn't damage the allied units anymore thank you all.
But it still appears bugged, it seems to attack twice or something.
It deals 500 damage and you can se the damage is 250. (it is not the armor made it deal 100%)




P.S. is there a better image upploader? I found it pretty hard to use it to attach god pictures.

Edit: I will contine with my map tomorow or after this weekend. (I'm going to my dad, he doesn't have wc3:()

Please don't close topic until I fixed it.
 

vypur85

Hibernate
Reaction score
803
Code:
wait 0.5 seconds
pick every units in units of type dummy unit and remove picked units from the game.
Dont use wait. Just give the dummy an expiration timer.

Code:
create dummy unit for owner of damage scourse at position of [B]attacked unit[/B].
There is no 'attacked unit'. Use 'triggering unit' instead.

Can I use - Pick units in 300 range matching condition?
Yes, you can. You already used it for the following line below:
Code:
...unit in (units with 300 AoE of last created unit(Here's the problem:banghead:*) and to actions
For the above code, there is 'Matching'. Click it. Then do this:
matching condition-->boolean comparison, matching unit is an enemy of owner of damage source equal to true, then pick units and do action

It's already been told to you by WolsH quite clearly i think. I have just copy and pasted for you. To make it more clear, this is what you actually need to do:
Code:
Unit Group - Pick every unit in (Units within 300.00 of (Position of (Last created unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Last created unit))) Equal to True)) and do (Actions)
    Loop - Actions

Hope i've made it clear enough, and it solves your problem :).

Edit: I've just seen your attached picture. In the Unit Group, Use 'Units in Range Matching Condition', NOT 'Units in Range'.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top