HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

The Variables

01-06-2005, 02:34 PM#1
tassadar920
You keep using "UnitVar" and the such in all the spells that you have, but won't this have a problem if two players (my map has 10 players in it), cast a spell simultaneously and it calls unitvar in one trigger, then in another and between the two calls of it one trigger changed the value? Won't your spell go haywire and cast on some random spot in the middle of nowhere.. which would cause really big problems?

How can I get around that?


--Also I just noticed... but is this whole system really bad for making level based spells? It seems like for spells with like 5 levels or so, it would be a huge pain to put them in.
01-06-2005, 10:35 PM#2
Vexorian
Quote:
Originally Posted by tassadar920
You keep using "UnitVar" and the such in all the spells that you have, but won't this have a problem if two players (my map has 10 players in it), cast a spell simultaneously and it calls unitvar in one trigger, then in another and between the two calls of it one trigger changed the value? Won't your spell go haywire and cast on some random spot in the middle of nowhere.. which would cause really big problems?

How can I get around that?


--Also I just noticed... but is this whole system really bad for making level based spells? It seems like for spells with like 5 levels or so, it would be a huge pain to put them in.
you are wrong in both statements, first every spell in the demo map is just a sample, but anyways I made sure they all are multi instanceable, I use the local variable trick when necessary but most of the times they aren't needed, when there is no wait between the set of the unit var and its use there is no problem.

And anyways, those are samples to help GUI people, in the real life the caster system was seriously designed for JASS , and in JASS it is completelly multi instanceable.

No pain with multiple levels , unless you don't know about the Level version of the functions.
01-07-2005, 03:19 AM#3
tassadar920
I missed the level functions on my first run through that, thanks for that information makes my life a lot easier.

This whole system is really well done, sucks that I don't know enough JASS to build my triggers completely out of JASS.