bananaHUNT
You can change this now in User CP
- Reaction score
- 55
I need your help again
I have a morphing spell that changes the attack missille of my Batrider from the normal burning clask to the volcano missile (looks like a burning rock).
Now, what i want is that when it hits the target, the rock rolls along for a while, damaging unit on its path. I have everything set up, but there is only 1 problem:
I don't know when to create the rolling burning rock, cause I need something like a "Unit takes Damage" event. "Unit is attacked" won't work, because it creates the rock way too early. I've tried to add the event "Triggering unit takes damage", as suggested by other people on this forums, but that doesn't work somehow and it's very glitchy. Sometimes random rocks are being made, sometimes it just doesnt work etc.
I would be very thankfull if someone could take a look at my triggers:
This is the first part of the damage detection trigger someone suggested:
This is the second part
This is to detect when he used the morphing ability or not
This is when and where the rock is created - I need some help with this
This is the movement of the rock (and destruction)
Thank you very much
I have a morphing spell that changes the attack missille of my Batrider from the normal burning clask to the volcano missile (looks like a burning rock).
Now, what i want is that when it hits the target, the rock rolls along for a while, damaging unit on its path. I have everything set up, but there is only 1 problem:
I don't know when to create the rolling burning rock, cause I need something like a "Unit takes Damage" event. "Unit is attacked" won't work, because it creates the rock way too early. I've tried to add the event "Triggering unit takes damage", as suggested by other people on this forums, but that doesn't work somehow and it's very glitchy. Sometimes random rocks are being made, sometimes it just doesnt work etc.
I would be very thankfull if someone could take a look at my triggers:
This is the first part of the damage detection trigger someone suggested:
Code:
Burning Rock Init
Events
Map initialization
Conditions
Actions
Set BR_Hero = Troll Batrider 0038 <gen>
Set BR_Group = (Units in (Playable map area))
Unit Group - Pick every unit in BR_Group and do (Actions)
Loop - Actions
Trigger - Add to Burning Rock Path <gen> the event (Unit - (Picked unit) Takes damage)
Unit Group - Add (Picked unit) to BR_Group_Check
Custom script: call DestroyGroup (udg_BR_Group)
This is the second part
Code:
Burning Rock Init 2
Events
Unit - A unit enters (Playable map area)
Conditions
((Triggering unit) is in BR_Group_Check) Equal to False
Actions
Trigger - Add to Burning Rock Path <gen> the event (Unit - (Triggering unit) Takes damage)
Unit Group - Add (Triggering unit) to BR_Group_Check
This is to detect when he used the morphing ability or not
Code:
Burning Rock Missile
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Burning Rock
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BR_Check Equal to 0
Then - Actions
Set BR_Check = 1
Trigger - Turn on Burning Rock Path <gen>
Special Effect - Create a special effect attached to the weapon of (Casting unit) using Abilities\Spells\Other\Volcano\VolcanoMissile.mdl
Set BR_Missile = (Last created special effect)
Else - Actions
Set BR_Check = 0
Trigger - Turn off Burning Rock Path <gen>
Special Effect - Destroy BR_Missile
This is when and where the rock is created - I need some help with this
Code:
Burning Rock Path
Events
Conditions
(Damage source) Equal to BR_Hero
Actions
Set BR_TargetLoc = (Position of (Triggering unit))
Set BR_HeroLoc = (Position of BR_Hero)
Set BR_Angle = (Angle from BR_HeroLoc to BR_TargetLoc)
Unit - Create 1 Burning Rock Missile for (Owner of BR_Hero) at BR_TargetLoc facing BR_Angle degrees
Unit - Turn collision for (Last created unit) Off
Set BR_Rock = (Last created unit)
Trigger - Add to Burning Rock Damage <gen> the event (Unit - A unit comes within 100.00 of BADummy[(Custom value of (Last created unit))])
Custom script: call RemoveLocation (udg_BR_TargetLoc)
Custom script: call RemoveLocation (udg_BR_HeroLoc)
This is the movement of the rock (and destruction)
Code:
Burning Rock Movement
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
Set BR_RockPt = (Position of BR_Rock)
Set BR_MovePt = (BR_RockPt offset by 10.00 towards BR_Angle degrees)
Unit - Move BR_Rock instantly to BR_MovePt
Set BR_Distance = (Distance between BR_HeroLoc and BR_MovePt)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BR_Distance Greater than or equal to 500.00
Then - Actions
Unit - Remove BR_Rock from the game
Else - Actions
Thank you very much