| 11-24-2003, 10:43 PM | #1 |
OK... I have a timebar-based combat system in this RPG I'm making... and it involves a lot of order checking. So it was working fine until I started saving my games.... when I discovered a BIG PROBLEM: Here's the code of a simple debugging trigger I have in the map: Code:
Order Catcher Events ----A unit is issued an order targetting an object ----A unit is issued an order targetting a point ----A unit is issued an order with no target Conditions ----Owner of (ordered unit) not equal to Neutral Passive Actions ----Game - Display to all players the text (Order: +(string(issued order))) Before I save the game - through the game menu, not by cache - it works just as you would expect it to. Each time a unit is ordered to do something, a line of text prints out that says "Order:" and then the order string - for example, "Order: smart." But when I LOAD my saved game, the printout says "Order: " meaning the order string is empty. EVERY. TIME. NO. MATTER. WHAT. THE. ORDER. IS. What the hell is wrong? I just got excited because I solved another problem which never really made any difference till the save issue popped up... but this is worse... how can I distinguish between orders if when my map is loaded from a save, all the orders go out the window? |
| 11-25-2003, 12:12 AM | #2 |
Another test trigger I tried: Code:
Tester
Events
-Player - Player 1 (Red) types a chat message containing hmmm as A substring
Conditions
Actions
-Game - Display to (All players) the text: (string(order(smart)) = + (String((Order(smart)))))
-Game - Display to (All players) the text: (string(order(holdposition)) = + (String((Order(holdposition)))))
-Game - Display to (All players) the text: (string(order(stop)) = + (String((Order(stop)))))
-Game - Display to (All players) the text: (string(order(attack)) = + (String((Order(attack)))))Results: before saving: string(order(smart))) = smart string(order(holdposition))) = holdposition string(order(stop))) = stop string(order(attack))) = attack After Loading: string(order(smart))) = string(order(holdposition))) = string(order(stop))) = string(order(attack))) = I'm getting scared... |
| 11-25-2003, 12:12 PM | #3 |
The latest news: it's not just my map. I created a new, blank map - no triggers, no imports, no custom data. I tried out the "tester" trigger from the previous post, before and after loading a save, with the same results. Loading must somehow corrupt the functions that convert between orders and strings - orders still work right; they just can't be recognized in triggers. Does Blizzard know about this already? |
| 11-25-2003, 01:08 PM | #4 |
That's an interesting bug. I tried it on a map myself and got the same result, so it's not just your game either ;) |
