Issues With Transformation (Still unresolved =/)

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

Julian5
Member
Posts: 62
Joined: October 3rd, 2007, 4:17 am
Title: Dragon
Location: The land of dragons.

Issues With Transformation (Still unresolved =/)

Post by Julian5 »

I am currently making a hero defence...and in it is Sora. From kh2. =) Anyway, Sora's abilities so far are his drive forms. However, valor form and master form (I haven't added final yet) crash the game, while wisdom does not. I suspect this is due to my attack trigger, since it's the only thing valor and master share that wisdom doesn't. That, and when I turned it off, the thing worked fine. =/

Since my map is too big for the attachment limit....

http://www.divshare.com/download/3632759-42c

Oh, and I know there are a ton of memory leaks and stuff in my map....I'll go back through later and fix em. =P

If someone does help me, can the result be in GUI please. =/

THANKS to anyone that helps!

When the timer for the form duration expires, the game crashes [if I use valor and master].

Here is the trigger which creates the forms...and gives them xp...and stuff....:

Code: Select all

Form Spell
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Ability being cast) Equal to Valor Form 
                (Ability being cast) Equal to Wisdom Form 
                (Ability being cast) Equal to Master Form 
    Actions
        Set SoraItemCustomValue[1] = (Custom value of (Item carried by (Triggering unit) of type Valor Form Experience))
        Set SoraItemCustomValue[2] = (Custom value of (Item carried by (Triggering unit) of type Wisdom Form Experience))
        Set SoraItemCustomValue[3] = (Custom value of (Item carried by (Triggering unit) of type Master Form Experience))
        Set SoraItemCustomValue[4] = (Custom value of (Item carried by (Triggering unit) of type Final Form Experience))
        Hero - Drop the item from slot 5 of (Triggering unit)
        Set SoraDroppedItem[1] = (Last dropped item)
        Hero - Drop the item from slot 6 of (Triggering unit)
        Set SoraDroppedItem[2] = (Last dropped item)
        Set SoraLoc = (Position of (Triggering unit))
        Unit - Set the custom value of (Triggering unit) to (Player number of (Owner of (Triggering unit)))
        Unit - Change ownership of (Triggering unit) to Player 12 (Brown) and Change color
        Unit - Move (Triggering unit) instantly to (Center of Pause Hero Zone <gen>)
        Unit - Pause (Triggering unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Ability being cast) Equal to Valor Form 
            Then - Actions
                Unit - Create 1 Valor Form for (Player((Custom value of (Triggering unit)))) at SoraLoc facing Default building facing degrees
                Set SoraValor[(Player number of (Player((Custom value of (Triggering unit)))))] = (Last created unit)
                Trigger - Turn off FormHitsLevel5 <gen>
                Hero - Set (Last created unit) experience to SoraItemCustomValue[1], Hide level-up graphics
                Trigger - Turn on FormHitsLevel5 <gen>
                Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                Special Effect - Destroy (Last created special effect)
                Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
                Special Effect - Destroy (Last created special effect)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Ability being cast) Equal to Wisdom Form 
                    Then - Actions
                        Unit - Create 1 Wisdom Form for (Player((Custom value of (Triggering unit)))) at SoraLoc facing Default building facing degrees
                        Set SoraWisdom[(Player number of (Player((Custom value of (Triggering unit)))))] = (Last created unit)
                        Trigger - Turn off FormHitsLevel5 <gen>
                        Hero - Set (Last created unit) experience to SoraItemCustomValue[2], Hide level-up graphics
                        Trigger - Turn on FormHitsLevel5 <gen>
                        Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                        Special Effect - Destroy (Last created special effect)
                        Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Other\Charm\CharmTarget.mdl
                        Special Effect - Destroy (Last created special effect)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Ability being cast) Equal to Master Form 
                            Then - Actions
                                Unit - Create 1 Master Form for (Player((Custom value of (Triggering unit)))) at SoraLoc facing Default building facing degrees
                                Set SoraMaster[(Player number of (Player((Custom value of (Triggering unit)))))] = (Last created unit)
                                Trigger - Turn off FormHitsLevel5 <gen>
                                Hero - Set (Last created unit) experience to SoraItemCustomValue[3], Hide level-up graphics
                                Trigger - Turn on FormHitsLevel5 <gen>
                                Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                                Special Effect - Destroy (Last created special effect)
                                Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Orc\Disenchant\DisenchantSpecialArt.mdl
                                Special Effect - Destroy (Last created special effect)
                            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Hero level of (Triggering unit)) Greater than or equal to 15
                (Hero level of (Triggering unit)) Less than 30
            Then - Actions
                Unit - Set level of Fire  for (Last created unit) to 2
                Unit - Set level of Blizzard  for (Last created unit) to 2
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Hero level of (Triggering unit)) Equal to 30
                    Then - Actions
                        Unit - Set level of Fire  for (Last created unit) to 3
                        Unit - Set level of Blizzard  for (Last created unit) to 3
                    Else - Actions
        Set SoraForm[(Player number of (Player((Custom value of (Triggering unit)))))] = (Last created unit)
        Hero - Give SoraDroppedItem[1] to (Last created unit)
        Hero - Give SoraDroppedItem[2] to (Last created unit)
        Selection - Select (Last created unit) for (Player((Custom value of (Triggering unit))))
        Hero - Make (Player((Custom value of (Triggering unit)))) Heroes gain 0.00% experience from future kills
        Hero - Create Valor Form Experience and give it to (Last created unit)
        Item - Set the custom value of (Last created item) to SoraItemCustomValue[1]
        Hero - Create Wisdom Form Experience and give it to (Last created unit)
        Item - Set the custom value of (Last created item) to SoraItemCustomValue[2]
        Hero - Create Master Form Experience and give it to (Last created unit)
        Item - Set the custom value of (Last created item) to SoraItemCustomValue[3]
        Hero - Create Final Form Experience and give it to (Last created unit)
        Item - Set the custom value of (Last created item) to SoraItemCustomValue[4]
        Countdown Timer - Start SoraFormDuration as a One-shot timer that will expire in 120.00 seconds
        Countdown Timer - Create a timer window for SoraFormDuration with title Drive Form ends in....
        Set SoraFormDurationWindow[(Custom value of (Triggering unit))] = (Last created timer window)
        Countdown Timer - Hide SoraFormDurationWindow[(Custom value of (Triggering unit))]
        Countdown Timer - Show SoraFormDurationWindow[(Custom value of (Triggering unit))] for (Player((Custom value of (Triggering unit))))
        Wait 120.00 seconds
        <<<<<<<<<<<<<this is where the game crashes>>>>>>>>>>>>>>
        Countdown Timer - Destroy SoraFormDurationWindow[(Custom value of (Triggering unit))]
        Unit - Change ownership of (Triggering unit) to (Player((Custom value of (Triggering unit)))) and Change color
        Set SoraItemCustomValue[1] = (Custom value of (Item carried by SoraForm[(Player number of (Owner of (Triggering unit)))] of type Valor Form Experience))
        Set SoraItemCustomValue[2] = (Custom value of (Item carried by SoraForm[(Player number of (Owner of (Triggering unit)))] of type Wisdom Form Experience))
        Set SoraItemCustomValue[3] = (Custom value of (Item carried by SoraForm[(Player number of (Owner of (Triggering unit)))] of type Master Form Experience))
        Set SoraItemCustomValue[4] = (Custom value of (Item carried by SoraForm[(Player number of (Owner of (Triggering unit)))] of type Final Form Experience))
        Hero - Drop the item from slot 5 of SoraForm[(Player number of (Owner of (Triggering unit)))]
        Set SoraDroppedItem[1] = (Last dropped item)
        Hero - Drop the item from slot 6 of SoraForm[(Player number of (Owner of (Triggering unit)))]
        Set SoraDroppedItem[2] = (Last dropped item)
        Set SoraLoc = (Position of SoraForm[(Player number of (Owner of (Triggering unit)))])
        Set SoraValor[(Player number of (Owner of (Triggering unit)))] = No unit
        Set SoraWisdom[(Player number of (Owner of (Triggering unit)))] = No unit
        Set SoraMaster[(Player number of (Owner of (Triggering unit)))] = No unit
        Unit - Remove SoraForm[(Player number of (Owner of (Triggering unit)))] from the game
        Set SoraForm[(Player number of (Owner of (Triggering unit)))] = No unit
        Unit - Move (Triggering unit) instantly to SoraLoc
        Unit - Unpause (Triggering unit)
        Hero - Make (Owner of (Triggering unit)) Heroes gain 100.00% experience from future kills
        Item - Set the custom value of (Item carried by (Triggering unit) of type Valor Form Experience) to SoraItemCustomValue[1]
        Item - Set the custom value of (Item carried by (Triggering unit) of type Wisdom Form Experience) to SoraItemCustomValue[2]
        Item - Set the custom value of (Item carried by (Triggering unit) of type Master Form Experience) to SoraItemCustomValue[3]
        Item - Set the custom value of (Item carried by (Triggering unit) of type Final Form Experience) to SoraItemCustomValue[4]
        Hero - Give SoraDroppedItem[1] to (Triggering unit)
        Hero - Give SoraDroppedItem[2] to (Triggering unit)
        Selection - Select (Triggering unit) for (Owner of (Triggering unit))
        Player - Disable Valor Form  for (Owner of (Triggering unit))
        Player - Disable Wisdom Form  for (Owner of (Triggering unit))
        Player - Disable Master Form  for (Owner of (Triggering unit))
        Countdown Timer - Start SoraFormRecast as a One-shot timer that will expire in 180.00 seconds
        Countdown Timer - Create a timer window for SoraFormRecast with title Drive recast in...
        Set SoraFormRecastWindow[(Player number of (Owner of (Triggering unit)))] = (Last created timer window)
        Countdown Timer - Hide SoraFormRecastWindow[(Player number of (Owner of (Triggering unit)))]
        Countdown Timer - Show SoraFormRecastWindow[(Player number of (Owner of (Triggering unit)))] for (Owner of (Triggering unit))
        Wait 180.00 seconds
        Countdown Timer - Destroy SoraFormRecastWindow[(Player number of (Owner of (Triggering unit)))]
        Player - Enable Valor Form  for (Owner of (Triggering unit))
        Player - Enable Wisdom Form  for (Owner of (Triggering unit))
        Player - Enable Master Form  for (Owner of (Triggering unit))
