• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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