• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Crash] Using "Unit enters in (Playable map area)" event breaks my map

Status
Not open for further replies.
Level 24
Joined
Jun 26, 2020
Messages
1,924
Hello, in the map I'm working for some reason, I have this 2 triggers that doesn't cause me problems:
  • Calm Mind
    • Events
      • Unit - A unit Gains a level
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Level of CalmMindSpell for (Triggering unit)) Greater than 0
    • Actions
      • Unit - Set Max Mana of (Triggering unit) to ((Max Mana of (Triggering unit)) + CalmMindManaPerLevel)
  • Strong OnLevel
    • Events
      • Unit - A unit Gains a level
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Level of StrongSpell for (Triggering unit)) Greater than 0
    • Actions
      • Unit - Set Max HP of (Triggering unit) to ((Max HP of (Triggering unit)) + StrongHealthPerLevel)
But if I add at least 1 more trigger with the event "A unit enters (Playable map area)" the map gets broken: the unit moving is weird, the other triggers with a "A unit enters in a region (any region, not just the Playable map area)" aren't working and the game crashes when I leave the match, before you asking, I'm not using the 1.33 version, so what's wrong with it?
Since the map is too heavy and my internet is too slow, I can't share you, but I wanna know if there could be for this happening.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,275
so what's wrong with it?
Cells are being attached to too many regions, breaking some sort of internal data structure or making path finding too complex that a limit is hit.

Every copy of that event is creating a brand new region and associating every cell in the playable map area rect in it, which is a lot of associations and a lot of cells attached to regions. For this reason it is recommended to have the event only once and make that trigger run all other triggers you want to fire on that event.

I am using the JASS context when talking about region and rect. GUI context "regions" are of type rect with the JASS type of region not being directly available to GUI users but used internally as part of that event.
 
Status
Not open for further replies.
Top