Long. =/ Here is the trigger for the attack:

Code: Select all

Attack and XP Gain
    Events
        Player - Player 1 (Red) Presses the Up Arrow key
        Player - Player 2 (Blue) Presses the Up Arrow key
        Player - Player 3 (Teal) Presses the Up Arrow key
        Player - Player 4 (Purple) Presses the Up Arrow key
        Player - Player 5 (Yellow) Presses the Up Arrow key
        Player - Player 6 (Orange) Presses the Up Arrow key
        Player - Player 7 (Green) Presses the Up Arrow key
        Player - Player 8 (Pink) Presses the Up Arrow key
        Player - Player 9 (Gray) Presses the Up Arrow key
        Player - Player 10 (Light Blue) Presses the Up Arrow key
    Conditions
        ((Triggering player) is in SoraPGroup) Equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                SoraCombo[(Player number of (Triggering player))] Equal to 0
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        SoraValor[(Player number of (Triggering player))] Not equal to No unit
                        (Hero level of SoraValor[(Player number of (Triggering player))]) Less than 5
                    Then - Actions
                        For each (Integer A) from 1 to (Number of units in (Units in (Region centered at (Position of SoraValor[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown))), do (Actions)
                            Loop - Actions
                                Hero - Add 4 experience to SoraValor[(Player number of (Triggering player))], Show level-up graphics
                                Item - Set the custom value of (Item carried by SoraValor[(Player number of (Triggering player))] of type Valor Form Experience) to ((Custom value of (Item carried by SoraValor[(Player number of (Triggering player))] of type Valor Form Experience)) + 4)
                    Else - Actions
                Set SoraCombo[(Player number of (Triggering player))] = (SoraCombo[(Player number of (Triggering player))] + 50)
                Animation - Play Sora[(Player number of (Triggering player))]'s attack animation
                Animation - Play SoraValor[(Player number of (Triggering player))]'s attack animation
                Animation - Play SoraMaster[(Player number of (Triggering player))]'s attack animation
                Unit Group - Pick every unit in (Units in (Region centered at (Position of Sora[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown)) and do (Unit - Cause Sora[(Player number of (Triggering player))] to damage (Picked unit), dealing (50.00 x ((Real((Hero level of Sora[(Player number of (Triggering player))]))) x (1.50 x (Real((Agility of Sora[(Player number of (Triggering player))] (Include bonuse
                Unit Group - Pick every unit in (Units in (Region centered at (Position of SoraValor[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown)) and do (Unit - Cause SoraValor[(Player number of (Triggering player))] to damage (Picked unit), dealing (100.00 x ((Real((Hero level of SoraValor[(Player number of (Triggering player))]))) x (1.50 x (Real((Agility of SoraValor[(Player number of (Triggering player))]
                Unit Group - Pick every unit in (Units in (Region centered at (Position of SoraMaster[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown)) and do (Unit - Cause SoraMaster[(Player number of (Triggering player))] to damage (Picked unit), dealing (150.00 x ((Real((Hero level of SoraMaster[(Player number of (Triggering player))]))) x (1.75 x (Real((Agility of SoraMaster[(Player number of (Triggering player
                Wait 0.45 seconds
                Set SoraCombo[(Player number of (Triggering player))] = (SoraCombo[(Player number of (Triggering player))] - 49)
                Wait 2.00 seconds
                If (SoraCombo[(Player number of (Triggering player))] Less than 4) then do (Set SoraCombo[(Player number of (Triggering player))] = 0) else do (Do nothing)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        SoraCombo[(Player number of (Triggering player))] Equal to 1
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                SoraValor[(Player number of (Triggering player))] Not equal to No unit
                                (Hero level of SoraValor[(Player number of (Triggering player))]) Less than 5
                            Then - Actions
                                For each (Integer A) from 1 to (Number of units in (Units in (Region centered at (Position of SoraValor[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown))), do (Actions)
                                    Loop - Actions
                                        Hero - Add 4 experience to SoraValor[(Player number of (Triggering player))], Show level-up graphics
                                        Item - Set the custom value of (Item carried by SoraValor[(Player number of (Triggering player))] of type Valor Form Experience) to ((Custom value of (Item carried by SoraValor[(Player number of (Triggering player))] of type Valor Form Experience)) + 4)
                            Else - Actions
                        Set SoraCombo[(Player number of (Triggering player))] = (SoraCombo[(Player number of (Triggering player))] + 50)
                        Animation - Play Sora[(Player number of (Triggering player))]'s attack animation
                        Animation - Play SoraValor[(Player number of (Triggering player))]'s attack animation
                        Animation - Play SoraMaster[(Player number of (Triggering player))]'s attack animation
                        Unit Group - Pick every unit in (Units in (Region centered at (Position of Sora[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown)) and do (Unit - Cause Sora[(Player number of (Triggering player))] to damage (Picked unit), dealing (100.00 x ((Real((Hero level of Sora[(Player number of (Triggering player))]))) x (2.00 x (Real((Agility of Sora[(Player number of (Triggering player))] (Include bonus
                        Unit Group - Pick every unit in (Units in (Region centered at (Position of SoraValor[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown)) and do (Unit - Cause SoraValor[(Player number of (Triggering player))] to damage (Picked unit), dealing (175.00 x ((Real((Hero level of SoraValor[(Player number of (Triggering player))]))) x (2.00 x (Real((Agility of SoraValor[(Player number of (Triggering player))]
                        Unit Group - Pick every unit in (Units in (Region centered at (Position of SoraMaster[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown)) and do (Unit - Cause SoraMaster[(Player number of (Triggering player))] to damage (Picked unit), dealing (200.00 x ((Real((Hero level of SoraMaster[(Player number of (Triggering player))]))) x (2.25 x (Real((Agility of SoraMaster[(Player number of (Triggering player
                        Wait 0.45 seconds
                        Set SoraCombo[(Player number of (Triggering player))] = (SoraCombo[(Player number of (Triggering player))] - 49)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                SoraCombo[(Player number of (Triggering player))] Equal to 2
                            Then - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        SoraValor[(Player number of (Triggering player))] Not equal to No unit
                                        (Hero level of SoraValor[(Player number of (Triggering player))]) Less than 5
                                    Then - Actions
                                        For each (Integer A) from 1 to (Number of units in (Units in (Region centered at (Position of SoraValor[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown))), do (Actions)
                                            Loop - Actions
                                                Hero - Add 4 experience to SoraValor[(Player number of (Triggering player))], Show level-up graphics
                                                Item - Set the custom value of (Item carried by SoraValor[(Player number of (Triggering player))] of type Valor Form Experience) to ((Custom value of (Item carried by SoraValor[(Player number of (Triggering player))] of type Valor Form Experience)) + 4)
                                    Else - Actions
                                Set SoraCombo[(Player number of (Triggering player))] = (SoraCombo[(Player number of (Triggering player))] + 50)
                                Animation - Play Sora[(Player number of (Triggering player))]'s attack animation
                                Animation - Play SoraValor[(Player number of (Triggering player))]'s attack animation
                                Animation - Play SoraMaster[(Player number of (Triggering player))]'s attack animation
                                Unit Group - Pick every unit in (Units in (Region centered at (Position of Sora[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown)) and do (Unit - Cause Sora[(Player number of (Triggering player))] to damage (Picked unit), dealing (150.00 x ((Real((Hero level of Sora[(Player number of (Triggering player))]))) x (2.50 x (Real((Agility of Sora[(Player number of (Triggering player))] (Include bonus
                                Unit Group - Pick every unit in (Units in (Region centered at (Position of SoraValor[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown)) and do (Unit - Cause SoraValor[(Player number of (Triggering player))] to damage (Picked unit), dealing (250.00 x ((Real((Hero level of SoraValor[(Player number of (Triggering player))]))) x (2.25 x (Real((Agility of SoraValor[(Player number of (Triggering player))]
                                Unit Group - Pick every unit in (Units in (Region centered at (Position of SoraMaster[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown)) and do (Unit - Cause SoraMaster[(Player number of (Triggering player))] to damage (Picked unit), dealing (250.00 x ((Real((Hero level of SoraMaster[(Player number of (Triggering player))]))) x (2.75 x (Real((Agility of SoraMaster[(Player number of (Triggering player
                                Wait 0.45 seconds
                                Set SoraCombo[(Player number of (Triggering player))] = (SoraCombo[(Player number of (Triggering player))] - 49)
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        SoraCombo[(Player number of (Triggering player))] Equal to 3
                                    Then - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                SoraValor[(Player number of (Triggering player))] Not equal to No unit
                                                (Hero level of SoraValor[(Player number of (Triggering player))]) Less than 5
                                            Then - Actions
                                                For each (Integer A) from 1 to (Number of units in (Units in (Region centered at (Position of SoraValor[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown))), do (Actions)
                                                    Loop - Actions
                                                        Hero - Add 4 experience to SoraValor[(Player number of (Triggering player))], Show level-up graphics
                                                        Item - Set the custom value of (Item carried by SoraValor[(Player number of (Triggering player))] of type Valor Form Experience) to ((Custom value of (Item carried by SoraValor[(Player number of (Triggering player))] of type Valor Form Experience)) + 4)
                                            Else - Actions
                                        Set SoraCombo[(Player number of (Triggering player))] = (SoraCombo[(Player number of (Triggering player))] + 50)
                                        Animation - Play Sora[(Player number of (Triggering player))]'s slam animation
                                        Animation - Play SoraValor[(Player number of (Triggering player))]'s slam animation
                                        Animation - Play SoraMaster[(Player number of (Triggering player))]'s slam animation
                                        Unit Group - Pick every unit in (Units in (Region centered at (Position of Sora[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown)) and do (Unit - Cause Sora[(Player number of (Triggering player))] to damage (Picked unit), dealing (200.00 x ((Real((Hero level of Sora[(Player number of (Triggering player))]))) x (3.00 x (Real((Agility of Sora[(Player number of (Triggering player))] (Include bonus
                                        Unit Group - Pick every unit in (Units in (Region centered at (Position of SoraValor[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown)) and do (Unit - Cause SoraValor[(Player number of (Triggering player))] to damage (Picked unit), dealing (300.00 x ((Real((Hero level of SoraValor[(Player number of (Triggering player))]))) x (2.75 x (Real((Agility of SoraValor[(Player number of (Triggering player))]
                                        Unit Group - Pick every unit in (Units in (Region centered at (Position of SoraMaster[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown)) and do (Unit - Cause SoraMaster[(Player number of (Triggering player))] to damage (Picked unit), dealing (350.00 x ((Real((Hero level of SoraMaster[(Player number of (Triggering player))]))) x (3.25 x (Real((Agility of SoraMaster[(Player number of (Triggering player
                                        Special Effect - Create a special effect at (Position of Sora[(Player number of (Triggering player))]) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                                        Special Effect - Destroy (Last created special effect)
                                        Special Effect - Create a special effect at (Position of SoraValor[(Player number of (Triggering player))]) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                                        Special Effect - Destroy (Last created special effect)
                                        Wait 0.45 seconds
                                        Set SoraCombo[(Player number of (Triggering player))] = (SoraCombo[(Player number of (Triggering player))] - 49)
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                SoraValor[(Player number of (Triggering player))] Not equal to No unit
                                            Then - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        SoraValor[(Player number of (Triggering player))] Not equal to No unit
                                                        (Hero level of SoraValor[(Player number of (Triggering player))]) Less than 5
                                                    Then - Actions
                                                        For each (Integer A) from 1 to (Number of units in (Units in (Region centered at (Position of SoraValor[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown))), do (Actions)
                                                            Loop - Actions
                                                                Hero - Add 4 experience to SoraValor[(Player number of (Triggering player))], Show level-up graphics
                                                                Item - Set the custom value of (Item carried by SoraValor[(Player number of (Triggering player))] of type Valor Form Experience) to ((Custom value of (Item carried by SoraValor[(Player number of (Triggering player))] of type Valor Form Experience)) + 4)
                                                    Else - Actions
                                                Animation - Play SoraValor[(Player number of (Triggering player))]'s slam animation
                                                Unit Group - Pick every unit in (Units in (Region centered at (Position of SoraValor[(Player number of (Triggering player))]) with size (400.00, 400.00)) owned by Player 12 (Brown)) and do (Unit - Cause SoraValor[(Player number of (Triggering player))] to damage (Picked unit), dealing (400.00 x ((Real((Hero level of SoraValor[(Player number of (Triggering player))]))) x (3.25 x (Real((Agility of SoraValor[(Player number of (Triggering player))]
                                                For each (Integer A) from 1 to 6, do (Actions)
                                                    Loop - Actions
                                                        Special Effect - Create a special effect at ((Position of SoraValor[(Player number of (Triggering player))]) offset by 200.00 towards (100.00 x (Real((Integer A)))) degrees) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                                                        Special Effect - Destroy (Last created special effect)
                                                Wait 0.45 seconds
                                            Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                SoraMaster[(Player number of (Triggering player))] Equal to No unit
                                            Then - Actions
                                                Wait 0.45 seconds
                                                Set SoraCombo[(Player number of (Triggering player))] = 0
                                            Else - Actions
                                                Wait 4.50 seconds
                                                Set SoraCombo[(Player number of (Triggering player))] = 0
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                SoraCombo[(Player number of (Triggering player))] Equal to 4
                                                SoraMaster[(Player number of (Triggering player))] Not equal to No unit
                                            Then - Actions
                                                Set SoraCombo[(Player number of (Triggering player))] = (SoraCombo[(Player number of (Triggering player))] + 50)
                                                Animation - Play SoraMaster[(Player number of (Triggering player))]'s slam animation
                                                Unit - Make SoraMaster[(Player number of (Triggering player))] Invulnerable
                                                Wait 0.20 seconds
                                                Animation - Change SoraMaster[(Player number of (Triggering player))]'s animation speed to 0.10% of its original speed
                                                Unit - Pause SoraMaster[(Player number of (Triggering player))]
                                                Trigger - Turn on MasterFormFinalAttack <gen>
                                                Unit - Make SoraMaster[(Player number of (Triggering player))] Vulnerable
                                            Else - Actions
Master form has 2 additional triggers for its attacks, which are disabled until used:

Code: Select all

MasterFormFinalAttack
    Events
        Time - Every 0.10 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Region centered at (Position of SoraMaster[(Player number of (Triggering player))]) with size (1000.00, 1000.00)) owned by Player 12 (Brown)) and do (Unit - Move (Picked unit) instantly to ((Position of SoraMaster[(Player number of (Triggering player))]) offset by ((Distance between (Position of (Picked unit)) and (Position of SoraMaster[(Player number of (Triggering player))])) - 10.00) towards (Angle fr
        Unit - Pause (Picked unit)
        For each (Integer A) from 1 to 7, do (Actions)
            Loop - Actions
                Special Effect - Create a special effect at ((Position of SoraMaster[(Player number of (Triggering player))]) offset by 250.00 towards (50.00 x (Real((Integer A)))) degrees) using Abilities\Spells\Items\AIvi\AIviTarget.mdl
                Special Effect - Destroy (Last created special effect)
        Set SoraMasterFinalAttackCount[(Player number of (Triggering player))] = ((SoraMasterFinalAttackCount[(Player number of (Triggering player))] + 1) + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                SoraMasterFinalAttackCount[(Player number of (Triggering player))] Equal to 60
            Then - Actions
                Trigger - Turn off (This trigger)
                Trigger - Turn on MasterFormFinalAttack2 <gen>
                Unit Group - Pick every unit in (Units in (Region centered at (Position of SoraMaster[(Player number of (Triggering player))]) with size (1000.00, 1000.00)) owned by Player 12 (Brown)) and do (Unit - Cause SoraMaster[(Player number of (Triggering player))] to damage (Picked unit), dealing (350.00 x ((Real((Hero level of SoraMaster[(Player number of (Triggering player))]))) x (3.25 x (Real((Agility of SoraMaster[(Player number of (Triggering player
                Set SoraMasterFinalAttackCount[(Player number of (Triggering player))] = 0
                Animation - Change SoraMaster[(Player number of (Triggering player))]'s animation speed to 100.00% of its original speed
            Else - Actions

Code: Select all

MasterFormFinalAttack2
    Events
        Time - Every 0.05 seconds of game time
    Conditions
    Actions
        Set SoraMasterFinalAttackCount[(Player number of (Triggering player))] = ((SoraMasterFinalAttackCount[(Player number of (Triggering player))] + 1) + 1)
        Unit Group - Pick every unit in (Units in (Region centered at (Position of SoraMaster[(Player number of (Triggering player))]) with size (1000.00, 1000.00)) owned by Player 12 (Brown)) and do (Unit - Move (Picked unit) instantly to ((Position of SoraMaster[(Player number of (Triggering player))]) offset by (30.00 x (Real(SoraMasterFinalAttackCount[(Player number of (Triggering player))]))) towards (Angle from (Position of SoraMaster[(Player number
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                SoraMasterFinalAttackCount[(Player number of (Triggering player))] Equal to 40
            Then - Actions
                Trigger - Turn off (This trigger)
                Set SoraMasterFinalAttackCount[(Player number of (Triggering player))] = 0
                Unit - Make SoraMaster[(Player number of (Triggering player))] Vulnerable
                Unit - Unpause SoraMaster[(Player number of (Triggering player))]
            Else - Actions
Last edited by Julian5 on February 13th, 2008, 9:26 pm, edited 1 time in total.
Dragons FTW!
Image
^ Made by Windflamedmon. :D
Image
Image
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Issues With Transformation

Post by Aero »

Well I'll be damned if I'm going to read all that.

But from glancing at the GUI, I can make some guesses.
If the game crashes, it could be due to a few things.

Code: Select all

Wait 120.00 seconds
<<<<<<<<<<<<<this is where the game crashes>>>>>>>>>>>>>>
Countdown Timer - Destroy SoraFormDurationWindow[(Custom value of (Triggering unit))]
Unit - Change ownership of (Triggering unit) to (Player((Custom value of (Triggering unit)))) and Change color
Now, the problem is most likely here:

Unit - Change ownership of (Triggering unit) to (Player((Custom value of (Triggering unit)))) and Change color

More specifically here:

(Player((Custom value of (Triggering unit))))

In GUI, when referencing a Player using an Index (1-16), it uses the ConvertedPlayer function...

Code: Select all

function ConvertedPlayer takes integer convertedPlayerId returns player
    return Player(convertedPlayerId - 1)
endfunction
So... if "Custom Value of (Triggering unit)" happens to be 0...
The game will try to call "Player(-1)" which will crash the game.

If it isn't 0, then what might be happening is the "Triggering unit" Event Response might be expiring because of the "Wait - 120 seconds".
If it expires, "Custom Value of (Triggering unit)" will return 0 by default (And crash).

[Edit] As a suggestion, I think you should break down your trigger into multiple triggers.
Julian5
Member
Posts: 62
Joined: October 3rd, 2007, 4:17 am
Title: Dragon
Location: The land of dragons.

Re: Issues With Transformation

Post by Julian5 »

Aero wrote:Well I'll be damned if I'm going to read all that.

But from glancing at the GUI, I can make some guesses.
If the game crashes, it could be due to a few things.

Code: Select all

Wait 120.00 seconds
<<<<<<<<<<<<<this is where the game crashes>>>>>>>>>>>>>>
Countdown Timer - Destroy SoraFormDurationWindow[(Custom value of (Triggering unit))]
Unit - Change ownership of (Triggering unit) to (Player((Custom value of (Triggering unit)))) and Change color
Now, the problem is most likely here:

Unit - Change ownership of (Triggering unit) to (Player((Custom value of (Triggering unit)))) and Change color

More specifically here:

(Player((Custom value of (Triggering unit))))

In GUI, when referencing a Player using an Index (1-16), it uses the ConvertedPlayer function...

Code: Select all

function ConvertedPlayer takes integer convertedPlayerId returns player
    return Player(convertedPlayerId - 1)
endfunction
So... if "Custom Value of (Triggering unit)" happens to be 0...
The game will try to call "Player(-1)" which will crash the game.

If it isn't 0, then what might be happening is the "Triggering unit" Event Response might be expiring because of the "Wait - 120 seconds".
If it expires, "Custom Value of (Triggering unit)" will return 0 by default (And crash).

[Edit] As a suggestion, I think you should break down your trigger into multiple triggers.
xD I'm not suprised you don't want to read it. xD

I think that unlikey, since wisdom form works perfectly...and it uses the same trigger as valor and master do for creation.

Can't be that, since again, Wisdom works. =/

I tried that. Then wisdom crashed too. T_T

Like I said, I'm fairly certain something is wrong with the attack trigger, because it's the only trigger wisdom doesn't use which valor and master do. That and valor/master worked when I disabled it...albeit without their attacks working. =P

Edit: Maybe if you had some spare time, it wouldn't hurt to test my map and try out the differences between the 3 forms, and actually look at them in-game to help pin down the problem?
Dragons FTW!
Image
^ Made by Windflamedmon. :D
Image
Image
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Issues With Transformation

Post by Aero »

If that map ends up in my hands, that enormous GUI trigger will become JASS.
You've been warned =P.
(At least it won't crash, leak, or be slow).

Like I said, if you want a solution from me, it will be in jass 8)
I hate working in GUI.
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Issues With Transformation

Post by Aero »

I just tried out the map.

Take out or shorten the cinematic and remove the camera lock from the heros.
Camera locking on heros is such a bad idea.
Julian5
Member
Posts: 62
Joined: October 3rd, 2007, 4:17 am
Title: Dragon
Location: The land of dragons.

Re: Issues With Transformation

Post by Julian5 »

Aero wrote:I just tried out the map.

Take out or shorten the cinematic and remove the camera lock from the heros.
Camera locking on heros is such a bad idea.
Eh...I'll probably do that...cause it sucks. =/

Camera lock is only on Sora. It's because you press the up arrow key to attack with him...and...if there wasn't a lock...that would be far more irritating to the player.

Eh. I guess you COULD do it in JASS....as long as the actual things that I want to happen are carried out. =/ I'd prefer it in GUI so I could learn from my mistakes/have something to reference back to if I have future problems, but JASS would be fine. =P Thanks a lot Aero...you pwn. =)
Dragons FTW!
Image
^ Made by Windflamedmon. :D
Image
Image
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Issues With Transformation

Post by Aero »

Alright--Here is what I suggest.

Remove the camera locking and (or greatly shorten) the cinematic.
And instead of arrow keys, make the combo stuff abilities (And after a certain ability is casted x number of times, the "combo-finisher" ability appears sort of thing).

When you have all that done and you still have crash problems, I'll JASS it up for you.
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Issues With Transformation

Post by Arabidnun »

I believe i know where you game crashes....

I have the same problem where i am remove a unit, replace that unit with another and try to set the Hero's Exp(last created unit) to that of the one i remove....And it crashes...

I think thats where you problem lies, i dont know how to fix it but give it a whirl..
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Issues With Transformation

Post by Aero »

GUI for the loss.

At least when working with JASS you know what's really happening. GUI is just wrappers for JASS processes.
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: Issues With Transformation

Post by Bartimaeus »

Aero wrote:GUI for the loss.

At least when working with JASS you know what's really happening. GUI is just wrappers for JASS processes.
Think it's lose.
Also, Arabidnun, do Wait 0.01 Seconds before you set the XP on last created unit (hero).