| 03-27-2005, 05:09 PM | #1 |
hi all, ive got a weird problem. Im working on my map Warcraft III Worms, now as you might suspect this needs biiiig triggers for moving around stuff on the map like bullets and grenades. It was all working perfectly, not even lagging a little. But now suddenly a problem arose. In a trigger that was ran by a trigger that was ran by another trigger that was ran by the main loop with periodic event I added an action like: set tempint = 0. This tiny action made the game crash. I tried removing it again, and all worked fine, however if I add the action DoNothing the game ALSO crashes. I'm getting a little scared here cause I dont think the action DoNothing should crash the game :S. Anyone know anything about wc3 crashing when it has 2do to many actions in a row without wait between them, and maybe a solution for it? :S:S:S |
| 03-27-2005, 05:55 PM | #2 |
Can you show the triggers, it's kinda hard to see exactly what you mean without any display of what you're doing that may cause it to crash. |
| 03-27-2005, 06:28 PM | #3 |
tho this wont help u in any way ;) here it goes: Code:
DamageCircle
Events
Conditions
Actions
Set temp_Group = (Units within dmg_Range of dmg_Point matching ((Unit-type of (Matching unit)) Equal to Worm))
Unit Group - Pick every unit in temp_Group and do (Actions)
Loop - Actions
Set temp_Point = (Position of (Picked unit))
Custom script: set udg_temp_Real = (udg_dmg_RealHeight) - (GetLocationZ(udg_temp_Point) + GetUnitFlyHeight(GetEnumUnit()))
Custom script: set udg_temp_Real2 = Pyt(DistanceBetweenPoints(udg_temp_Point, udg_dmg_Point), RAbsBJ(udg_temp_Real), 0)
Set temp_Real3 = ((dmg_Range - temp_Real2) / dmg_Range)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
temp_Real3 Less than or equal to 0.00
Then - Actions
Set temp_Real3 = 0.00
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
dmg_FullDamage Equal to True
temp_Real3 Greater than 0.00
Then - Actions
Set temp_Real3 = 1.00
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
temp_Real3 Greater than 0.00
Then - Actions
Sound - Play snd_Ouch[(Random integer number between 1 and 4)]
Else - Actions
Set dmg_WormDmg[(Player number of (Owner of (Picked unit)))] = (dmg_WormDmg[(Player number of (Owner of (Picked unit)))] + (temp_Real3 x dmg_MaxDamage))
Set temp_Force = (All allies of PlayingPlayer)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Picked unit)) is in temp_Force) Equal to True
Then - Actions
Set dmg_FriendlyFire = (dmg_FriendlyFire + (temp_Real3 x dmg_MaxDamage))
Else - Actions
Set dmg_Hit = (dmg_Hit + (temp_Real3 x dmg_MaxDamage))
Custom script: call DestroyForce(udg_temp_Force)
[color=RED]-------- Fly Worms --------
Set temp_Int = 0
For each (Integer A) from 1 to MP_Count, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Picked unit) Equal to MP_Units[(Integer A)]
Then - Actions
Set temp_Int = (Integer A)
Custom script: set bj_forLoopAIndex = udg_MP_Count
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
temp_Int Equal to 0
Then - Actions
Custom script: set udg_temp_Real = GetLocationZ(udg_temp_Point) - GetLocationZ(udg_dmg_Point)
Set temp_Real2 = (Distance between dmg_Point and temp_Point)
Set temp_Angle = (Atan2(temp_Real, temp_Real2))
Set temp_Angle2 = (Angle from temp_Point to dmg_Point)
Set temp_Angle2 = (temp_Angle2 + 180.00)
Custom script: set udg_temp_Real = GetLocationZ(udg_temp_Point)
-------- add to multiparticle --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is paused) Equal to False
Then - Actions
Unit - Pause (Picked unit)
Else - Actions
Set MP_Count = (MP_Count + 1)
Set MP_Units[MP_Count] = (Picked unit)
Set MP_GravityFactor[MP_Count] = 1.00
Set MP_RealHeight[MP_Count] = (temp_Real + 10.00)
Set MP_Vx[MP_Count] = (((Cos(temp_Angle2)) x ((temp_Real3 x (Cos(temp_Angle))) x dmg_MaxDamage)) x 30.00)
Set MP_Vy[MP_Count] = (((Sin(temp_Angle2)) x ((temp_Real3 x (Cos(temp_Angle))) x dmg_MaxDamage)) x 30.00)
Set MP_Vz[MP_Count] = (((Sin(temp_Angle)) x (temp_Real3 x dmg_MaxDamage)) x 40.00)
Set MP_Vz[MP_Count] = (MP_Vz[MP_Count] + (Abs((MP_Vz[MP_Count] / 10.00))))
Set MP_WindFactor[MP_Count] = 0.00
Animation - Change MP_Units[MP_Count] flying height to 10.00 at 0.00
Else - Actions
-------- //Fly Worms --------[/color]
Custom script: call RemoveLocation(udg_temp_Point)
Custom script: call DestroyGroup(udg_temp_Group)
Custom script: call RemoveLocation(udg_dmg_Point)now, when I remove the Fly Worms section (marked red), it works fine. When I however replace that with 4 times DoNothing, the game crashes again. P.S. Tho this does not seem like the biggest trigger ever, keep in mind that it is ran by another big trigger which is ran by another big trigger etc. |
| 03-28-2005, 01:38 AM | #4 |
Well... That makes no sense at all. First of all, repeating actions should NEVER crash wc3. I repeat NEVER. For instance, I have used a loop and repeated an action 10,000 times and it did not crash Wc3. My best suggestion would be to see what happens if you import these triggers into another map and see what you get. However you have totally stumped me. I've never seen anything like that. |
| 03-28-2005, 02:50 AM | #5 |
there should be no action limit, essentially that just gets converted into jass script and i've done huge huge scripts with no problems, nor should there be any since things are multi-nested did u make sure no looped variables overlap? usually that causes logical errors and not crashing, but u never know adding 4 donothings() to make it crash is odd, but i wouldn't count it on too many actions, since even nesting triggers is simply looping through recursion |
| 03-28-2005, 10:52 AM | #6 |
it seems like I overlooked something anyway -.- hate this, when I replaced the red part with donothings, I forgot 2 remove set tempint = 0. at least, I think I did that, and didnt notice that I was using that in another trigger for some array index, and doing an action with some unit or player that didnt exist... sry for stupid posts :P thx |
| 03-28-2005, 11:54 AM | #7 |
Guest | (off subject, excuse me ^_^) Johnfn, cheers for the 300 rep :D |
