HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

About changging hero

12-02-2003, 05:43 AM#1
huan1988
My Tringger as below:
Events
-Unit-A unnit owned by by Player(Red)Gains a level
-Unit-A unnit owned by by Player(Blue)Gains a level
-Unit-A unnit owned by by Player(Teal)Gains a level
-Unit-A unnit owned by by Player(Pink)Gains a level
-Unit-A unnit owned by by Player(Gray)Gains a level
-Unit-A unnit owned by by Player(Brown)Gains a level
-Conditions
-(Hero level of (triggering unnit)) Egual to 10
-Action
-Set NewHeroPlayer=(owner of (tringgering unit))
-Set NewheroPoint =(Position of (Tringgering Unit))
-Set NewHeroFacing=(Facing of (Tringgering Unit))
-For each(integer A)from 1 to 6 ,do(Set SavedItems((inthegerA))=(item-type of(item carried by (triggering unit) in slot (integer A))))
-If ((Unit-type of (Triggering unit))Equal to Warden)then do (set Herochange=Demon)else do (Do nothing)
If ((Unit-type of (Triggering unit))Equal to Warden)then do (set Herochange=Demon)else do (Do nothing)
-----Remove the old hero and instantly switch in new one-------
-Unit-remove (Triggering unit) from the game
-Unit-Create 1 Herochange for NewheroPoint facing NewHeroFacing degrees
-For each(integer A)from 1 to 6,do (if(SavedItems((interger A)) Not equan to (Item-type of No item))then do (hero-create Saveditem((integer A))and give it to (last created unnit))else do(do nothing)
-Hero-Make NewHeroPlayer Heroes gain 60% experience from future Kills
-Hero-Modify unspent skill points of (last created unit): Add 2 Points
-Wait 30.00 seconds
-Set HeroLevel((Player number of (triggering player))=1
-Turn off this tringger

But still cannot aticve at all,it will change hero1 to hero2 when hero1 10lv,but when hero2 10lv,it also will change hero2 again>.<,i want the hero1 change to hero 2 then stop change to hero2 again.Wat action or wat can add then this trigger just active fully?
12-02-2003, 05:49 AM#2
ObsidianTitan
all you need to do is add another condition
(Unit-type of (Triggering unit)) Equal to hero1
12-02-2003, 05:50 AM#3
huan1988
Nop understand>.<can write out add where?thks
12-02-2003, 06:16 AM#4
ObsidianTitan
add the condition with the level 10 condition.

another thing that can fix this is create an intiger that is initially 1, check that it is 1 in the conditions(main conditions that is) then set it +1 in the trigger.

I just rered what you had and the reason why it is multidoing it is because it is still changes the unit, and it is just looking at your herochange (since you didnt change what hero change is it is still changing the hero to that unit)
12-02-2003, 06:21 AM#5
huan1988
Still nop understand...wat level 10condition?
12-02-2003, 06:34 AM#6
Hivemind
-Conditions
-(Hero level of (triggering unnit)) Egual to 10

That is the part he is talking about.
12-02-2003, 06:42 AM#7
ObsidianTitan
ok ill try to explain my using your tigger, i slightly changed it from what i told you
Create an intiger array named herocheck and set 1-12 of it equal to 1

Events
-Unit-A unnit owned by by Player(Red)Gains a level
-Unit-A unnit owned by by Player(Blue)Gains a level
-Unit-A unnit owned by by Player(Teal)Gains a level
-Unit-A unnit owned by by Player(Pink)Gains a level
-Unit-A unnit owned by by Player(Gray)Gains a level
-Unit-A unnit owned by by Player(Brown)Gains a level
-Conditions
-(Hero level of (triggering unnit)) Egual to 10
-herocheck[(Player number of (Owner of (Triggering unit)))] Equal to 1 (NEW)
-Action
-Set herocheck[(Player number of (Owner of (Triggering unit)))] = (herocheck[(Player number of (Owner of (Triggering unit)))] + 1) (NEW)
-Set NewHeroPlayer=(owner of (tringgering unit))
-Set NewheroPoint =(Position of (Tringgering Unit))
-Set NewHeroFacing=(Facing of (Tringgering Unit))
-For each(integer A)from 1 to 6 ,do(Set SavedItems((inthegerA))=(item-type of(item carried by (triggering unit) in slot (integer A))))
-If ((Unit-type of (Triggering unit))Equal to Warden)then do (set Herochange=Demon)else do (Do nothing)
If ((Unit-type of (Triggering unit))Equal to Warden)then do (set Herochange=Demon)else do (Do nothing)
-----Remove the old hero and instantly switch in new one-------
-Unit-remove (Triggering unit) from the game
-Unit-Create 1 Herochange for NewheroPoint facing NewHeroFacing degrees
-For each(integer A)from 1 to 6,do (if(SavedItems((interger A)) Not equan to (Item-type of No item))then do (hero-create Saveditem((integer A))and give it to (last created unnit))else do(do nothing)
-Hero-Make NewHeroPlayer Heroes gain 60% experience from future Kills
-Hero-Modify unspent skill points of (last created unit): Add 2 Points
-Wait 30.00 seconds
-Set HeroLevel((Player number of (triggering player))=1
-Turn off this tringger

Should work now
12-02-2003, 07:45 AM#8
RicFaith
what I like to do is make the hero level continue after 10. So after 10 levels, I'd change to another form, and continue to level 20. After level 20, another form etc.

So you only need to check at the different levels, from 10 to 11, 20 to 21, etc... :)