• 🏆 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!

More efficient quests

Status
Not open for further replies.
Level 5
Joined
Dec 21, 2012
Messages
89
Usually my quests looks like this one, I think when I have many quests like them cause leaks. Does when I do variable for triggering unit and for unit who get experience can my trigger work quicker. Can I set variable in trigger with time elapsed 0 seconds for heroes who get experience because it might take some memory. Also does my trigger have memory leaks
  • Moon Fruit
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • (Moon Flower Quest <gen> contains (Triggering unit)) Equal to True
      • (Ability being cast) Equal to Action
      • (MoonFruitsQuest[4] is enabled) Equal to True
      • ((Triggering unit) has an item of type |cffffcc00Moon Flowers) Equal to True
    • Actions
      • Set Temp_Region = Moon Flower Quest <gen>
      • Environment - Set sky to Generic Sky
      • Item - Remove (Item carried by (Triggering unit) of type |cffffcc00Moon Flowers)
      • Camera - Apply moon fruit quest <gen> for Player 7 (Green) over 0.00 seconds
      • Cinematic - Turn cinematic mode On for PlayerGroup
      • Cinematic - Send transmission to PlayerGroup from Sarath (Female) 0069 <gen> named Villager: Play VillagerF1 <gen> and display You find Moon Flowe.... Modify duration: Set to 8.00 seconds and Wait
      • Cinematic - Turn cinematic mode Off for PlayerGroup
      • Camera - Reset camera for Player 7 (Green) to standard game-view over 0.05 seconds
      • Sound - Stop the currently playing music theme
      • Sound - Play Sound\Music\mp3Music\War2IntroMusic.mp3
      • Sound - Play ItemReceived <gen>
      • Hero - Add 1500 experience to Monk 0788 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Berserker 0470 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Sentry 0653 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Sylvanas 1397 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Necromancer 1396 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Monster 0919 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Dryad 0100 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Tauren Chiefman 0057 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Skeletal King 0199 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Orc Shaman 0289 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Spider Lord 0049 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Sorceress 1401 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Vampire 0062 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Dwarf Warrior 0651 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Assassin 1086 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Spell Breaker 0652 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Dark Priest 0473 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Paladin Warrior 0917 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Dark Archmage 0205 <gen>, Hide level-up graphics
      • Hero - Add 1500 experience to Elemental Mage 1131 <gen>, Hide level-up graphics
      • Hero - Create Moon Potion and give it to (Triggering unit)
      • Game - Display to PlayerGroup the text: |cffffcc00You recei...
      • Special Effect - Destroy SarathEffect[29]
      • Quest - Change the description of MoonFruitsQuest[4] to You find Moon Flowe...
      • Quest - Mark MoonFruitsQuest[4] as Completed
      • Sound - Play QuestCompleted <gen>
      • Quest - Flash the quest dialog button
      • Environment - Set sky to None
      • Floating Text - Destroy (Last created floating text)
      • Custom script: call RemoveRect(udg_Temp_Region)
      • Sound - Stop VillagerF1 <gen> After fading
      • Sound - Stop ItemReceived <gen> After fading
      • Sound - Stop QuestCompleted <gen> After fading
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
player group in floating text is all players
 
Level 5
Joined
Dec 21, 2012
Messages
89
Can I somehow destroy data stored variable using custom script or in different way when I no longer need them like this one after completed quest
  • Quest - Mark BanditsAttack as Completed
Variable :BanditsAttack Quest
 
Last edited:
Level 29
Joined
Oct 24, 2012
Messages
6,543
Can I somehow destroy data stored variable using custom script or in different way when I no longer need them like this one after completed quest
  • Quest - Mark BanditsAttack as Completed
Variable :BanditsAttack Quest

  • Custom script: call DestroyQuest( udg_urQuest)
  • Custom script: set udg_urQuest = null
I'm not sure if destroying the quest will remove the quest complete thing in the quest guide.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Do they magically disappear?

Leaks are anything that is not removed before being overwritten. So if you never overwrite quests they don't leak.

It was a simple mistake. No reason for the sarcastic comment.

Also as i have said i don't know if the quest complete thing removes from the quest guide when quests get removed ?
 
Last edited:
Level 26
Joined
Aug 18, 2009
Messages
4,097
Leaks are anything that is not removed before being overwritten. So if you never overwrite quests they don't leak.

As with any other handle.

A leak is an allocated area of memory you cannot access any longer, therefore not release.

If you plainly say that quests cannot leak, you make it sound like it's impossible with them to achieve this result.

I am not trying to be sarcastic in particular but the users get the common false impression that some types of handles would be evil, while others are good to go.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
As with any other handle.

A leak is an allocated area of memory you cannot access any longer, therefore not release.

If you plainly say that quests cannot leak, you make it sound like it's impossible with them to achieve this result.

I am not trying to be sarcastic in particular but the users get the common false impression that some types of handles would be evil, while others are good to go.

That is true i should've worded it a lot better i will make sure to do so in the future. Thanks for the update and correcting of my mistake.
 
Status
Not open for further replies.
Top