HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Freezing

03-28-2005, 08:22 PM#1
Zandose
Hey. My triggers freezing because it's running all the code with no wait triggers to slow it down (For some reason wait does not work with this trigger). Anyone know how to fix this? Also I don't think this trigger works right now but I'll fix that later, I just need some way to slow it down for like 0.01 seconds. Thanks


This trigger creates random hills all over the map.
Based on a jass version done by ButterflyCaught(Astralhexe)& Voi
http://www.wc3sear.ch/index.php?p=Spells&ID=715&sid=
Code:
Land
    Events
        Player - Player 1 (Red) types a chat message containing 1 as An exact match
    Conditions
    Actions
        Set Real_X = (Height of (Entire map))
        Set Real_Y = (Width of (Entire map))
        For each (Integer A) from 1 to 1000, do (Actions)
            Loop - Actions
                Set Real_Y = (Real_Y - 200.00)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Real_X Less than or equal to (Real_X / (2.00 - Real_X))
                    Then - Actions
                        Trigger - Turn off Land <gen>
                        Skip remaining actions
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Entire map) contains (Point(Real_X, Real_Y))) Equal to False
                    Then - Actions
                        Set Real_X = (Real_X - 200.00)
                        Set Real_Y = (Width of (Entire map))
                    Else - Actions
                        Environment - Create a 0.01 second Permanent crater deformation at (Point(Real_X, Real_Y)) with radius 800.00 and depth (Random real number between -60.00 and 60.00)
03-28-2005, 10:53 PM#2
Zandose
bump
03-29-2005, 03:48 AM#3
Raptor--
be aware that the coordinate system for a map originates at the center of the map -- so (0, 0) is actually dead center, and the left side is (-maxwidth/2, 0), etc... so take that into consideration where you are making your deformations

and why doesn't putting something like

if ( (Integer A % 100) == 0 ) then
-- wait 0.01 seconds

work?

if it doesn't then why not turn it into a periodical trigger?

turn it on
each time the trigger runs, add Y value to simulate rows, go from 0 to maxwidth/maxdivisions dividing it up into columns and do deformations
and then turn off the trigger once u've maxed out rows