- Joined
- Jul 26, 2008
- Messages
- 1,009
Alright, I got a spell on a guy which has 2 negative effects, two positive effects, and a nuetral effect.
Problem is it's not working... at all really.
It's done in all triggers, but I was thinking of turning it into JASS and using local variables to handle it. But I think that would be unneccessary.
So here's the trigger:
The problem is, it's not picking any random number. I wouldn't even guess that it's storing the number.
What I need is for the trigger to produce a random number 1 - 100. Once it picks the number, every condition checks to see if they carry that number. When the right condition is picked, it executes that action. Simple enough, if you ask me.
I'm no good at storing variables in trigger form. I'm not even sure I have to. Having a game cache for this skill seemed highly unnecessary. So what's the solution?
Problem is it's not working... at all really.
It's done in all triggers, but I was thinking of turning it into JASS and using local variables to handle it. But I think that would be unneccessary.
So here's the trigger:
-
Concoction
-
Events
- Unit - A unit Finishes casting an ability
-
Conditions
- (Ability being cast) Equal to Concoction
-
Actions
- Set Random = (Random integer number between 1 and 100)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- Random Greater than (96 - ((Level of Concoction for (Casting unit)) x 1))
- Random Less than or equal to 100
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
- Unit - Add Dire Form to (Triggering unit)
- Unit - Set level of Dire Form for (Casting unit) to (Level of Concoction for (Casting unit))
- Special Effect - Create a special effect attached to the origin of (Casting unit) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
- Unit - Order (Casting unit) to Night Elf Demon Hunter - Metamorphosis
- Special Effect - Destroy (Last created special effect)
- Unit - Remove Dire Form from (Casting unit)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- Random Less than or equal to (21 - ((Level of Concoction for (Casting unit)) x 1))
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
- Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Other\HealingSpray\HealBottleMissile.mdl
- Unit - Set life of (Casting unit) to ((Percentage life of (Casting unit)) + (3.00 + ((Real((Level of Concoction for (Casting unit)))) x (Random real number between 1.00 and 3.00))))%
- Special Effect - Destroy (Last created special effect)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- Random Greater than (21 - ((Level of Concoction for (Casting unit)) x 1))
- Random Less than or equal to (39 + ((Level of Concoction for (Casting unit)) x 1))
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
- Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Weapons\ChimaeraAcidMissile\ChimaeraAcidMissile.mdl
- Unit - Set life of (Casting unit) to ((Percentage life of (Casting unit)) - (3.00 + ((Real((Level of Concoction for (Casting unit)))) x (Random real number between 1.00 and 3.00))))%
- Special Effect - Destroy (Last created special effect)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- Random Greater than (39 + ((Level of Concoction for (Casting unit)) x 1))
- Random Less than or equal to (59 + ((Level of Concoction for (Casting unit)) x 1))
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
- Unit - Add Poison Spray (Nuetral) to (Casting unit)
- Unit - Order (Casting unit) to Orc Tauren Chieftain - War Stomp
- Unit - Remove Poison Spray (Nuetral) from (Casting unit)
- Unit Group - Pick every unit in (Units within 555.00 of (Target point of ability being cast)) and do (Unit - Cause (Casting unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- Random Greater than (59 + ((Level of Concoction for (Casting unit)) x 1))
- Random Less than or equal to (74 + ((Level of Concoction for (Casting unit)) x 1))
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
- Unit - Add Doppleganger to (Casting unit)
- Unit - Order (Casting unit) to Orc Blademaster - Mirror Image
- Unit - Remove Doppleganger from (Casting unit)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- Random Greater than (74 + ((Level of Concoction for (Casting unit)) x 1))
- Random Less than or equal to (91 - ((Level of Concoction for (Casting unit)) x 1))
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
- Unit - Add Doppleganger to (Casting unit)
- Unit - Order (Casting unit) to Orc Blademaster - Mirror Image
- Unit - Remove Doppleganger from (Casting unit)
- Unit - Change ownership of (Summoned unit) to Player 1 (Red) and Retain color
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- Random Greater than (91 - ((Level of Concoction for (Casting unit)) x 1))
- Random Less than or equal to (96 - ((Level of Concoction for (Casting unit)) x 1))
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
- Unit - Create 1 Sorceress for Player 1 (Red) at (Target point of ability being cast) facing (Position of (Casting unit))
- Unit - Add Polymorph to (Last created unit)
- Unit - Order (Last created unit) to Human Sorceress - Polymorph (Casting unit)
- Unit - Remove (Last created unit) from the game
- Else - Actions
-
If - Conditions
-
Events
The problem is, it's not picking any random number. I wouldn't even guess that it's storing the number.
What I need is for the trigger to produce a random number 1 - 100. Once it picks the number, every condition checks to see if they carry that number. When the right condition is picked, it executes that action. Simple enough, if you ask me.
I'm no good at storing variables in trigger form. I'm not even sure I have to. Having a game cache for this skill seemed highly unnecessary. So what's the solution?
Last edited: