[Trigger] SOLVED: Kills not granting EXP

Level 11
Joined
Aug 24, 2022
Messages
430
Hello once more Hivers! I'd like some help to figure out what is happening here. I'll explain below:

I've made a custom spell based on Firebolt, that just cast it multiple times (Making a single target be an AoE spell), and it works very well. The problem is, when we cast the spell, and we retreat with our hero, killed units don't grant EXP. This shouldn't happen, as my project has global EXP gain, and it works on every other spell already made. I've noticed that if we get "out of range" of the spell, the EXP is not granted. Below, I'll leave some information:

  • Magic Missiles T1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Magic Missiles (Rank 1)
    • Actions
      • Set VariableSet Temp_Location_For_Players[(Player number of (Triggering player))] = (Target point of ability being cast)
      • Set VariableSet Temp_Location_For_Players2[(Player number of (Triggering player))] = (Position of (Casting unit))
      • Set VariableSet Temp_Group_For_Players[(Player number of (Triggering player))] = (Units within 300.00 of Temp_Location_For_Players[(Player number of (Triggering player))] matching (((Triggering player) is an enemy of Player 8 (Pink).) Equal to True).)
      • Unit - Create 1 Dummy Arena Effect for (Owner of (Casting unit)) at Temp_Location_For_Players2[(Player number of (Triggering player))] facing Default building facing degrees
      • Unit - Add a 0.25 second Generic expiration timer to (Last created unit)
      • Unit - Add Magic Missiles (Dummy Rank 1) to (Last created unit)
      • Unit - Set level of Magic Missiles (Dummy Rank 1) for (Last created unit) to (Level of (Ability being cast) for (Casting unit))
      • Unit Group - Pick every unit in Temp_Group_For_Players[(Player number of (Triggering player))] and do (Actions)
        • Loop - Actions
          • Unit - Order (Last created unit) to Neutral - Firebolt (Picked unit)
      • Custom script: call RemoveLocation( udg_Temp_Location_For_Players[GetConvertedPlayerId(GetTriggerPlayer())] )
      • Custom script: call RemoveLocation( udg_Temp_Location_For_Players2[GetConvertedPlayerId(GetTriggerPlayer())] )
      • Custom script: call DestroyGroup(udg_Temp_Group_For_Players[GetConvertedPlayerId(GetTriggerPlayer())] )

1732802190302.png


1732802217598.png


I thanks in advance.
 
Level 11
Joined
Aug 24, 2022
Messages
430
dummy dies before firebolt kills. So killing unit == (no unit) --> Owning player == null --> nobody gets exp.
Tested here and fixed well. 100% precision.

But I got a doubt now: If everythings gets nullified in this case, why just this spell do not grant EXP? Maybe all other spells are not granting EXP and I didn't notice? I don't think so. Damn, I have a lot of spells to check then.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Tested here and fixed well. 100% precision.

But I got a doubt now: If everythings gets nullified in this case, why just this spell do not grant EXP? Maybe all other spells are not granting EXP and I didn't notice? I don't think so. Damn, I have a lot of spells to check then.
It's after the unit expires that it's removed from the game, so it all depends on how long your expiration timer lasts and how quickly the damage is dealt.

A spell like War Stomp would deal damage immediately, but Storm Bolt relies on a Missile which takes time to hit it's target.
 
Top