View Full Version : Slow??
Sodertalje
08-16-2004, 11:16 AM
I'm trying to make an rpg. I got some spells, and this is one of my triggers:
Conditions:
Player 1 brings at least 1 civilan to location 'spell'
Player 1 accumulates at least 55 gas
Actions:
Center view for current player at 'p1'
Wait 100 millieseconds
Create 1 Battlecrusier at 'p1' for player 1
Wait for 20 millieseconds
Create 1 Battlecrusier at 'p1' for player 1
the rest isn't important... the problem is: the Wait action is SLOW, almost turned into seconds! I wonder: why? I have hypper triggers.
EdvardMunch
08-16-2004, 12:18 PM
Which player are the hyper triggers in? If they're in player 1 (which is where I assume that trigger is), then they should be moved to a player without any waits, because hyper triggers tend to screw up the wait commands for the player they are in.
Sodertalje
08-16-2004, 12:35 PM
the hyper triggers are in 'All players'
EdvardMunch
08-16-2004, 12:38 PM
Then that's what is doing it. Just move the hyper triggers to a single player who doesn't have any wait commands.
Sodertalje
08-16-2004, 12:45 PM
Do you mean that i should move them to player 5(he does'nt have ne triggers at all)?
EdvardMunch
08-16-2004, 12:55 PM
Player 5 sounds like a great choice, just be sure that player 5 is a computer player and has a start location.
Sodertalje
08-16-2004, 1:13 PM
ok, what i've done: i gave player 5(comp) a start location and gave him 6 hyper triggers. But, it still does'nt work :(
EdvardMunch
08-16-2004, 1:58 PM
Hmmmmmmmmmmm... I'm not too good at blind troubleshooting, I'd have to see the map to be of further assistance.
Sodertalje
08-16-2004, 2:06 PM
ok. Player 2, the trigger 'Katon'
EdvardMunch
08-16-2004, 2:49 PM
I think I've figured it out.
In the force Naruto/Sasuke/Rocklee you have a trigger that goes something like
CONDITIONS
- Always
ACTIONS
- Add 1 gas to player 1
- Add 1 gas to player 2
- Add 1 gas to player 3
- Wait 1800 seconds
- Preserve trigger
Waits are a tricky little command, and only one wait may fire at a time. Thus, when you wait 1 millisecond to execute the next command in the Katon trigger, the game has to wait until this trigger is done with its 1800 millisecond wait before it will wait 1 millisecond.
There are a few ways to deal with them.
I most highly suggest you strike out that trigger and replace with this:
CONDITIONS
- Player X custom score is at most 0
ACTIONS
- Add 1 gas to player 1
- Add 1 gas to player 2
- Add 1 gas to player 3
- Set player X custom score to 14 points
- Preserve trigger
(where player X is a computer player whose custom score isn't being used. If all of the computer players' scores are being used, then just use any computer player's score which isn't being modified. Minerals or gas work too)
CONDITIONS
- Player X custom score is at least 1
ACTIONS
- Subtract 1 points from player X custom score
- Preserve trigger
8 trigger cycles may be executed in a second using hyper triggers, therefore it will take 14 trigger cycles to count up to 1.75 seconds, which is a puny .05 seconds off of your original wait.
Another way to deal with the problem is to remove the 1 millisecond waits from the Katon trigger, but then any other trigger with waits will have the same problem. In this case, you're best to nip the problem in the bud.
Sodertalje
08-16-2004, 3:53 PM
Thanx ^^
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.