| 02-21-2005, 08:52 PM | #1 |
Ive recently had a problem with a map i've been trying to get to work. I created a couple simple variables and regions, and now my entire map is freaking out. Everytime i try to take a wisp to get a hero (this map is similar to Warchasers), my entire screen freezes up and wont go any further. :( Thanks in advance, ^_^ Nieffed |
| 02-21-2005, 11:16 PM | #2 |
Guest | that happend to me on a map i was making i just deleted all the variables and made new ones and it worked fine. are you using weu cause at the time thats what i was using could be that but i dont know i would also like to know y this happend. |
| 02-21-2005, 11:44 PM | #3 |
nah, i use the original WE because i've always had trouble with the other editors. |
| 02-22-2005, 07:21 AM | #4 | |
Quote:
welcome to the world of programming, you my friend have created an infinite loop. i took a quick look at the trigger, the event is when a unit enters the region, it removes the entering unit and creates a demon hunter, sound simple enough... but wait! the demon hunter is created in the region, therefore the demonhunter itself has entered the region, so remove the demon hunter and create a demon hunter... again a unit has entered the region so remove the unit and create a demon hunter... you can see where this is going, and this will be happening hundreds of times a second |
| 02-22-2005, 09:43 AM | #5 |
Correct. You can easily remove this problem by adding a unit-type comparison to your trigger, so that it only removes the entering unit and creates a demon hunter if the entering unit is a wisp. That way, when the demon hunter is created, the trigger will run once more, but this time it will be stopped because the entering unit won't be a wisp, and that will break the loop. |
| 02-22-2005, 12:36 PM | #6 | |
Guest | Quote:
Or you could make the last action: Trigger- Turn off this trigger. |
| 02-22-2005, 12:39 PM | #7 |
Thanks everyone for your help. It all makes a lot of sence now. :D |
| 02-22-2005, 05:27 PM | #8 | |
Quote:
|
| 02-22-2005, 05:35 PM | #9 |
Or of course you could make him spawn in a region a little away from the other region. |
| 02-22-2005, 05:44 PM | #10 |
Guest | If i still can give a tip about programming. Gui and i think JASS (i'm studying now) are object programming, common to Delphi, Java, C++ After doing all the triggers you must now exactly what to do, and write down on a paper, like you mistake was creating the infinite loop, i myself created sometimes for much less, like in delphi programmin i forgot a simple ';'. The tricky thing is when you do those things, you get pissed off and don't know what you've done. In case of GUI or JASS, always read with caution what the action and events will make, a great call is make the conditions to simple cases. Well, that sounds confusing, hope you got it the idea. |
| 02-22-2005, 06:25 PM | #11 | |
Quote:
|
| 02-22-2005, 06:51 PM | #12 |
Guest | Well programming is never as easy as it looks, but once the things are moving on as you imagined, there is no better reward than the smile on the face :) |
| 02-22-2005, 07:23 PM | #13 | |
Quote:
Tch. Yes it is. Just don't make mistakes. Ever. ;) |
| 02-22-2005, 11:22 PM | #14 | |
Quote:
while warcraft 3 itself is object oriented, to me JASS looks rather procedural based much like visual basic as opposed to java |
