HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Too many triggers??? Battlechess project

04-24-2004, 11:49 PM#1
Flakey
My map below shows the extent of a 'Battlechess' project I'm working on.
Only problem is it crashes warcraft when it trys to load it, not the WE actually Warcraft.
If somebody could take a look I'd appreciate any opinions as to why it's happening, I have the development notes here so I could start again without much problem and get to this point in a few hours but it's still annoying.
Anyway, if it's just my machine - it might be - then I'd still appreciate any comments on the work, and any suggestions.
The idea is to make 72 cut scenes, eventually (I'll just get the board working for now, to show the story of how each piece died at the hands of the other, ie The Queen goes to confession and the bishop kills her(?), a pawns assault a castle in an attack and get blown up, etc, etc
Also the game will show the legal moves, using the highlight you can see on the map, when a piece is selected, for easy visual and ease of thought.
Obviously I'm gonna have to trigger to create the pieces and whatnot from scratch to ensure that the map is still tiny or the cinematics would make this map too huge.
The mp3's will be the biggest thing.
Anyway getting off the point, could somebody take a look see at the code, I can't see why it should crash it anyhow.
Maybe there's a limit on how many triggers you can have or something.
Cheers.
04-25-2004, 12:37 AM#2
BBDino
so far it obvious that the trigger 'set up variables' has problems, as the game crahses the moment it is run, it is your trigger so you may have better luck finding a problem with it than i will.
04-25-2004, 02:57 AM#3
Flakey
Ok,
thought about what I was doing last.
I was creating the trigger that goes like this :

When ever a unit is given an order then
If that order is to move then do it
else
If that order is anything else then tell the unit to stop

ie

Events
Unit - A unit owned by Player 1 (Red) Is issued an order targeting a point
Unit - A unit owned by Player 1 (Red) Is issued an order targeting an object
Unit - A unit owned by Player 1 (Red) Is issued an order with no target
Unit - A unit owned by Player 2 (Blue) Is issued an order targeting a point
Unit - A unit owned by Player 2 (Blue) Is issued an order targeting an object
Unit - A unit owned by Player 2(Blue) Is issued an order with no target
Conditions
(Issued order) Not Equal to (Order(move))
cinematic Equal to False
Action
Unit - Order (Triggering unit) to Stop

(The cinematic variable is a boolean to tell the triggers if a cinematic is being displayed - ie not to keep the view on the chess board)
1. This should get any order from a unit by Player 1 and Player 2
2. Check to see if the order is not to move
Check that we're looking at the chess board, cinematic = false
3. Change the order to Stop - ie halt the order

Anyone know what's wrong, seems to me it should be fine - might be missing something fundimental

ps Here's the updated map, you can see what it looks like - I disabled the trigger (left it in for repair though)

Just thought, is it because of more than one Event, can you have multiple events?? Can't think of anything else, your help would be appreciated.
04-25-2004, 12:02 PM#4
Anitarf
It's rather obvious what happens: when a unit is given a no-move order, it is ordered to stop; that is an order, so the trigger runs again; because stop is a no-move order, the unit is ordered to stop again; there you have it, an infinite loop. Fix this with another condition:

(Issued order) Not Equal to (Order(stop))

That way, the trigger will not run on it's own action.
04-25-2004, 12:31 PM#5
Flakey
Thought of that this morning, it goes into an infinite loop and crashes.
Oh well, we live and learn,
A wise man is basically somebody who has screwed up many times before.
An idiot is somebody who doesn't learn from them.
I'm sure there will be a cheap hollywood chinese saying like that.
Just one more question, do the triggers initialise during the loading sequence - that's when the crash occurs, I thought it would have been only the map initialisation that would have pre-run.
04-25-2004, 01:27 PM#6
DoCa-Cola
If it's crashing during load then you have something that shouldn't be there. When I get home later I'll take a look at it, and see if I can't find what's wrong.

-DoCa
04-25-2004, 03:49 PM#7
Flakey
It's alright, it doesn't crash anymore, it makes sense that it's just an infinity loop, I issue an order to stop, which is caught by the trigger, which issues an order to stop, which is caught by the trigger......forever until it crashes.
I'm a bit pissed off at myself for not seeing it actually. I've been programming for about 15 years and I'm doing a Software Engineering degree - should have seen the obvious mistake.
Anyhow, I'll get this finished then publish it on one of the forums, see if I can get it 'hosted', I think that's the term.
Cheers for the help.
By the way, if anyone has any suggestions then get back to me.
(The current interface is going to be changed - gonna make it more warcraft interface - at the minute I'm doing everything from the left mouse button - going to program it for either - An easier, better user interface)