- Asgard_RagnaCOL
- Posts : 750
Réputation : 7
Regist Date : 2006-01-20
Makes Every Spell passive
Thu 23 Feb 2006, 19:27
Variables
- Code:
BoltStrikeChance Integer 0
BoltStrikePercent Integer 0
(Unit type of (Attacking unit)) Equal to Blademaster isn't nessesary.
Its very easy to create.
If u don't know how to set % chances, then read this:
if u set random number integer between 1 and 1 u have 100%.
So, between 1 and 2 = 99%, between 1 and 3 = 98%,... Like that, HAVE FUN!
- Code:
Event
Unit - A unit Wird gets attacked
Condition
(Unit-type of (Attacking unit)) Equal to Blademaster
Aktionen
If ((Level of Bolt Strike for (Attacking unit)) Equal to 1) then do (Set BoltStrikeChance = (Random integer number between 1 and 30)) else do (Do nothing)
If ((Level of Bolt Strike for (Attacking unit)) Equal to 2) then do (Set BoltStrikeChance = (Random integer number between 1 and 20)) else do (Do nothing)
If ((Level of Bolt Strike for (Attacking unit)) Equal to 3) then do (Set BoltStrikeChance = (Random integer number between 1 and 10)) else do (Do nothing)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Condition
BoltStrikePercent Equal to BoltStrikeChance
'THEN'-Aktionen
Spezialeffect - Create a special effect attached to the chest of (Attacking unit) using Abilities\Spells\Other\Charm\CharmTarget.mdl
Unit - Create 1 Caster_01 for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing on Building degrees
Unit - Order (Last created unit) to Humen-Mountainking - 'Thunderclap' (Attacked unit)
Wait 0.10 seconds
Unit - Remove (Last created unit) from the game
'ELSE'-Aktionen
Do nothing
The Unit you creat must have the spell which you would make passive.You can use every spell for this.
Permissions in this forum:
You cannot reply to topics in this forum