HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spawn Triggers making game 'jumpy'

08-17-2005, 11:06 PM#1
HexenLordX
Yes I know, I'm a man of 1000 mapping problems, but the spawning triggers I use are making my map seem jumpy from the start. Take a look, this is the Spawn Trigger:

Saibamen
Events
Time - Elapsed game time is 5.00 seconds
Conditions
Actions
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Set JellyPoint[13] = (Random point in Saiba1 <gen>)
Unit - Create 1 Saibaman for Neutral Hostile at JellyPoint[13] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Set JellyPoint[18] = (Random point in Saiba2 <gen>)
Unit - Create 1 Saibaman 2 for Neutral Hostile at JellyPoint[18] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 15, do (Actions)
Loop - Actions
Set JellyPoint[12] = (Random point in Saiba2a <gen>)
Unit - Create 1 Saibaman 2 for Neutral Hostile at JellyPoint[12] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 7, do (Actions)
Loop - Actions
Set JellyPoint[19] = (Random point in Saiba2b <gen>)
Unit - Create 1 Saibaman 2 for Neutral Hostile at JellyPoint[19] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 3, do (Actions)
Loop - Actions
Set JellyPoint[20] = (Random point in Saiba2c <gen>)
Unit - Create 1 Saibaman 2 for Neutral Hostile at JellyPoint[20] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 50, do (Actions)
Loop - Actions
Set JellyPoint[11] = (Random point in Saiba3 <gen>)
Unit - Create 1 Saibaman 3 for Neutral Hostile at JellyPoint[11] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 25, do (Actions)
Loop - Actions
Set JellyPoint[21] = (Random point in Saiba3a <gen>)
Unit - Create 1 Saibaman 3 for Neutral Hostile at JellyPoint[21] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Set JellyPoint[22] = (Random point in Saiba3b <gen>)
Unit - Create 1 Saibaman 3 for Neutral Hostile at JellyPoint[22] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Set JellyPoint[23] = (Random point in Saiba3c <gen>)
Unit - Create 1 Saibaman 3 for Neutral Hostile at JellyPoint[23] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 15, do (Actions)
Loop - Actions
Set JellyPoint[10] = (Random point in Saiba45a <gen>)
Set JellyPoint[9] = (Random point in Saiba45a <gen>)
Unit - Create 1 Saibaman 4 for Neutral Hostile at JellyPoint[9] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Unit - Create 1 Saibaman 5 for Neutral Hostile at JellyPoint[10] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Set JellyPoint[10] = (Random point in Saiba45a <gen>)
Set JellyPoint[9] = (Random point in Saiba45a <gen>)
Unit - Create 1 Saibaman 4 for Neutral Hostile at JellyPoint[9] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Unit - Create 1 Saibaman 5 for Neutral Hostile at JellyPoint[10] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 5, do (Actions)
Loop - Actions
Set JellyPoint[24] = (Random point in Saiba45b <gen>)
Unit - Create 1 Saibaman 5 for Neutral Hostile at JellyPoint[24] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Unit - Create 1 Saibaman 4 for Neutral Hostile at JellyPoint[24] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 25, do (Actions)
Loop - Actions
Set JellyPoint[8] = (Random point in Saiba6 <gen>)
Unit - Create 1 Saibaman 6 for Neutral Hostile at JellyPoint[8] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 25, do (Actions)
Loop - Actions
Set JellyPoint[8] = (Random point in Saiba6 <gen>)
Unit - Create 1 Saibaman 6 for Neutral Hostile at JellyPoint[8] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 25, do (Actions)
Loop - Actions
Set JellyPoint[8] = (Random point in Saiba6 <gen>)
Unit - Create 1 Saibaman 6 for Neutral Hostile at JellyPoint[8] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 25, do (Actions)
Loop - Actions
Set JellyPoint[8] = (Random point in Saiba6 <gen>)
Unit - Create 1 Saibaman 6 for Neutral Hostile at JellyPoint[8] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 5, do (Actions)
Loop - Actions
Set JellyPoint[25] = (Random point in Saiba6a <gen>)
Unit - Create 1 Saibaman 6 for Neutral Hostile at JellyPoint[25] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 5, do (Actions)
Loop - Actions
Set JellyPoint[26] = (Random point in Saiba6b <gen>)
Unit - Create 1 Saibaman 6 for Neutral Hostile at JellyPoint[26] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 5, do (Actions)
Loop - Actions
Set JellyPoint[27] = (Random point in Saiba6c <gen>)
Unit - Create 1 Saibaman 6 for Neutral Hostile at JellyPoint[27] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Set JellyPoint[28] = (Random point in Saiba6d <gen>)
Unit - Create 1 Saibaman 6 for Neutral Hostile at JellyPoint[28] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 75, do (Actions)
Loop - Actions
Set JellyPoint[7] = (Random point in Saiba7 <gen>)
Unit - Create 1 Saibaman 7 for Neutral Hostile at JellyPoint[7] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 50, do (Actions)
Loop - Actions
Set JellyPoint[6] = (Random point in Saiba8 <gen>)
Unit - Create 1 Saibaman 8 for Neutral Hostile at JellyPoint[6] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Set JellyPoint[29] = (Random point in Saiba8a <gen>)
Unit - Create 1 Saibaman 8 for Neutral Hostile at JellyPoint[29] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
For each (Integer A) from 1 to 15, do (Actions)
Loop - Actions
Set JellyPoint[5] = (Random point in Saiba9 <gen>)
Unit - Create 1 Saibaman 9 for Neutral Hostile at JellyPoint[5] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
Point - Remove JellyPoint[5]
Point - Remove JellyPoint[6]
Point - Remove JellyPoint[7]
Point - Remove JellyPoint[8]
Point - Remove JellyPoint[9]
Point - Remove JellyPoint[10]
Point - Remove JellyPoint[11]
Point - Remove JellyPoint[12]
Point - Remove JellyPoint[13]
Point - Remove JellyPoint[18]
Point - Remove JellyPoint[19]
Point - Remove JellyPoint[20]
Point - Remove JellyPoint[21]
Point - Remove JellyPoint[22]
Point - Remove JellyPoint[23]
Point - Remove JellyPoint[24]
Point - Remove JellyPoint[25]
Point - Remove JellyPoint[26]
Point - Remove JellyPoint[27]
Point - Remove JellyPoint[28]
Trigger - Destroy (This trigger)

