HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger edited spell problem

12-30-2003, 04:40 PM#1
Mozared
hello,

today i started to make my first trigger edited spell. just for a tryout, i tryed to make an alchemy spell wich brews healing potions.
now i got some questions:

1. it doesn't work, why?
2. how can i make it detect the spell level, thus letting it brew a stronger potion.



MY TRIGGER(S):

My attempt to regonize a level:
EVENT
Unit - a unit learns a skill
CONDITION
(Learned hero skill) Equal to Alchemy
ACTION
Set Lvl1alchemy = (learned skill level)
Trigger - turn on Learn lvl 2

"Learn lvl 2" is the same trigger, but with the Lvl1alchemy changed to Lvl2alchemy. this trigger also activated "Learn lvl 3", which again is the same but with changed Lvl2alchemy

for level 1:
EVENT
Unit - a unit finishes casting an ability
CONDITION
(Ability being cast) Equal to Alchemy
ACTION
If ((Learned skill level) Equal to Lvl1alchemy) then do Item - create smaller potion of healing at center of playable map area else do nothing
If ((Learned skill level) Equal to Lvl1alchemy) then give last created item to Casting unit

Same for level 2 and 3, but with the variables changed.


Can anybody help me with this?

mozared
12-31-2003, 08:49 PM#2
LegolasArcher
If you have TFT im pretty sure there a function when you use integers "Ability level of <Abil Here> on <Unit> (returns 0 if unit hasnt learned/have ability)"

So Have:
Code:
EVENT
Unit - a unit begins casting an ability
CONDITION
(Ability being cast) Equal to Alchemy
ACTION
If (Learned skill level of Alchemy on Casting Unit) then do Item create one <item> at position of Casting Unit else do nothing
If (Learned skill level of Alchemy on Casting Unit) then give last created item to Casting unit
12-31-2003, 08:52 PM#3
Mozared
i'l try it next year :D
thnx 4 responding.

mozared