HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Some help with triggers

03-23-2008, 05:06 PM#1
E.M.C
Can someone help me out here? I have a simple problem with triggering (not JASS). I want to make a trigger that when unit is being targeted by spell it dies and effect is created on that place ( Item/Soul Theft).

So i tried like this:
Event- a unit finishes casting a spell
Conditions ( Which spell it is and which targets are not allowed)
Action- Unit Kill (Event response - Target of ability being cast)
Special Effect- Create special effect Item/Soul Theft on target area of spell (something like that)

Didn't work. Also tried with some more options like if/then/else actions. So, what should i do on this one?
03-23-2008, 05:15 PM#2
Rising_Dusk
  • Make sure the spell you're casting takes a target, otherwise it will kill nothing.
  • Change your event to "unit starts the effects of an ability" it's what you want for spell casts.
  • You probably don't need which targets are not allowed in your condition, you can more than likely use the "targets allowed" field in the object editor to achieve that with good accuracy.
  • If you target a unit, you don't target a point. There's a distinct difference. Either your special effect will work and the unit won't die or the unit will die and the special effect will show up at the center of the map.
You should consider posting a full trigger, not a pseudo-trigger. It usually helps in the analysis more. :p

Moved to the right forum, by the by.
03-23-2008, 07:26 PM#3
E.M.C
Yes it takes target, it's based on finger of death. I can't use 'targets allowed' because i want certain unit type not to be affected which can only be done with triggers.

I will try your advice and use Unit starts casting an ability. Btw, can I make a new trigger for effect? (Unit starts casting an ability , action- make special effect at target point of ability being cast...)?

Sry for wrong forum ^^
03-23-2008, 07:34 PM#4
RolePlaynGamer
Trigger:
Actions
Special Effect - Create a special effect at (Target point of ability being cast) using 'Your special effect'
03-23-2008, 08:05 PM#5
E.M.C
Yes I did that, but trigger as a whole wont work
03-23-2008, 08:06 PM#6
RolePlaynGamer
If you post your trigger i can tell you the error.
03-23-2008, 08:50 PM#7
E.M.C
Didn't u read my post above?
03-23-2008, 08:52 PM#8
RolePlaynGamer
Well ... It's a little hard to find an error from that one...
03-23-2008, 08:57 PM#9
RolePlaynGamer
It should look like this. If your trigger looks like this, and it doesn't work, then it's because you chose the wrong spell or a wrong special effect path.

Trigger:
Spell
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to 'Your Spell'
Collapse Actions
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using 'Your special effect path'
Unit - Kill (Target unit of ability being cast)
03-23-2008, 09:01 PM#10
E.M.C
Well that's the point. OK this was my entire trigger:
Event- Unit finished castina an ability
Condition - Ability being cast equal to Death's hand
-Target of ability being cast not equat to (few specific units i didnt want to die if being cast by spell)
Action- Unit - Kill (event response- target of abilit being cast)
Special Effect- Create special effect at target of ability being cast

P.S - bloody 600 seconds of waiting :P



Yeah rising dust told me to change the event so im going to do it now
03-23-2008, 09:16 PM#11
RolePlaynGamer
try the trigger without the non-target unit condition. And try to base it from channel.
03-23-2008, 09:43 PM#12
E.M.C
Read below...
03-23-2008, 09:50 PM#13
RolePlaynGamer
Do you create the special effect on the unit? Because if you create the effect on the unit, it dissapears when the unit dies. Create the effect at the POSITION of the unit.
03-23-2008, 09:55 PM#14
E.M.C
I made new trigger with the effect targeting a point of ability so it doesnt depends on unit. Didn't work before because i screwed up the event. Anyway i got what i was after, so thank u all for help
03-23-2008, 09:57 PM#15
RolePlaynGamer
You are not suposed to make the special effect on (Point of ability being cast) but on (Position of (Target of ability being cast))