- Joined
- Mar 17, 2012
- Messages
- 582
Hi everyone! Hope you are doing fine
Today I'm here with a little problem. My hero has a spell that creates an exaxt copy of himself (but it's not the same unit type, it's the COPY-version of himself) which is supposed to repeat the Q spell after him and also copy his HP, MP and items. So, the problem is that when I do all this, my tracing shows me something ridiculous!!! I mean that my copy can be lvl 6, but ingame message shows that it's lvl 0. Look at that:
And here's the trigger:
And here's the "meteor" spell that is supposed to show the check message:
Any help would be awesome! Thanks in advance!
--------------
I added some tracing to the last trigger like this:
and now it shows this:
Today I'm here with a little problem. My hero has a spell that creates an exaxt copy of himself (but it's not the same unit type, it's the COPY-version of himself) which is supposed to repeat the Q spell after him and also copy his HP, MP and items. So, the problem is that when I do all this, my tracing shows me something ridiculous!!! I mean that my copy can be lvl 6, but ingame message shows that it's lvl 0. Look at that:
-
Infernal Delusion
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Infernal Delusion new
-
Actions
- Set Player_Number_Int = (Player number of (Owner of (Triggering unit)))
- Set Infernal_Delusion_Caster[Player_Number_Int] = (Triggering unit)
- Set Infernal_Delusion_Caster_Point[Player_Number_Int] = (Position of Infernal_Delusion_Caster[Player_Number_Int])
- Set Infernal_Delusion_Random_Point[Player_Number_Int] = (Random point in (Region centered at Infernal_Delusion_Caster_Point[Player_Number_Int] with size (200.00, 200.00)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Infernal_Delusion_Caster[Player_Number_Int] belongs to an ally of Player 1 (Red)) Equal to True
-
Then - Actions
- Unit - Create 1 Infernal Mage COPY for Player 1 (Red) at Infernal_Delusion_Random_Point[Player_Number_Int] facing Default building facing degrees
- Set Infernal_Delusion_Dummy[Player_Number_Int] = (Last created unit)
-
Else - Actions
- Unit - Create 1 Infernal Mage COPY for Player 7 (Green) at Infernal_Delusion_Random_Point[Player_Number_Int] facing Default building facing degrees
- Set Infernal_Delusion_Dummy[Player_Number_Int] = (Last created unit)
-
If - Conditions
- Custom script: call RemoveLocation(udg_Infernal_Delusion_Random_Point[udg_Player_Number_Int])
- Game - Display to (All players) the text: (Name of Infernal_Delusion_Dummy[Player_Number_Int])
- -------- expiration --------
- Unit - Add a 20.00 second Generic expiration timer to Infernal_Delusion_Dummy[Player_Number_Int]
- -------- levels --------
- Hero - Set Infernal_Delusion_Dummy[Player_Number_Int] Hero-level to (Level of Infernal_Delusion_Caster[Player_Number_Int]), Hide level-up graphics
- Game - Display to (All players) the text: (Dummie's level - + (String((Hero level of Infernal_Delusion_Dummy[Player_Number_Int]))))
- Unit - Set level of LVLup Armor for Infernal_Delusion_Dummy[Player_Number_Int] to (Level of LVLup Armor for Infernal_Delusion_Caster[Player_Number_Int])
- Game - Display to (All players) the text: (Dummie's armor level - + (String((Level of LVLup Armor for Infernal_Delusion_Dummy[Player_Number_Int]))))
- Unit - Set level of Infernal Delusion check (+1) for Infernal_Delusion_Dummy[Player_Number_Int] to (Level of Infernal Delusion new for Infernal_Delusion_Caster[Player_Number_Int])
- Game - Display to (All players) the text: (Level of delusion - + (String((Level of Infernal Delusion check (+1) for Infernal_Delusion_Dummy[Player_Number_Int]))))
- -------- items --------
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
- Hero - Give (Item carried by Infernal_Delusion_Caster[Player_Number_Int] in slot (Integer A)) to Infernal_Delusion_Dummy[Player_Number_Int]
- Game - Display to (All players) the text: (Name of (Item carried by Infernal_Delusion_Dummy[Player_Number_Int] in slot (Integer A)))
-
Loop - Actions
- -------- HP --------
- Set Infernal_Delusion_Difference[Player_Number_Int] = ((Max life of Infernal_Delusion_Caster[Player_Number_Int]) - (Max life of Infernal_Delusion_Dummy[Player_Number_Int]))
- Game - Display to (All players) the text: (HP difference - + (String(Infernal_Delusion_Difference[Player_Number_Int])))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Infernal_Delusion_Difference[Player_Number_Int] Greater than 0.00
-
Then - Actions
-
For each (Integer A) from 1 to (Integer(Infernal_Delusion_Difference[Player_Number_Int])), do (Actions)
-
Loop - Actions
- Unit - Add LIFE +1 to Infernal_Delusion_Dummy[Player_Number_Int]
- Unit - Increase level of LIFE +1 for Infernal_Delusion_Dummy[Player_Number_Int]
- Unit - Remove LIFE +1 from Infernal_Delusion_Dummy[Player_Number_Int]
-
Loop - Actions
-
For each (Integer A) from 1 to (Integer(Infernal_Delusion_Difference[Player_Number_Int])), do (Actions)
- Else - Actions
-
If - Conditions
- Unit - Set life of Infernal_Delusion_Dummy[Player_Number_Int] to (Percentage life of Infernal_Delusion_Caster[Player_Number_Int])%
- -------- MP --------
- Set Infernal_Delusion_Difference[Player_Number_Int] = ((Max mana of Infernal_Delusion_Caster[Player_Number_Int]) - (Max mana of Infernal_Delusion_Dummy[Player_Number_Int]))
- Game - Display to (All players) the text: (MP difference - + (String(Infernal_Delusion_Difference[Player_Number_Int])))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Infernal_Delusion_Difference[Player_Number_Int] Greater than 0.00
-
Then - Actions
-
For each (Integer A) from 1 to (Integer(Infernal_Delusion_Difference[Player_Number_Int])), do (Actions)
-
Loop - Actions
- Unit - Add MANA +1 to Infernal_Delusion_Dummy[Player_Number_Int]
- Unit - Increase level of MANA +1 for Infernal_Delusion_Dummy[Player_Number_Int]
- Unit - Remove MANA +1 from Infernal_Delusion_Dummy[Player_Number_Int]
-
Loop - Actions
-
For each (Integer A) from 1 to (Integer(Infernal_Delusion_Difference[Player_Number_Int])), do (Actions)
- Else - Actions
-
If - Conditions
- Unit - Set mana of Infernal_Delusion_Dummy[Player_Number_Int] to (Percentage mana of Infernal_Delusion_Caster[Player_Number_Int])%
- -------- meteor --------
- Hero - Learn skill for Infernal_Delusion_Dummy[Player_Number_Int]: Infernal Meteor
- Game - Display to (All players) the text: (METEOR level - + (String((Level of Infernal Meteor for Infernal_Delusion_Dummy[Player_Number_Int]))))
- Unit - Set level of Infernal Meteor for Infernal_Delusion_Dummy[Player_Number_Int] to (Level of Infernal Meteor for Infernal_Delusion_Caster[Player_Number_Int])
- Game - Display to (All players) the text: (METEOR level - + (String((Level of Infernal Meteor for Infernal_Delusion_Dummy[Player_Number_Int]))))
- -------- shift position --------
- Unit - Hide Infernal_Delusion_Caster[Player_Number_Int]
- Set Infernal_Delusion_Random_Point[Player_Number_Int] = (Random point in (Region centered at Infernal_Delusion_Caster_Point[Player_Number_Int] with size (200.00, 200.00)))
- Unit - Move Infernal_Delusion_Caster[Player_Number_Int] instantly to Infernal_Delusion_Random_Point[Player_Number_Int]
- Custom script: call SetUnitX (udg_Infernal_Delusion_Caster[udg_Player_Number_Int], GetLocationX (udg_Infernal_Delusion_Random_Point[udg_Player_Number_Int]))
- Custom script: call SetUnitY (udg_Infernal_Delusion_Caster[udg_Player_Number_Int], GetLocationY (udg_Infernal_Delusion_Random_Point[udg_Player_Number_Int]))
- Custom script: call RemoveLocation(udg_Infernal_Delusion_Random_Point[udg_Player_Number_Int])
- Unit - Unhide Infernal_Delusion_Caster[Player_Number_Int]
- Selection - Select Infernal_Delusion_Caster[Player_Number_Int] for (Owner of Infernal_Delusion_Caster[Player_Number_Int])
- Trigger - Turn on Infernal Delusion loop <gen>
-
Events
-
Infernal Delusion Meteor
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Infernal Meteor
-
Actions
- Set Player_Number_Int = (Player number of (Owner of (Triggering unit)))
- Set Infernal_Meteor_Caster[Player_Number_Int] = (Triggering unit)
- Set Infernal_Meteor_Target_Point[Player_Number_Int] = (Target point of ability being cast)
- Unit - Order Infernal_Delusion_Dummy[Player_Number_Int] to Human Dragonhawk Rider - Cloud Infernal_Meteor_Target_Point[Player_Number_Int]
- Custom script: call RemoveLocation(udg_Infernal_Meteor_Target_Point[udg_Player_Number_Int])
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Infernal_Delusion_Dummy[(Integer A)] is alive) Equal to True
-
Then - Actions
- Game - Display to (All players) the text: (Dummy # + ((String((Integer A))) + is alive!))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Events
--------------
I added some tracing to the last trigger like this:
-
Infernal Delusion Meteor
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Infernal Meteor
-
Actions
- Set Player_Number_Int = (Player number of (Owner of (Triggering unit)))
- Set Infernal_Meteor_Caster[Player_Number_Int] = (Triggering unit)
- Set Infernal_Meteor_Target_Point[Player_Number_Int] = (Target point of ability being cast)
- Unit - Order Infernal_Delusion_Dummy[Player_Number_Int] to Human Dragonhawk Rider - Cloud Infernal_Meteor_Target_Point[Player_Number_Int]
- Custom script: call RemoveLocation(udg_Infernal_Meteor_Target_Point[udg_Player_Number_Int])
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Infernal_Delusion_Dummy[(Integer A)] is alive) Equal to True
-
Then - Actions
- Game - Display to (All players) the text: (Dummy # + ((String((Integer A))) + is alive!))
- Game - Display to (All players) the text: (Dummie's level - + (String((Hero level of Infernal_Delusion_Dummy[(Integer A)]))))
- Game - Display to (All players) the text: (Level of delusion - + (String((Level of Infernal Delusion check (+1) for Infernal_Delusion_Dummy[(Integer A)]))))
- Game - Display to (All players) the text: (METEOR level - + (String((Level of Infernal Meteor for Infernal_Delusion_Dummy[(Integer A)]))))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Events
Last edited: