Warcraft 3 documentation
vJASS & Zinc Documentation
For the latest documentation about how it works vJASS and Zinc language layers for Warcraft III, please follow these links:
Jasshelper documentation - Zinc documentation - WC3 Optimizer documentation

[HELP] A trigger that fires when game is restarted No New Posts General Jass Discussion

Started by
moyack

0 Members and 1 Guest are viewing this topic.

[HELP] A trigger that fires when game is restarted
on: January 22, 2012, 11:59:22 AM

Hello:

I was wondering if there's a trigger which runs when the game is restarted. I tried to see if game victory or game defeat runs in that moment. Thanks.


Re: [HELP] A trigger that fires when game is restarted
Reply #1 on: January 23, 2012, 06:07:11 PM

I just came up with a brilliant way to do it :D
First of all, when you restart a game, does the function config get called again? :O
If it doesn't, we can do this.
You're simply going to set a boolean that is true by default (a boolean called restarted) to false in the config function :D
I'm pretty sure config is only called when you host the map or something (probably how wc3 knows how many players there are supposed to be)
Plus, it calls SetMapDescription which is pretty useless in-game. That's more evidence as to why config would only be called while hosting the map.
If not, I have no idea :C

If I'm right, then you would depend on the value of the "restarted" boolean to know if the game is hosted for the first time or simply restarted :D



Re: [HELP] A trigger that fires when game is restarted
Reply #2 on: March 06, 2012, 07:49:07 AM

Hmmm... well, it seems complicated to have somehting like that, but I don't need it anymore, because I found the reason of the bug in my map.

*Never initialize sounds as constants*


Re: [HELP] A trigger that fires when game is restarted
Reply #3 on: March 15, 2012, 11:30:21 AM

That's why I always use SoundTools to manage my sounds :D
It's a lot easier ^_^



 

Started by TeslaTrooper

Replies: 4
Views: 9000
Starcraft 2 modding

Started by Magtheridon96

Replies: 0
Views: 9137
Codes & Snippets

Started by nestharus

Replies: 0
Views: 1703
Codes & Snippets

Started by s[ub]lime

Replies: 5
Views: 12240
Forum Games
Vivir aprendiendo.co - A place for learning stuff, in Spanish   Chaos Realm - The world of Game modders and wc3 addicts   Diplo, a gaming community   Power of Corruption, an altered melee featuring Naga and Demon. Play it now!!!   WC3JASS.com - The JASS Vault + vJASS and Zinc   Jetcraft - A Starcraft II mod   WormTastic Clan (wTc)   Warcraft RESOURCES Reforged: Modelos, mapas, proyectos y mas...