HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Resurrection Aura

05-21-2007, 04:17 AM#1
Arcane
Code:
Resurrection Caster
    Events
        Unit - A unit Learns a skill
    Conditions
        (Level of Resurrection (Aurrius) for (Triggering unit)) Greater than or equal to 1
    Actions
        Set ResurrectionCaster = (Triggering unit)
        Custom script:   call DestroyTrigger( GetTriggeringTrigger() )

Code:
Resurrection Effect
    Events
        Unit - A unit Dies
    Conditions
    Actions
        Set ResurrectionLuckyNumber = (Random integer number between 1 and 100)
        Set ResurrectCasterPoint = (Position of ResurrectionCaster)
        Set ResurrectTargetPoint = (Position of (Triggering unit))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Level of Resurrection for ResurrectionCaster) Equal to 1) and ((ResurrectionLuckyNumber Greater than or equal to 90) and (((Integer((Distance between ResurrectCasterPoint and ResurrectTargetPoint))) Less than or equal to 1000) and ((((Triggering unit) is A Hero) Equal to False) and ((((Triggering unit) belongs to an all
            Then - Actions
                Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of ResurrectionCaster) at ResurrectTargetPoint facing Default building facing degrees
                Unit - Create 1 Resurrection (Light) for (Owner of ResurrectionCaster) at ResurrectTargetPoint facing Default building facing degrees
                Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Level of Resurrection for ResurrectionCaster) Equal to 2) and ((ResurrectionLuckyNumber Greater than or equal to 80) and (((Integer((Distance between ResurrectCasterPoint and ResurrectTargetPoint))) Less than or equal to 1000) and ((((Triggering unit) is A Hero) Equal to False) and ((((Triggering unit) belongs to an all
                    Then - Actions
                        Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of ResurrectionCaster) at ResurrectTargetPoint facing Default building facing degrees
                        Unit - Create 1 Resurrection (Light) for (Owner of ResurrectionCaster) at ResurrectTargetPoint facing Default building facing degrees
                        Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Level of Resurrection for ResurrectionCaster) Equal to 3) and ((ResurrectionLuckyNumber Greater than or equal to 70) and (((Integer((Distance between ResurrectCasterPoint and ResurrectTargetPoint))) Less than or equal to 1000) and ((((Triggering unit) is A Hero) Equal to False) and ((((Triggering unit) belongs to an all
                            Then - Actions
                                Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at ResurrectTargetPoint facing Default building facing degrees
                                Unit - Create 1 Resurrection (Light) for (Owner of ResurrectionCaster) at ResurrectTargetPoint facing Default building facing degrees
                                Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
                            Else - Actions
                                Do nothing
        Custom script:   call RemoveLocation (udg_ResurrectTargetPoint)

Anybody have any idea what's wrong?

Edit: Fixed. It was the "destroy trigger" custom script that was causing the problems I think. After re-reading over the script, I also found that it looked extremely messy, I could've used 10*(level of ability) and less than or equal to.
05-21-2007, 01:37 PM#2
Vexorian
Well next time, you should explain what is wrong with the spell, for example what was it supposed to do and what was it actually doing.

I don't really think DestroyTrigger was the issue.
05-21-2007, 01:44 PM#3
Toink
Quote:
Code:
((Level of Resurrection for ResurrectionCaster) Equal to 1) and ((ResurrectionLuckyNumber Greater than or equal to 90) and (((Integer((Distance between ResurrectCasterPoint and ResurrectTargetPoint))) Less than or equal to 1000) and ((((Triggering unit) is A Hero) Equal to False) and ((((Triggering unit) belongs to an all

Brain... mel..ting..

Next time, please use [trigger] tags instead of that nasty code tag o_O

And you didn't tell us what was it supposed to do and what it is doing wrong, you just totally "anybody know what's wrong"-ed us in the face. =)
05-21-2007, 07:53 PM#4
Dil999
Trigger:
Resurrection Caster
Collapse Events
Unit - A unit Learns a skill
Collapse Conditions
(Level of Resurrection (Aurrius) for (Triggering unit)) Greater than or equal to 1
Collapse Actions
Set ResurrectionCaster = (Triggering unit)
Custom script: call DestroyTrigger( GetTriggeringTrigger() )
You can change the condition to a hero skill comparison - Learned hero skill equal to Ressurrection
05-21-2007, 10:16 PM#5
Pyritie
Lol instead of using the "And" condition thingy, wouldn't it be easier to use an "And - Multiple Conditions" instead? It would make your life a lot easier.
05-22-2007, 01:59 AM#6
Arcane
@Vexorian: Oh, the problem - it just wasn’t working. Sorry, I should have been more specific. I don’t know really now if that was the actual problem, since I changed the code a lot, but at least it works now.

@Toink: Trigger tags. Right.

@Dil999: Thanks for the tip.

@Pyritie: I did that after looking over the code – again and again - a while after posting this.
05-22-2007, 02:15 AM#7
Dil999
One last tip -
Instead of manually writing every level (if level is 1 then do....) just do:
100 - (Level of spell for unit * 10)
whenever something goes up by a set amount each level, you can use a formula instead of programming each level.
05-22-2007, 03:16 AM#8
Arcane
Quote:
Edit: Fixed. It was the "destroy trigger" custom script that was causing the problems I think. After re-reading over the script, I also found that it looked extremely messy, I could've used 10*(level of ability) and less than or equal to.

I know that. ^.^
05-22-2007, 03:02 PM#9
Pyritie
So can you edit your prevoius post so it actually has the [trigger] tags?