- Joined
- Sep 20, 2015
- Messages
- 385
Hello i am using this missile system Missile [GUI] version 1.6.1 . I think i figured out how to use it but i have a strange behavior in my map.
What i want to do is an ability that shoots missiles in the mouse cursor position when the right mouse button si pressed.
I do this is 3 triggers
First one when the mouse button is pressed
The second for the missile configuration and creation
And the third one when the missile is destroyed
It doesnt work properly also for some reasons when i press the right mouse button the variable Mouse_Cursor_Position_P1 is set to (0, 0) coordinates.
I made some other tests and changes some stuff but it seems that the mouse position point variable is set to 0,0 in the missile trigger.
Help me please.
Thanks in advance
What i want to do is an ability that shoots missiles in the mouse cursor position when the right mouse button si pressed.
I do this is 3 triggers
First one when the mouse button is pressed
-
HLP
-
Events
-
Player - Player 1 (Red) issues Mouse Down event
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Mouse Position X for Triggered Mouse Event) Not equal to 0.00
-
(Mouse Position Y for Triggered Mouse Event) Not equal to 0.00
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Archmage Selectable 0001 <gen> has buff Avatar) Equal to True
-
-
Then - Actions
-
Countdown Timer - Start ArcaneMissileTimerCasting as a One-shot timer that will expire in 0.05 seconds
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
The second for the missile configuration and creation
-
MissilesShoot
-
Events
-
Time - ArcaneMissileTimerCasting expires
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
RED_Mouse_Right_Down Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Archmage Selectable 0001 <gen> has buff Avatar) Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(X of Mouse_Cursor_Position_P1) Not equal to 0.00
-
(Y of Mouse_Cursor_Position_P1) Not equal to 0.00
-
-
Then - Actions
-
Set MissileOrigin2 = (Mouse_Cursor_Position_P1 offset by 1700.00 towards 270.00 degrees)
-
Set MissileImpact2 = Mouse_Cursor_Position_P1
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Mana of ArchmageSelectable) Less than ManaARCANE_Right
-
-
Then - Actions
-
Set ErrorPlayer = Player 1 (Red)
-
Set ErrorMessage = Not enought mana!
-
Custom script: call ErrorMessage(udg_ErrorMessage,udg_ErrorPlayer)
-
-
Else - Actions
-
Unit - Set mana of ArchmageSelectable to ((Mana of ArchmageSelectable) - (ManaARCANE_Right + 0.00))
-
-------- M I S S I L E S T E S T --------
-
Trigger - Run Missile Configurate <gen> (ignoring conditions)
-
Set Missile__Source = ArchmageSelectable
-
Set Missile__Owner = Player 1 (Red)
-
Set Missile__Origin = MissileOrigin2
-
Set Missile__Collision = 16.00
-
Set Missile__OriginZ = 350.00
-
Set Missile__Impact = MissileImpact2
-
Set Missile__ImpactZ = 0.00
-
Set Missile__Damage = 12.00
-
Set Missile__Speed = 2200.00
-
Set Missile__Data = 1
-
Set Missile__Scale = (Random real number between 0.90 and 2.00)
-
Set Missile__Arc = (Random real number between 20.00 and 50.00)
-
Set Missile__Curve = (Random real number between -18.00 and 18.00)
-
Set Missile__Model = war3mapImported\s_ArcaneRocket Projectile.mdl
-
Set Missile__OnFinish = AcranceMisslActionsV2LOOP <gen>
-
Set Missile__OnRemove = AcranceMisslActionsV2LOOP <gen>
-
Trigger - Run Missile <gen> (ignoring conditions)
-
-
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
And the third one when the missile is destroyed
-
AcranceMisslActionsV2LOOP
-
Events
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Missile__EventId Equal to EVENT_MISSILE_REMOVE
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
RED_Mouse_Right_Down Equal to True
-
-
Then - Actions
-
Countdown Timer - Start ArcaneMissileTimerCasting as a One-shot timer that will expire in 0.03 seconds
-
-
Else - Actions
-
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Missile__EventId Equal to EVENT_MISSILE_FINISH
-
-
Then - Actions
-
Unit - Cause Missile__Source to damage circular area after 0.00 seconds of radius 135.00 at (Position of Missile__Dummy), dealing 13.00 damage of attack type Spells and damage type Normal
-
Set Missile__WantDestroy = True
-
-
Else - Actions
-
-
-
-
-
It doesnt work properly also for some reasons when i press the right mouse button the variable Mouse_Cursor_Position_P1 is set to (0, 0) coordinates.
I made some other tests and changes some stuff but it seems that the mouse position point variable is set to 0,0 in the missile trigger.
Help me please.
Thanks in advance