• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Loading handle from dead unit

Status
Not open for further replies.
Level 10
Joined
May 24, 2016
Messages
367
Code:
if d == MortarUnitQuest then
call echo("dead quest")
call GroupRemoveUnit(QuestGroup,d)
call GroupClear(CryptSpidersGroup)
call DestroyGroup(CryptSpidersGroup)
call QuestSetFailed( CryptSpiders, true )
//call KillUnit( gg_unit_e00P_0278 )
call DestroyEffect(LoadEffectHandle(Hash,GetHandleId(MortarUnitQuest),StringHash("QuestMark")))
 call TriggerRemoveAction(CryptSpidersTrigger,LoadTriggerActionHandle(Hash,GetHandleId(CryptSpidersTrigger),0))
 call DestroyTrigger(CryptSpidersTrigger)

// call QuestSetFailed( CryptSpiders, true )
 call TriggerRemoveAction(gg_trg_CryptSpidersQuest,LoadTriggerActionHandle(Hash,GetHandleId(gg_trg_CryptSpidersQuest),0))
 call DestroyTrigger(gg_trg_CryptSpidersQuest)
endif
Yeah as you can see, I doubt myself is it valid to do. I found something in my map, when Iam entering of unit range event (in this case it's variable MortarUnitQuest), and then kills this unit, the map is probably going crazy just like I posted before.
 
My gosh, I tested more, and now I feel like the problem is in
Code:
call GroupRemoveUnit(QuestGroup,d)
call GroupClear(CryptSpidersGroup)
call DestroyGroup(CryptSpidersGroup)
When I destroy this global groups. Dont know why, I only check in the same dead even trigger for CountsUnitInGroupBJ, so I know the group is destroyed now.
 
Status
Not open for further replies.
Back
Top