| 01-01-2004, 09:59 PM | #1 |
What is suppose to Happen is my unit will play it Stand - 4 animation, then it will move to the targeted enemy, play its Attack Slam animation, and deal 500 damage. But why wont ti work? Trigger 1 Event: Unit - Shaolin Warrior (Holy) 0006 <gen> learns a skill Condition: (Leanred Hero Skill) Equal *My Spell* Action: Set CTHDInteger = (CTHDInteger + 1) Trigger 2 Event: Unit - Shaolin Warrior (Holy) 0006 <gen> Begins casting an ability Condition: (Ability being cast) Equal to *My Spell* Action: If (CTHDInteger Equal to 1) then do (Trigger - Run CTHD Level 1 <gen> (Ignoring Condition)) Else Do Nothing. Trigger 3 (CTHD Level 1) Set CTDHTarget = (Target unit of ability being cast) Animation - Play Shaolin Warriors (Holy) 0006 <gen> stand - 4 animation Wait 1.53 seconds Set CTDHTarget = (Target unit of ability being cast) Unit - Move Shaolin Warriors (Holy) 0006 <gen> instantly to (Position of CTDHTarget) Animation - Play Shaolin Warriors (Holy) 0006 <gen> attack slam animation Unit - Set life of CTHDTarget to ((Life of CTDHTarget) - 500.00) Wat 1.33 seconds Set CTDHTarget = (Target unit of ability being cast) Animation - Rester Shaolin Warrior (Holy) 0006 <gen>'s animation Now the problem is that the unit will just cast the spell, but just stand there. Whats wrong with the trigger? |
| 01-01-2004, 10:04 PM | #2 |
Hmm... I got a guess... Shaolin Warriors (Holy) 0006 <gen> That is an EXACT unit... trigger will not work if any other unit but that EXACT unit learns the ability/casts that ability... Are you sure its that unit that is casting it, and not another unit of the same type? Put some debug code in your triggers (you know "Send message to player" after every step to see if each step is actually working.) and test it again. |
| 01-01-2004, 10:05 PM | #3 |
Its for an AoS map, so yeh it only that unit casting it. |
| 01-01-2004, 10:14 PM | #4 |
AoS with hero selection? How does your hero selection work? Do you create a hero for the player or do you "Move instantly" the hero selected to the "Start" point and change ownership? Sorry if I seem to be stuck on the "Exact unit" portion of your trigger, but I didn't really see any other problems with your triggers... |
| 01-01-2004, 10:24 PM | #5 |
Code:
Trigger 1 Event: Unit - Shaolin Warrior (Holy) 0006 <gen> learns a skill Condition: (Leanred Hero Skill) Equal *My Spell* Action: Set CTHDInteger = (CTHDInteger + 1) Code:
Trigger 2 Event: Unit - Shaolin Warrior (Holy) 0006 <gen> Begins casting an ability Condition: (Ability being cast) Equal to *My Spell* Action: If (CTHDInteger Equal to 1) then do (Trigger - Run CTHD Level 1 <gen> (Ignoring Condition)) Else Do Nothing. Trigger 3 (CTHD Level 1) Set CTDHTarget = (Target unit of ability being cast) Animation - Play Shaolin Warriors (Holy) 0006 <gen> stand - 4 animation Wait 1.53 seconds Set CTDHTarget = (Target unit of ability being cast) Unit - Move Shaolin Warriors (Holy) 0006 <gen> instantly to (Position of CTDHTarget) Animation - Play Shaolin Warriors (Holy) 0006 <gen> attack slam animation Unit - Set life of CTHDTarget to ((Life of CTDHTarget) - 500.00) Wat 1.33 seconds Set CTDHTarget = (Target unit of ability being cast) Animation - Rester Shaolin Warrior (Holy) 0006 <gen>'s animation Now the problem is that the unit will just cast the spell, but just stand there. Whats wrong with the trigger? |
| 01-01-2004, 10:28 PM | #6 |
Trigger 3 (CTHD Level 1) Set CTDHTarget = (Target unit of ability being cast) Animation - Play Shaolin Warriors (Holy) 0006 <gen> stand - 4 animation Wait 1.53 seconds Set CTDHTarget = (Target unit of ability being cast) Unit - Move Shaolin Warriors (Holy) 0006 <gen> instantly to (Position of CTDHTarget) Animation - Play Shaolin Warriors (Holy) 0006 <gen> attack slam animation Unit - Set life of CTHDTarget to ((Life of CTDHTarget) - 500.00) Wat 1.33 seconds Set CTDHTarget = (Target unit of ability being cast) Animation - Rester Shaolin Warrior (Holy) 0006 <gen>'s animation In Theory this should make the Blademaster (Shaolin Warrio) play his Stand - 4 animation (Wait tine to play it), then move to the enemy, and play his Attack Slam animation, deal the damage (Wait for animation to finish) and then reset the BM animation back to default. But it wont work. The Hero is move Instanly, and changed owners. The Test show up, but the animations dont play |
| 01-01-2004, 10:34 PM | #7 |
Look here, in short terms, how's it going to know what the bloody fing hell the "Target unit of ability being cast" is? Just because you ran the trigger from Trigger X doesn't mean that this trigger is going to read Trigger X's events! And therefore, it cannot set the target unit of ability being cast to that variable "CTDHTarget". Trigger 3 (CTHD Level 1) Set CTDHTarget = (Target unit of ability being cast) Animation - Play Shaolin Warriors (Holy) 0006 <gen> stand - 4 animation Wait 1.53 seconds Set CTDHTarget = (Target unit of ability being cast) Unit - Move Shaolin Warriors (Holy) 0006 <gen> instantly to (Position of CTDHTarget) Animation - Play Shaolin Warriors (Holy) 0006 <gen> attack slam animation Unit - Set life of CTHDTarget to ((Life of CTDHTarget) - 500.00) Wat 1.33 seconds Set CTDHTarget = (Target unit of ability being cast) Animation - Rester Shaolin Warrior (Holy) 0006 <gen>'s animation |
| 01-01-2004, 10:38 PM | #8 |
Ok, so i added in Event: Shaolin Warrior begins casting an ability Condition: Ability Being Cast = *My Spell* but he STILL just stands there... uggggg |
| 01-01-2004, 10:43 PM | #9 |
Code:
Trigger 2
Event: Unit - Shaolin Warrior (Holy) 0006 <gen> Begins casting an ability
Condition: (Ability being cast) Equal to *My Spell*
Action:
If (CTHDInteger Equal to 1)
Then: Set CTDHTarget = (Target unit of ability being
cast)
Animation - Play Shaolin Warriors (Holy) 0006 <gen>
stand - 4 animation
Wait 1.53 seconds
Unit - Move Shaolin Warriors (Holy) 0006 <gen> instantly
to (Position of CTDHTarget)
Animation - Play Shaolin Warriors (Holy) 0006 <gen>
attack slam animation
Unit - Set life of CTHDTarget to ((Life of CTDHTarget) -
500.00)
Wait 1.33 seconds
Animation - Rester Shaolin Warrior (Holy) 0006 <gen>'s
animationWhat's rester mean? You mean reset? Anyways, next time you give in a trigger... Go click on the trigger's title Hit Edit -- Copy as text. Then type in "[code*]Ctrl+V[/code*]" Without the stars after the e in code. When you run trigger B from Trigger A, trigger B doesn't check events. It only checks the Conditions if you tell Trigger A to check the conditions. |
| 01-01-2004, 11:26 PM | #10 |
You know, with the new patch, you guys don't have to do use the Learn Hero Skill work around any more. There's an integer comparison to find out the level of abilities now. |
| 01-01-2004, 11:32 PM | #11 |
meh, i like the old way. If i use it then i know it will work. Btw it works now, except for a small glitch, but meh. |
