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

[Trigger] Constant map crash on a encounter reset

Status
Not open for further replies.
Level 8
Joined
Dec 11, 2012
Messages
412
So, hi there. I'm back on another topic with another issue and I was wondering how to prevent my map from crashing. I am working on a huge project at the moment and I'm having raid bosses in them.

Lets take an example.

1 boss. I completly scripted him and when players wipe, the boss resets, but on next attempt, map crashes. Why? I don't know To me, I think it's either problem the Warcraft 3 I downloaded or a common mistake in editor.

If anyone can tell me how to undo this constant map crashing, please tell.

Also, map crashes whenever I get to a little crystal phase. Basicly, lightning effect spawns from 1 to another unit and it works on 1st attempt. On next attempt, map crashes. If anyone's got solution, please tell.
 
Level 8
Joined
Dec 11, 2012
Messages
412
How the encounter starts:
http://i.imgur.com/RGJ8OcS.jpg

Okay, so this is base Stomp ability. You can guess from scratch which boss is this but nvm.
http://i.imgur.com/yDoWrgo.jpg


Stomp abilties in particular are all the same. The only difference is that they use different variables.

Crystal ability uses lightning to attach it on casters and spawn a lightning effect on casters 'til they destroy it. Once its destroyed, it deals damage, but the 1st Crystal trigger you see resets it any time boss health is back, meaning if boss in any case regains health, he'll do it over again.

SS:
http://i.imgur.com/F4wgmMO.jpg
http://i.imgur.com/ojLMcMd.jpg
http://i.imgur.com/YONkTk8.jpg
http://i.imgur.com/EzORL8y.jpg

Now, here is an encounter reset and how it looks like.

Pay attention because these scripts contain easiest version possible and I had to take 3 SS for 1 trigger, sorry. Just watch the trigger name and you'll know.

Encounter reset condition:
http://i.imgur.com/rwCH6y3.jpg
http://i.imgur.com/bdPrHH3.jpg
SS:
http://i.imgur.com/L1KTMrr.jpg
http://i.imgur.com/QPVxYak.jpg
http://i.imgur.com/JLgTFQS.jpg
This is only 1 trigger. Couldn't SS it all in 1 SS.

All of these functions work but I don't know what's causing the map crash. If you got an answer, I'd sure appreciate if you help me fix it.:ogre_haosis:
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
To me, I think it's either problem the Warcraft 3 I downloaded
The version Blizzard provides on BattleNet 2.0 is virtually identical to the CD version and will function identically to my knowledge. If you downloaded from a third party then I am afraid you are on your own as we do not willingly help pirates.

What pic? I think I couldn't find it. Can you tell me?
You made the map, you should know.

I believe he is referring to the lower SS trigger.
http://i.imgur.com/L1KTMrr.jpg
http://i.imgur.com/QPVxYak.jpg
http://i.imgur.com/JLgTFQS.jpg
BASE Morchok Reset Condition

The simplest solution is to maintain a null value in the variables and use a branch (if then else) to destroy the lightning only if the variable contains a non null value (and obviously you null it after destruction). This is a pretty common programming procedure which will guarantee the destruction of an object at a certain point in execution even if it may or may not exist. Sure it adds the overhead of an extra test but the performance impact in this particular use case can be ignored completely.

You should never call a destructor on objects that do not exist. A common real life program crash is when you destroy objects that are already destroyed or do not exist.
 
Level 8
Joined
Dec 11, 2012
Messages
412
How am I a pirate if I downloaded a game from wrong site for free when the game is usually for free?

EDIT: The crash was fixed. Now, the only problem existing is that boss keeps reseting after every time he enters phase 2 (3 times the most)
 
Last edited:
Level 19
Joined
Aug 8, 2007
Messages
2,765
How am I a pirate if I downloaded a game from wrong site for free when the game is usually for free?

EDIT: The crash was fixed. Now, the only problem existing is that boss keeps reseting after every time he enters phase 2 (3 times the most)

The game is not free, it's 20$
 
Level 8
Joined
Dec 11, 2012
Messages
412
Why would I buy it then if it's not for free. The original one I had was bought to me by my cousin, now it's gone.

But dont go offtop. I'm kinda stuck with boss now again. He keeps reseting on phase 2.

Lemme explain.

So, I've changed a couple of things and as usual this is how Stomp looks like:
https://i.imgur.com/We1WYKa.jpg

... and this... is phase 2.
https://i.imgur.com/tNi8R5E.jpg
https://i.imgur.com/kLgbedS.jpg
https://i.imgur.com/L6IRraz.jpg
https://i.imgur.com/arG5YVy.jpg
https://i.imgur.com/lp4Pb6R.jpg
https://i.imgur.com/CrAMPhh.jpg
All of this is 1 trigger. I couldn't get it in 1 SS, sorry.
Now, this is the black blood damage condition so if you stand in the ooze, u will get damage.
https://i.imgur.com/1qezqoP.jpg

