GUI Rapeage

Status
Not open for further replies.
Can someone please tell me why the FUCK this trigger turns into such an abomination? I could code it myself in about 8 lines, yet it comes out with this crap!!?

[trigger=Simple Trigger]Explosions
Events
UI - Player Any Player clicks Right mouse button Down.
Local Variables
INCREMENT = 128.0 <Real (Constant)>
------- ----------------------------------
X = 0.0 <Real>
Y = 0.0 <Real>
------- ----------------------------------
MX = 0.0 <Real>
MY = 0.0 <Real>
------- ----------------------------------
MinX = 0.0 <Real>
MinY = 0.0 <Real>
------- ----------------------------------
MaxX = 0.0 <Real>
MaxY = 0.0 <Real>
Conditions
Actions
Variable - Set MX = (Mouse X position clicked in the world)
Variable - Set MY = (Mouse Y position clicked in the world)
------- ----------------------------------
Variable - Set MinX = (MX - 256.0)
Variable - Set MinY = (MY - 256.0)
------- ----------------------------------
Variable - Set MaxX = (MX + 256.0)
Variable - Set MaxY = (MY + 256.0)
------- ----------------------------------
General - For each real X from MinX to MaxX with increment INCREMENT, do (Actions)
Actions
General - For each real Y from MinY to MaxY with increment INCREMENT, do (Actions)
Actions
Environment - Create a Large Zerg explosion at (Point(X, Y))
[/trigger]

[jass=Raped Galaxy Code]bool gt_Explosions_Func (bool testConds, bool runActions) {
fixed auto42BDBA08_as;
fixed auto42BDBA08_ae;
fixed auto42BDBA08_ai;
fixed auto256D4EE3_as;
fixed auto256D4EE3_ae;
fixed auto256D4EE3_ai;

// Variable Declarations
const fixed lv_iNCREMENT = 128.0;
fixed lv_x;
fixed lv_y;
fixed lv_mX;
fixed lv_mY;
fixed lv_minX;
fixed lv_minY;
fixed lv_maxX;
fixed lv_maxY;

// Variable Initialization
lv_x = 0.0;
lv_y = 0.0;
lv_mX = 0.0;
lv_mY = 0.0;
lv_minX = 0.0;
lv_minY = 0.0;
lv_maxX = 0.0;
lv_maxY = 0.0;

// Actions
if (!runActions) {
return true;
}

lv_mX = EventMouseClickedPosXWorld();
lv_mY = EventMouseClickedPosYWorld();
lv_minX = (lv_mX - 256.0);
lv_minY = (lv_mY - 256.0);
lv_maxX = (lv_mX + 256.0);
lv_maxY = (lv_mY + 256.0);
auto42BDBA08_as = lv_minX;
auto42BDBA08_ae = lv_maxX;
auto42BDBA08_ai = lv_iNCREMENT;
lv_x = auto42BDBA08_as;
if (auto42BDBA08_ai > 0 || (auto42BDBA08_ai == 0 && auto42BDBA08_as < auto42BDBA08_ae)) {
while (lv_x <= auto42BDBA08_ae) {
auto256D4EE3_as = lv_minY;
auto256D4EE3_ae = lv_maxY;
auto256D4EE3_ai = lv_iNCREMENT;
lv_y = auto256D4EE3_as;
if (auto256D4EE3_ai > 0 || (auto256D4EE3_ai == 0 && auto256D4EE3_as < auto256D4EE3_ae)) {
while (lv_y <= auto256D4EE3_ae) {
libNtve_gf_CreateExplosionAtPoint(0, 2, Point(lv_x, lv_y));
lv_y = lv_y + auto256D4EE3_ai;
}
}
else if (auto256D4EE3_ai < 0 || (auto256D4EE3_ai == 0 && auto256D4EE3_ae < auto256D4EE3_as)) {
while (lv_y >= auto256D4EE3_ae) {
libNtve_gf_CreateExplosionAtPoint(0, 2, Point(lv_x, lv_y));
lv_y = lv_y + auto256D4EE3_ai;
}
}
lv_x = lv_x + auto42BDBA08_ai;
}
}
else if (auto42BDBA08_ai < 0 || (auto42BDBA08_ai == 0 && auto42BDBA08_ae < auto42BDBA08_as)) {
while (lv_x >= auto42BDBA08_ae) {
auto256D4EE3_as = lv_minY;
auto256D4EE3_ae = lv_maxY;
auto256D4EE3_ai = lv_iNCREMENT;
lv_y = auto256D4EE3_as;
if (auto256D4EE3_ai > 0 || (auto256D4EE3_ai == 0 && auto256D4EE3_as < auto256D4EE3_ae)) {
while (lv_y <= auto256D4EE3_ae) {
libNtve_gf_CreateExplosionAtPoint(0, 2, Point(lv_x, lv_y));
lv_y = lv_y + auto256D4EE3_ai;
}
}
else if (auto256D4EE3_ai < 0 || (auto256D4EE3_ai == 0 && auto256D4EE3_ae < auto256D4EE3_as)) {
while (lv_y >= auto256D4EE3_ae) {
libNtve_gf_CreateExplosionAtPoint(0, 2, Point(lv_x, lv_y));
lv_y = lv_y + auto256D4EE3_ai;
}
}
lv_x = lv_x + auto42BDBA08_ai;
}
}
return true;
}[/code]
 
Wow, a switch from iterators to while loops made this:
JASS:
bool gt_Explosions_Func (bool testConds, bool runActions) {
    // Variable Declarations
    const fixed lv_iNCREMENT = 128.0;
    fixed lv_x;
    fixed lv_y;
    fixed lv_mX;
    fixed lv_mY;
    fixed lv_maxX;
    fixed lv_maxY;

    // Variable Initialization
    lv_x = 0.0;
    lv_y = 0.0;
    lv_mX = 0.0;
    lv_mY = 0.0;
    lv_maxX = 0.0;
    lv_maxY = 0.0;

    // Actions
    if (!runActions) {
        return true;
    }

    lv_mX = EventMouseClickedPosXWorld();
    lv_mY = EventMouseClickedPosYWorld();
    lv_x = (lv_mX - 256.0);
    lv_y = (lv_mY - 256.0);
    lv_maxX = (lv_mX + 256.0);
    lv_maxY = (lv_mY + 256.0);
    while ((lv_x <= lv_maxX)) {
        while ((lv_y <= lv_maxY)) {
            libNtve_gf_CreateExplosionAtPoint(0, 2, Point(lv_x, lv_y));
            lv_y = (lv_y + lv_iNCREMENT);
        }
        lv_x = (lv_x + lv_iNCREMENT);
    }
    return true;
}

Much better.

But still, I really wish we could use Galaxy directly in a way that's as useful as "Convert to custom script" in wc3...
 
Level 3
Joined
Jul 12, 2007
Messages
50
well very easy, don't use GUI. Even though they made it better, it is still no comparison to coding (assuming you are used to code, not to click until your finger falls off). I think I have to post Andromeda here... will link it after it is done.

edit: okay, got it made, here is the introduction

No, with code you tap keys until your figures fall off. :wink:

But in all seriousness, I really hope Blizzard includes convert to custom code soon!
 
Status
Not open for further replies.
Top