- Joined
- Feb 9, 2008
- Messages
- 63
Need Help :C
hello...
im working on a spell for my map and i run into some sort of problems along the way and im hoping someone would help...the spell im working at is a passive spell that (supposedly) goes like multicast in dota (i know its probably been ask a lot of times)
and for those who dont play dota-Multicast is a passive spell that gives your hero a certain chance to cast a spell again
heres my trigger
little bit of explanation about my spell:
if Bash is learned the and the unit cast a spell it should give a "x" chance to cast it again
level 1 - x chance to cast a spell again
level 2 - x chance to cast a spell once. x chance to cast a spell 2 times
level 3 - x chance to cast a spell once. x chance to cast a spell 2 times. x chance to cast a spell 3 times
so heres the problems:
1.it works but win no interval between the spells example: i cast thunder clap and multicast gives a dummy unit chance to cast it again for 3 more times after i cast...the dummy cast thunder clap 3 times at one instance without interval...how do i solve this?
2.whenever i cast a point targeted spell (shockwave for expample) the dummy cast it towards the center of the map (not sure on this one but as long as i doesn't cast it towards the direction the player intented its no go)
ive attach my test map so that anyone could test it and see if there are more errors im not aware yet
View attachment TESTING.w3x
hello...
im working on a spell for my map and i run into some sort of problems along the way and im hoping someone would help...the spell im working at is a passive spell that (supposedly) goes like multicast in dota (i know its probably been ask a lot of times)
and for those who dont play dota-Multicast is a passive spell that gives your hero a certain chance to cast a spell again
heres my trigger
-
Multicast Initialization
-
Events
- Map initialization
- Conditions
-
Actions
- Set M_C_Spell = Bash awe
- Set M_C_Dummy = Dummy Unit
-
Events
-
Multicast Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Level of M_C_Spell for (Triggering unit)) Greater than 0
- (Random integer number between 1 and 100) Less than or equal to (25 + (5 x (Level of M_C_Spell for (Triggering unit))))
-
Actions
- Set M_C_Index = (M_C_Index + 1)
- -------- --------
- -------- --------
- Set M_C_Caster[M_C_Index] = (Triggering unit)
- Set M_C_Point[M_C_Index] = (Position of M_C_Caster[M_C_Index])
- Set M_C_Target[M_C_Index] = (Target unit of ability being cast)
- Set M_C_DummySpell[M_C_Index] = (Ability being cast)
- Set M_C_Order[M_C_Index] = (Current order of M_C_Caster[M_C_Index])
- -------- --------
- Set M_C_Counter[M_C_Index] = 0
- -------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- M_C_Index Equal to 1
-
Then - Actions
- Trigger - Turn on Multicast Loop <gen>
- Else - Actions
-
If - Conditions
-
Events
-
Multicast Loop
-
Events
- Time - Every 0.30 seconds of game time
- Conditions
-
Actions
-
For each (Integer M_C_Integer) from 1 to M_C_Index, do (Actions)
-
Loop - Actions
- -------- --------
- Set M_C_Counter[M_C_Integer] = (M_C_Counter[M_C_Integer] + 1)
- -------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- M_C_Counter[M_C_Integer] Equal to 2
-
Then - Actions
- Unit - Create 1 M_C_Dummy for (Owner of M_C_Caster[M_C_Integer]) at M_C_Point[M_C_Integer] facing Default building facing degrees
- Set M_C_Dummy2[M_C_Integer] = (Last created unit)
- Unit - Add a 2.00 second Generic expiration timer to M_C_Dummy2[M_C_Integer]
- Unit - Add M_C_DummySpell[M_C_Integer] to M_C_Dummy2[M_C_Integer]
- Unit - Set level of M_C_DummySpell[M_C_Integer] for M_C_Dummy2[M_C_Integer] to (Level of M_C_Spell for M_C_Caster[M_C_Integer])
- Set M_C_Chance2 = (Random integer number between 1 and (Level of M_C_Spell for M_C_Caster[M_C_Integer]))
- -------- Text to see if it works --------
- Floating Text - Create floating text that reads (String((M_C_Chance2 + 1))) above M_C_Caster[M_C_Integer] with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
- Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
- -------- Text to see if it works --------
-
For each (Integer A) from 1 to M_C_Chance2, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Playable map area) contains M_C_Point[M_C_Integer]) Equal to True
-
Then - Actions
- Custom script: call IssuePointOrderByIdLoc( udg_M_C_Dummy2[udg_M_C_Integer], udg_M_C_Order[udg_M_C_Integer], udg_M_C_Point[udg_M_C_Integer] )
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- M_C_Target[M_C_Integer] Not equal to No unit
-
Then - Actions
- -------- --------
- Custom script: call IssueTargetOrderById( udg_M_C_Dummy2[udg_M_C_Integer], udg_M_C_Order[udg_M_C_Integer], udg_M_C_Target[udg_M_C_Integer] )
- Custom script: call IssueImmediateOrderById( udg_M_C_Dummy2[udg_M_C_Integer], udg_M_C_Order[udg_M_C_Integer] )
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- -------- --------
- Custom script: call RemoveLocation(udg_M_C_Point[udg_M_C_Integer])
- -------- --------
- Set M_C_Point[M_C_Integer] = M_C_Point[M_C_Index]
- Set M_C_Dummy2[M_C_Integer] = M_C_Dummy2[M_C_Index]
- Set M_C_Caster[M_C_Integer] = M_C_Caster[M_C_Index]
- Set M_C_Counter[M_C_Integer] = M_C_Counter[M_C_Index]
- Set M_C_Index = (M_C_Index - 1)
- Set M_C_Integer = (M_C_Integer - 1)
- -------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- M_C_Index Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
For each (Integer M_C_Integer) from 1 to M_C_Index, do (Actions)
-
Events
-
Testing Purposes
-
Events
- Unit - A unit Finishes casting an ability
-
Conditions
- (Unit-type of (Casting unit)) Equal to Dummy Unit
-
Actions
- Game - Display to (All players) for 12.00 seconds the text: (String((Level of (Ability being cast) for (Casting unit))))
-
Events
if Bash is learned the and the unit cast a spell it should give a "x" chance to cast it again
level 1 - x chance to cast a spell again
level 2 - x chance to cast a spell once. x chance to cast a spell 2 times
level 3 - x chance to cast a spell once. x chance to cast a spell 2 times. x chance to cast a spell 3 times
so heres the problems:
1.it works but win no interval between the spells example: i cast thunder clap and multicast gives a dummy unit chance to cast it again for 3 more times after i cast...the dummy cast thunder clap 3 times at one instance without interval...how do i solve this?
2.whenever i cast a point targeted spell (shockwave for expample) the dummy cast it towards the center of the map (not sure on this one but as long as i doesn't cast it towards the direction the player intented its no go)
ive attach my test map so that anyone could test it and see if there are more errors im not aware yet
View attachment TESTING.w3x
Last edited: