• 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.

[Wurst] Special Effect not appearing

Status
Not open for further replies.
Level 8
Joined
Sep 16, 2016
Messages
227
Code:
    EventListener.add(EVENT_PLAYER_UNIT_SPELL_ENDCAST) ->
        caster = GetTriggerUnit()
        let stand = "Stand"
        let attack = "Attack"
        if EventData.getSpellAbilityId() == 'A000'
            StopSound(Q1, false, false)
            PlaySound("Q2.mp3")
            SetUnitInvulnerable(caster, false)

            SetUnitAnimation(caster, stand)
            SetUnitAnimation(caster, attack)

            AddSpecialEffect(Units.abomination1, 10, 10)
            AddSpecialEffect(Units.abomination1, 25, 25)
            AddSpecialEffect(Units.abomination1, 0, 0)
            AddSpecialEffect(Units.abomination1, 50, 50)

I tried putting 1 and many of addspecialeffect but it doesnt appear anywhere. Does anyone have a clue as to why?

EDIT:

Okay, seems to be a coordination issue. I would like the effect to happen from my model, then to the direction my channel ability is directed to. What should I use instead?
 
Last edited:
Level 8
Joined
Sep 16, 2016
Messages
227
A bit of an update, I got the effect to show from my caster to the direction I chose, but it destroys immediately (after 1 second) and plays on initial cast, rather than playing on "endcast" and destroying effect after 5 seconds

Code:
let ABIL_ID = 'A000'

init



    Q1 = CreateSound("Q1.mp3", false, false, false, 0, 0, "DEFAULTEAXON")

    EventListener.add(EVENT_PLAYER_UNIT_SPELL_CHANNEL) ->
        caster = GetTriggerUnit()
        if EventData.getSpellAbilityId() == 'A000'
            PlaySoundBJ(Q1)
            SetUnitInvulnerable(caster, true)

    EventListener.add(EVENT_PLAYER_UNIT_SPELL_ENDCAST) ->
        caster = GetTriggerUnit()
           
        EventListener.onPointCast(ABIL_ID) (unit caster, vec2 targetPos) ->
            let fx = addLightning(
                "AFOD",
                true,
                caster.getPos(),
                targetPos
            )

            SetUnitAnimation(caster, "stand")
            SetUnitAnimation(caster, "attack")

            doAfter(5) ->
                fx.destr()
 
How are you getting a special effect the show at all on the second example, and why are you nesting the onPointCast inside your ENDCAST closure?
For the first example, try putting some prints before and after the special effect functions to see if the thread could be crashing.
 
Status
Not open for further replies.
Top