This is how it looks like when boss dies:
https://i.imgur.com/EDJr0LI.jpg

... and this is how reset condition looks now.
https://i.imgur.com/qVU5pAG.jpg
https://i.imgur.com/ZBMiEtn.jpg
... and the reset itself.
https://i.imgur.com/NVJOpNg.jpg
https://i.imgur.com/2BgZQFk.jpg

+ aggro loss if you go 2 far away from the boss:
https://i.imgur.com/IndnvnU.jpg
https://i.imgur.com/EUOvWnk.jpg

Now, let me explain the issue. When I fight the boss in the meanwhile, it goes well and then boss enter phase 2, which is "Black Blood of the Earth" phase where Morchok spawns rocks and you have to go and hide behind them. During the cast time he... just resets. I don't know how or why, he just does reset and when I attempt him again, he resets again on same phase. If anyone can tell me what's causing this, I'd sure appreciate it. :)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
How am I a pirate if I downloaded a game from wrong site for free when the game is usually for free?
It is not for free. You need to buy a licence (CD KEY). Yes it still is sold and most game shops still have WC3. If ones near you do not you can buy it off BattleNet 2.0 (which also does the download).

Yes you can download the game for free (you just need the downloader from BattleNet 2.0) but still to install and play it you need a CD KEY. Installing and playing it at any other time is technically against the law and so considered piracy (which is not supported by this site).

The original one I had was bought to me by my cousin, now it's gone.
Which was your cousin's licence. You need your own licence to play WC3. Anything else is piracy which is technically a crime.

But dont go offtop. I'm kinda stuck with boss now again. He keeps reseting on phase 2.
You were the one who raised the fact you pirated the game.

... and this is how reset condition looks now.
I do not see any tests in that condition... You have the names mixed up with the condition being the "reset itself" and the reset condition being the actual reset (which resets the boss).

In any case the likely cause is that you are performing the incorrect tests to determine when all players are dead in the arena and something the boss does causes a false positive in those tests thus resetting the boss even though all players are alive.

I cannot be bothered opening every screenshot and trying to piece together what you are doing. Either use the TRIGGER tags as suggested earlier or post the entire map so people can load it in the editor and look at clearly marked triggers related to the boss.

Upon closer examination I do not see where you register units as being alive or in agro range. For example if a unit was resurrected during the fight or if a player who previously left agro range comes back into agro range. The result may be that the move that you do to all players causes them to be out of the agro region resulting in it determining that the boss requires resetting as no players are fighting it. The solution in this case is to correctly count the number of players in agro range (decrement the counter when players enter the region) and also to turn off the trigger during the move procedure when phase 2 starts. Do remember that dead players should not be moved, especially if they are heroes, as dead heroes usually are placed hidden in one of the map corners.

You do not need to check every value of the player counter integer, only the values that you actually want something to happen with.
 
Level 8
Joined
Dec 11, 2012
Messages
412
1 - I still got the CD key and CD but I didn't literally mean "gone". I meant, the CD is in very bad shape. CD key is still there 'tho. I never said I pirated, I only said I downloaded it for free. What harm can it do? Tbh, I never knew that its piracy if you download it for free 'til you told me.
2 - I kinda solved the issue.
3 - Now, I wish I can make him manually reset every time he dies. He resets once and next time you wipe, he doesn't sadly. I'll mix something new up. I don't wanna bother ya guys anymore.

As this issues is solved, I got nothing else to say but thank you all for helping me with the issue and I'll be sure to give credits for the help if I publish the map.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
I only said I downloaded it for free
Which is strange wording.

What harm can it do?
Unless you download it off BattleNet 2.0 there is a chance the download could contain Malware. A number of people have had pretty bad problems on this forum as a result of modified WC3 files and executable files from a pirated distribution. Although usually this is because they contain "cracks" it is almost certainly malware now since the cracks are for versions which have no CD protection anyway (Blizzard removed CD protection when they added the download to BattleNet 2.0).

3 - Now, I wish I can make him manually reset every time he dies. He resets once and next time you wipe, he doesn't sadly. I'll mix something new up. I don't wanna bother ya guys anymore.
It would be a lot easier on both us helping you and you making the post if you copy the triggers as text and then put them in the TRIGGER tags. If the trigger was long you can put it inside hidden tags to reduce the need for scrolling. In any case it takes you about 15 seconds or less to copy an entire trigger into a post using this method and saves on all the image processing and bandwidth.
 
Level 8
Joined
Dec 11, 2012
Messages
412
Please, don't go offtopic any more.

I'll try to find my CD key. Gotta mb around somewhere house.

Anyways: I've made the reset script less universal and problematic and I've fixed all of the issues. Thanks for the help. :)
 
Status
Not open for further replies.
Top