• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] Skillshot ability not working

Status
Not open for further replies.
Level 2
Joined
Mar 29, 2014
Messages
11
My triggering is probably done wrong, but here it is anyway.

- What I want is for a unit to be created at the casters position and attack ground, so it makes a projectile model for my skillshot. It works fine, except for the first time it is cast. I cannot see why this happens.


Power Shot Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Power Shot
Actions
Unit - Create 1 Power Shot Model [Fix] for Player[(Player number of (Owner of (Casting unit)))] at PowerShotCastPoint[(Player number of (Owner of (Casting unit)))] facing (Angle from PowerShotCastPoint[(Player number of (Owner of (Casting unit)))] to PowerShotTargetPoint[(Player number of (Owner of (Casting unit)))]) degrees
Set PowerShotModel[(Player number of (Owner of (Casting unit)))] = (Last created unit)
Unit - Move PowerShotModel[(Player number of (Owner of (Casting unit)))] instantly to ((Position of Hero[(Player number of (Owner of (Casting unit)))]) offset by 50.00 towards (Angle from PowerShotCastPoint[(Player number of (Owner of (Casting unit)))] to PowerShotTargetPoint[(Player number of (Owner of (Casting unit)))]) degrees)
Countdown Timer - Start PowerShotTimer[(Player number of (Owner of (Casting unit)))] as a One-shot timer that will expire in 1.50 seconds
Set PowerShotArrowActive[(Player number of (Owner of (Casting unit)))] = PowerShotArrow[(Player number of (Owner of (Casting unit)))]
Set PowerShotDamage[(Player number of (Owner of (Casting unit)))] = (300 + ((Level of (Ability being cast) for (Casting unit)) x 30))
Set PowerShotCastPoint[(Player number of (Owner of (Casting unit)))] = (Position of (Casting unit))
Set PowerShotTargetPoint[(Player number of (Owner of (Casting unit)))] = (Target point of ability being cast)
Unit - Move PowerShotArrow[(Player number of (Owner of (Casting unit)))] instantly to ((Position of (Casting unit)) offset by 0.00 towards (Angle from PowerShotCastPoint[(Player number of (Owner of (Casting unit)))] to PowerShotTargetPoint[(Player number of (Owner of (Casting unit)))]) degrees)
Unit - Order PowerShotModel[(Player number of (Owner of (Casting unit)))] to Attack Ground (PowerShotCastPoint[(Player number of (Owner of (Casting unit)))] offset by 1500.00 towards (Angle from PowerShotCastPoint[(Player number of (Owner of (Casting unit)))] to PowerShotTargetPoint[(Player number of (Owner of (Casting unit)))]) degrees)

Edit: It's not a problem with variable settings, such as Player[Index] they are all set at map init.

I'm dumb, just figured it out.
 
Last edited:
Status
Not open for further replies.
Top