This is a smaller, less complicated spawn:

Androids
Events
Time - Elapsed game time is 45.00 seconds
Conditions
Actions
For each (Integer A) from 1 to 50, do (Actions)
Loop - Actions
Set JellyPoint[15] = (Random point in Aspawnb <gen>)
Unit - Create 1 Android 7 for Neutral Hostile at JellyPoint[15] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 15.00 seconds
For each (Integer A) from 1 to 100, do (Actions)
Loop - Actions
Set JellyPoint[4] = (Random point in Amainspawn <gen>)
Unit - Create 1 Android 7 for Neutral Hostile at JellyPoint[4] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 10.00 seconds
For each (Integer A) from 1 to 100, do (Actions)
Loop - Actions
Set JellyPoint[4] = (Random point in Amainspawn <gen>)
Unit - Create 1 Android 7 for Neutral Hostile at JellyPoint[4] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 30.00 seconds
For each (Integer A) from 1 to 50, do (Actions)
Loop - Actions
Set JellyPoint[14] = (Random point in Aspawna <gen>)
Unit - Create 1 Android 7 for Neutral Hostile at JellyPoint[14] facing (Random angle) degrees
Unit Group - Destroy unit group (Last created unit group)
Wait 1.50 seconds
Point - Remove JellyPoint[4]
Point - Remove JellyPoint[14]
Point - Remove JellyPoint[15]
Trigger - Destroy (This trigger)

I'm almost positive that it is these triggers causing the jumping, because it didn't happen until I just put them in. I have a few other spawning triggers that are identical to the second one, but they don't run until much later in the game. Anyone see the problem?
08-17-2005, 11:52 PM#2
Taur
what exactly is jumping? Lag? Anyways the first time you run a trigger especialy a large trigger there is bound to be a little lag.

Anyways... you might want to post the JASS code it might help
08-17-2005, 11:52 PM#3
HexenLordX
Nevermind I fixed this, I had one of the spawn triggers trying to spawn in JellyPoint[300] when I set the variable to [30]. Woops ;).

And no it wasn't just lagging during the trigger, it would make the entire duration of the game jumpy.