#31
Is there a condition for checking if the triggering / dying / killing unit is in a certain unit group?Like... "Triggering unit is in BountyWorth2 Equal to True" ?
BagOfChipsIs there a condition for checking if the triggering / dying / killing unit is in a certain unit group?
Like... "Triggering unit is in BountyWorth2 Equal to True" ?
Jump Move
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Flame Strike
Actions
Set JumpUnits[1] = (Triggering unit)
Set JumpCasterPosition[1] = (Position of JumpUnits[1])
Unit - Create 1 Rifleman for (Owner of JumpUnits[1]) at JumpCasterPosition[1] facing Default building facing degrees
Set JumpUnits[2] = (Last created unit)
Set JumpCasterPosition[2] = (Target point of ability being cast)
Unit - Order JumpUnits[2] to Move To JumpCasterPosition[2]
Animation - Play JumpUnits[2]'s spell, slam animation
Trigger - Turn on Jump Loop Up <gen>
Wait until (JumpUnitHeight Equal to 200.00), checking every 0.10 seconds
Trigger - Turn off Jump Loop Up <gen>
Trigger - Turn on Jump Loop Down <gen>
Wait until (JumpUnitHeight Equal to 0.00), checking every 0.10 seconds
Trigger - Turn off Jump Loop Down <gen>
Animation - Play JumpUnits[2]'s spell, slam animation
Jump Loop Up
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
Animation - Change JumpUnits[2] flying height to JumpUnitHeight at 1000000000.00
Set JumpUnitHeight = (JumpUnitHeight + 20.00)
Jump Loop Down
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
Animation - Change JumpUnits[2] flying height to JumpUnitHeight at 1000000000.00
Set JumpUnitHeight = (JumpUnitHeight - 20.00)
PurplePootill give you a basic jump spell in JASS to config, and ill extract that stuff, when i get home ^^
BagOfChipsOh, and what's the condition to use if you want it to have say a 50% chance of going off when the event happens? I used to know this, but I hardly ever used the condition and now I've forgotten it
JaakkoBagOfChipsOh, and what's the condition to use if you want it to have say a 50% chance of going off when the event happens? I used to know this, but I hardly ever used the condition and now I've forgotten it
If you mean not in GUI or JASS language you can do it this way:
Actions: Set integer=random number between 1 and 2
if integer egual to 1
then skip remaining actions
else do nothing
Pulverize Effect
Events
Unit - A unit Is attacked
Conditions
(Attacking unit) Equal to PulverizeUnit[1]
Actions
Set PulverizeInteger = (Random integer number between 1 and 10)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PulverizeInteger Equal to 1
Then - Actions
Set PulverizePosition = (Position of (Attacked unit))
Animation - Play PulverizeUnit[1]'s attack, slam animation
Unit - Create 1 Mortar Team for (Owner of PulverizeUnit[1]) at PulverizePosition facing Default building facing degrees
Set PulverizeUnit[2] = (Last created unit)
Unit - Set level of Cow - Pulverize for PulverizeUnit[2] to (Level of Cow - Pulverize for PulverizeUnit[1])
Unit - Order PulverizeUnit[2] to Orc Tauren Chieftain - War Stomp
Custom script: call RemoveLocation(udg_PulverizePosition)
Else - Actions
Do nothing
Torments Shadow Main Trigger
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Torment's shadow
Actions
Set TormentsShadowUnits[1] = (Triggering unit)
Set TormentsShadowUnits[2] = (Target unit of ability being cast)
Set TormentsShadowPosition[1] = (Position of TormentsShadowUnits[2])
Unit Group - Pick every unit in (Units within 1000.00 of TormentsShadowPosition[1] matching ((Owner of (Triggering unit)) Equal to Player 2 (Blue))) and do (Unit Group - Add (Picked unit) to TormentsShadowGroup)
Unit Group - Pick every unit in (Units within 1000.00 of TormentsShadowPosition[1] matching ((Owner of (Triggering unit)) Equal to Player 4 (Purple))) and do (Unit Group - Add (Picked unit) to TormentsShadowGroup)
Unit Group - Pick every unit in (Units within 1000.00 of TormentsShadowPosition[1] matching ((Owner of (Triggering unit)) Equal to Player 6 (Orange))) and do (Unit Group - Add (Picked unit) to TormentsShadowGroup)
Unit Group - Pick every unit in (Units within 1000.00 of TormentsShadowPosition[1] matching ((Owner of (Triggering unit)) Equal to Player 8 (Pink))) and do (Unit Group - Add (Picked unit) to TormentsShadowGroup)
Unit Group - Pick every unit in (Units within 1000.00 of TormentsShadowPosition[1] matching ((Owner of (Triggering unit)) Equal to Player 10 (Light Blue))) and do (Unit Group - Add (Picked unit) to TormentsShadowGroup)
Unit Group - Pick every unit in (Units within 1000.00 of TormentsShadowPosition[1] matching ((Owner of (Triggering unit)) Equal to Player 12 (Brown))) and do (Unit Group - Add (Picked unit) to TormentsShadowGroup)
Unit - Move TormentsShadowUnits[1] instantly to ((Position of TormentsShadowUnits[2]) offset by 30.00 towards ((Facing of TormentsShadowUnits[2]) - 180.00) degrees)
Animation - Play TormentsShadowUnits[1]'s attack 2 animation
Sound - Play MetalHeavySliceFlesh1 <gen> at 70.00% volume, located at (Position of (Picked unit)) with Z offset 0.00
Unit - Cause TormentsShadowUnits[1] to damage TormentsShadowUnits[3], dealing (40.00 x (Real((Level of Torment's shadow for TormentsShadowUnits[1])))) damage of attack type Chaos and damage type Normal
Trigger - Turn on Torments Shadow Loop <gen>
Wait 2.00 seconds
Trigger - Turn off Torments Shadow Loop <gen>
Torments Shadow Loop
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Random 1 units from TormentsShadowGroup) and do (Actions)
Loop - Actions
Set TormentsShadowPosition[2] = ((Position of (Picked unit)) offset by 30.00 towards ((Facing of (Picked unit)) - 180.00) degrees)
Set TormentsShadowUnits[3] = (Picked unit)
Unit - Move TormentsShadowUnits[1] instantly to TormentsShadowPosition[2]
Unit - Make TormentsShadowUnits[1] face TormentsShadowUnits[3] over 0.00 seconds
Animation - Play TormentsShadowUnits[1]'s attack 2 animation
Sound - Play MetalHeavySliceFlesh1 <gen> at 70.00% volume, located at (Position of (Picked unit)) with Z offset 0.00
Unit - Cause TormentsShadowUnits[1] to damage TormentsShadowUnits[3], dealing (40.00 x (Real((Level of Torment's shadow for TormentsShadowUnits[1])))) damage of attack type Chaos and damage type Normal