| 08-19-2005, 08:41 PM | #1 |
I've tried and tried to make a custom attack system using spells and not the attack command but always failed. please help me. |
| 08-19-2005, 10:28 PM | #2 |
Hmmm... what precisely is the problem? |
| 08-19-2005, 11:23 PM | #3 |
it doesn't detect the spell being cast even though the trigger runs and no damage is done. Can someone help write a custom attack trigger? I'll give credit for the help in my maps credits |
| 08-20-2005, 01:20 PM | #4 |
Do you use "ability being cast"? or what do you use? That might be the problem |
| 08-20-2005, 02:52 PM | #5 |
Posting the non-working trigger would help... probably... |
| 08-20-2005, 04:40 PM | #6 |
Arrow abilities cannot be detected that way |
| 08-20-2005, 04:44 PM | #7 |
Here is the trigger: Code:
attack normal
Events
Unit - A unit Starts the effect of an ability
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Onion Staff Attack (Onion Staff)
(Ability being cast) Equal to Onion Sword Attack (Onion Sword)
Then - Actions
Set Defense[(Integer A)] = ((8.00 + ((Real((Intelligence of (Target unit of ability being cast) (Include bonuses)))) / 2.00)) + (Real((Hero level of (Target unit of ability being cast)))))
Set CBR[(Integer A)] = ((Attack[(Integer A)] - Defense[(Integer A)]) / Attack[(Integer A)])
Set Min_Damage[(Integer A)] = ((Dam[(Integer A)] + Bon[(Integer A)]) + (Sig[(Integer A)] x CBR[(Integer A)]))
Set Max_Damage[(Integer A)] = ((Dam[(Integer A)] + Bon[(Integer A)]) + (Sig[(Integer A)] x (CBR[(Integer A)] + 4.00)))
Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) - (Random real number between Min_Damage[(Player number of (Owner of (Triggering unit)))] and Max_Damage[(Player number of (Owner of (Triggering unit)))]))
Game - Display to (All players) the text: (((String(Min_Damage[(Player number of (Owner of (Triggering unit)))])) + - ) + (String(Max_Damage[(Player number of (Owner of (Triggering unit)))])))
Else - Actions
Do nothing |
| 08-20-2005, 04:45 PM | #8 |
No ability can be 2 abilities at the same time You were supposed to use the OR function there |
| 08-20-2005, 04:52 PM | #9 |
hold on let me quickly make the change and test it |
| 08-20-2005, 05:15 PM | #10 |
no damage was done. it doesn't detect which spell is being casted Nevermind, I figured it out. The trigger was too long. by the time the trigger was done running the spell was done casting. so it did nothing |
| 08-20-2005, 08:41 PM | #11 |
You didnt put an "For each Integer A from 1 - <> do actions" You just used Integer A in the actions which wont work |
