Creating a new GUI interface...

Will you use it?

  • Yes, good idea and will use it.

    Votes: 20 46.5%
  • No, good idea and will not use it.

    Votes: 9 20.9%
  • No, Bad idea and will not use it.

    Votes: 0 0.0%
  • Looks good, but its not overwhelming to step over.

    Votes: 2 4.7%
  • I'll stick to my jass.

    Votes: 12 27.9%

  • Total voters
    43

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
I'm thinking..
I'm thinking.....

Should i remove the useless BJ functions?

Like this one: (Example of dozens)
> TriggerRegisterTimerExpireEventBJ

Totally useless.. but the only thing is when i remove it.. It wont be detected by the normal WE without this plug in files and will prompt an error.
This does no harm to your map, only changes the actual (action / condition / action ) into a thing called "error".

And for the WEH files, i have to wait to add all of those.
I think of myself as an average programmer, but WEH requires good programming skills to embed it into it.

I do, but you don't have a clue what ur doing.
No offense, but like I said : JASS and GUI should NOT be COMBINATED!
Its just an example like WEU, its unstable and others can not open maps made by it.
Bah ...
Get a grip man ..

If you can read.. this plug in does not crash the map by opening, by removing some of the obsolete events, it will likely prompt an error, but will not crash..
gui is combinated into jass, rather if you like it or not.

We all know jass is better for: speed, better programming, but THIS IS NOT MADE FOR YOU?!?!?
It will help dozens of people who DONT KNOW JASS.


And btw..: Trigger Editor != GUI. Let me correct that...
World Editor === GUI, For those who are unfamiliar with this line of comparison.. its mainly used to.
a: variable type is the same
b: value is the same

Why not use == ?, cause of a integer value of 0, returns false, and a integer value of 1 returns true.
Meaning you compare 2 different variable types.

In the upcoming posts, if the word "jass" is posted saying that its better then "gui" is spam, and i will ask a mod to remove that "SPAM" post.
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
>Should i remove the useless BJ functions?
Yes, every single one of them. Just keep those who actually have some logic inside them.

Imo you should try to 'jassify' the loops and completely remove the 'For Each Integer A' loops. Same thing with the if/then/else, make them if[elseif,...[else]]endif that maybe can make the GUI somewhat understandable, nesting of ifs are evil and the Do Nothing is a spawn from the devil.
GUI functions maybe is impossible but you can always have dreams...
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
>Should i remove the useless BJ functions?
Yes, every single one of them. Just keep those who actually have some logic inside them.

Imo you should try to 'jassify' the loops and completely remove the 'For Each Integer A' loops. Same thing with the if/then/else, make them if[elseif,...[else]]endif that maybe can make the GUI somewhat understandable, nesting of ifs are evil and the Do Nothing is a spawn from the devil.
GUI functions maybe is impossible but you can always have dreams...

I'm not sure how to do the for each integer but i'll give it a shot.
However this is a interface, not the way the editor compiles.

The If / Then / Else Statements i'm not so sure about that also, if that is possible. If it is, i'll also add the elseif.

List of what i will make then.

- If / Then / Else (single)
- If / Then / Else (multiple)
- If / Then (single)
- If / Then (multiple)
- Elseif

I'm stumped. What does GUI mean? What does JASS mean? This might help while im reading the functions lol.

What does GUI do?

Why is JASS better than normal triggers?

Why do I have so many questions?

lol.. yeah im pretty lame.

~ Mr.Tutorial

Instead of reading functions.. read posts..
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
Seconded. The standard GUI loop types is TERRORIBLE.

Gotta love the simple 'loop' loop :)

What should be improved to it, cause..
If you do a integer loop like:
loop
exitwhen i > StringLenght(udg_StringVar)
endloop

It will call the function StringLenght as many times as the string length given.
This will of course runned slower if you use

set var a = 1
set var b = StringLength(udg_StringVar)
loop
exitwhen a > b
endloop

The upper one will simulate the bj loop index Blizzard Created. which is faster then the top one.

Its a horrible setup i know, but it is the fastest way to get the job done.
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
For that specific problem (looping once for each integer A to integer B with a reference to the current integer) the blizzard loop is perfect. But it couldn't be more inflexible. You can hack it to make jumpes of 2 or 3 ect insteed and also make it loop backwards but that's all.
Something simple as looping until a random number is 1 (whats the use for that?) is impossible.

A good GUI loop:
Code:
Loop - Actions
      Do Something
      Do Something
      Exit If Condition
           Something Equal to SomethingElse
           Aboolean Equal to true
      Do Something 
      Exit If Condition
           Anything Greater Than 2
Ofc it should be possbile to not use the Exit If.
 

chovynz

We are all noobs! in different states of Noobism!
Reaction score
130
Themis, you've said in a few places that ... "is leakless." Are you able to post an example? Because so far, the things you have shown us that are "leakless" don't have any other explanation other than your "they don't leak."

How do we know?

I'm not doubting you or pulling you down, just asking you to be more open and more 'peer review'able. Ta:)
 

Fulla

Evil Overlord
Reaction score
31
I moved onto Jass about 3 months ago, so no theres little reason/pint in me using this.

I do however, thinks its an AWESOME idea.
I remember back when I was using GUI there were many things needed.
e.g.
- Create timed SFX
- Create timed Floating Text

I think WEU has alot of these thou.

Might I recommend adding a few other useful systems in there made compatible with GUI interface.

e,g,
Vile's Knockback Functions
http://www.wc3campaigns.net/showthread.php?t=82829

This is an easy way with 1 command to make units slide backwards
- Has sliding SFX's, i.e. the dirt spraying up
- Very smooth, units decelerate as they slide.

Systems like this which are generally only useful from Jass'er to Jass'er.
 

uberfoop

~=Admiral Stukov=~
Reaction score
177
Themis, you've said in a few places that ... "is leakless." Are you able to post an example? Because so far, the things you have shown us that are "leakless" don't have any other explanation other than your "they don't leak."

How do we know?

I'm not doubting you or pulling you down, just asking you to be more open and more 'peer review'able. Ta:)

Probably because some of the stuff hes shown like that asks for direct region input insterad of location input, so the BJ func it's using probably does the center of region for you along with a local var to remove the leak.

And other stuff like that.
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
Some of the functions i made.. check them out for leaks.. if you please..
But this is just the raw code i didnt even check them for leaks, and for now i dont care.. im just setting up the interface.

But i will guarantee, it will be leakless.

Code:
//////////////////////////////
///// Camera
/////
function PanCameraToTimedWithZForPlayer takes player whichPlayer, real x, real y, real zOffset, real duration returns nothing
    if GetLocalPlayer() == whichPlayer then
        call PanCameraToTimedWithZ(x, y, zOffset, duration)
    endif
endfunction
function RotateCameraAroundCoordinate takes real degrees, real x, real y, player whichPlayer, real duration returns nothing
    if GetLocalPlayer() == whichPlayer then
        call SetCameraRotateMode(x, y, bj_DEGTORAD * degrees, duration)
    endif
endfunction

//////////////////////////////
///// Special Efffects
/////
function CreateEffectAtCoordinateWithZ takes real x, real y, real h, string e, boolean b returns nothing
    local destructable d = CreateDestructableZ('LTbs',x,y,h,0,0.5,0)
    local location l = GetDestructableLoc(d)
        set bj_lastCreatedEffect = AddSpecialEffectLoc(e,l)
        call RemoveLocation(l)
        set l = null
        call RemoveDestructable(d)
        if b == true then
            call DestroyEffect(bj_lastCreatedEffect)
        endif
endfunction
function CreateEffectInRect takes boolean b, rect r, string e, boolean d returns nothing
    if b == true then
        set bj_lastCreatedEffect = AddSpecialEffect(e,GetRectCenterX(r),GetRectCenterY(r))
    else
        set bj_lastCreatedEffect = AddSpecialEffect(e,GetRandomReal(GetRectMinX(r), GetRectMaxX(r)),GetRandomReal(GetRectMinY(r), GetRectMaxY(r)))
    endif
    if d == true then
        call DestroyEffect(bj_lastCreatedEffect)
    endif
endfunction

//////////////////////////////
///// Multiboard
/////
function MultiboardDisplayToPlayer takes boolean s, multiboard b, player p  returns nothing
    if (GetLocalPlayer() == p) then
        call MultiboardDisplay(b, s)
    endif
endfunction

//////////////////////////////
///// Game Cache
/////
function GetI takes string name returns integer
    return GetStoredInteger(bj_lastCreatedGameCache, "Integers", name )
endfunction
function StoreI takes integer value, string name returns nothing
    call FlushStoredInteger(bj_lastCreatedGameCache, "Integers", name )
    call StoreInteger(bj_lastCreatedGameCache, "Integers", name, value)
endfunction
function GetR takes string name returns real
    return GetStoredReal(bj_lastCreatedGameCache, "Reals", name )
endfunction
function StoreR takes real value, string name returns nothing
    call FlushStoredReal(bj_lastCreatedGameCache, "Reals", name)
    call StoreReal(bj_lastCreatedGameCache, "Reals", name, value)
endfunction
function GetB takes string name returns boolean   
    return GetStoredBoolean(bj_lastCreatedGameCache, "Booleans", name )
endfunction
function StoreB takes boolean value, string name returns nothing
    call FlushStoredBoolean( bj_lastCreatedGameCache, "Booleans", name)
    call StoreBoolean( bj_lastCreatedGameCache, "Booleans", name, value)
endfunction
function GetS takes string name returns string
    return GetStoredString(bj_lastCreatedGameCache, "Strings", name )
endfunction
function StoreS takes string value, string name returns nothing
    call FlushStoredString(bj_lastCreatedGameCache, "Strings", name)
    call StoreString(bj_lastCreatedGameCache, "Strings", name, value)
endfunction

//////////////////////////////
///// Unit
/////
function CreateUnitInRegion takes player id, integer uid, rect where, real facing, boolean b returns nothing
    if b == true then
        set bj_lastCreatedUnit = CreateUnit(id,uid,GetRectCenterX(where),GetRectCenterY(where),facing)
    else
        set bj_lastCreatedUnit = CreateUnit(id,uid,GetRandomReal(GetRectMinX(where),GetRectMaxX(where)),GetRandomReal(GetRectMinY(where),GetRectMaxY(where)),facing)
    endif
endfunction
function CreateUnitInRegionAndOrderToRegion takes player id, integer uid, rect where, real facing, boolean b1, rect to, boolean b2 returns nothing
    if b1 == true then
        set bj_lastCreatedUnit = CreateUnit(id,uid,GetRectCenterX(where),GetRectCenterY(where),facing)
        if b2 == true then
            call IssuePointOrder(bj_lastCreatedUnit,"walk",GetRectCenterX(to),GetRectCenterY(to))
        else
            call IssuePointOrder(bj_lastCreatedUnit,"walk",GetRandomReal(GetRectMinX(to),GetRectMaxX(to)),GetRandomReal(GetRectMinY(to),GetRectMaxY(to)))
        endif
    else
        set bj_lastCreatedUnit = CreateUnit(id,uid,GetRandomReal(GetRectMinX(where),GetRectMaxX(where)),GetRandomReal(GetRectMinY(where),GetRectMaxY(where)),facing)
        if b2 == true then
            call IssuePointOrder(bj_lastCreatedUnit,"walk",GetRectCenterX(to),GetRectCenterY(to))
        else
            call IssuePointOrder(bj_lastCreatedUnit,"walk",GetRandomReal(GetRectMinX(to),GetRectMaxX(to)),GetRandomReal(GetRectMinY(to),GetRectMaxY(to)))
        endif
    endif
endfunction



function EnableUserControlForPlayer takes player toPlayer, boolean flag returns nothing
    if toPlayer == GetLocalPlayer() then
        call EnableUserControl(flag)
    endif
endfunction

function SetTextTagVisibilityForPlayer takes player toPlayer, texttag t, boolean flag returns nothing
    if toPlayer == GetLocalPlayer() then
        call SetTextTagVisibility(t, flag)
    endif
endfunction

SetTextTagVisibilityForPlayer who ever thought of that.... ;]
However i'll update the credit list
Idea's are always welcome.

Vile's Knockback Functions
http://www.wc3campaigns.net/showthread.php?t=82829

This is an easy way with 1 command to make units slide backwards
- Has sliding SFX's, i.e. the dirt spraying up
- Very smooth, units decelerate as they slide.

Systems like this which are generally only useful from Jass'er to Jass'er.
I hope you understand that i want to make a function updates.
Adding 1 spell would mean i have to add a lot.. It stays GUI, and if you want to add something advanced as that, lean jass.
 

TFlan

I could change this in my User CP.
Reaction score
64
do u need any help on writing the interface?
 

Chocobo

White-Flower
Reaction score
409
Code:
function CreateUnitInRegion takes player id, integer uid, rect where, real facing, boolean b returns nothing
    if b == true then
        set bj_lastCreatedUnit = CreateUnit(id,uid,GetRectCenterX(where),GetRectCenterY(where),facing)
    else
        set bj_lastCreatedUnit = CreateUnit(id,uid,GetRandomReal(GetRectMinX(where),GetRectMaxX(where)),GetRandomReal(GetRectMinY(where),GetRectMaxY(where)),facing)
    endif
endfunction
function CreateUnitInRegionAndOrderToRegion takes player id, integer uid, rect where, real facing, boolean b1, rect to, boolean b2 returns nothing
    if b1 == true then
        set bj_lastCreatedUnit = CreateUnit(id,uid,GetRectCenterX(where),GetRectCenterY(where),facing)
        if b2 == true then
            call IssuePointOrder(bj_lastCreatedUnit,"walk",GetRectCenterX(to),GetRectCenterY(to))
        else
            call IssuePointOrder(bj_lastCreatedUnit,"walk",GetRandomReal(GetRectMinX(to),GetRectMaxX(to)),GetRandomReal(GetRectMinY(to),GetRectMaxY(to)))
        endif
    else
        set bj_lastCreatedUnit = CreateUnit(id,uid,GetRandomReal(GetRectMinX(where),GetRectMaxX(where)),GetRandomReal(GetRectMinY(where),GetRectMaxY(where)),facing)
        if b2 == true then
            call IssuePointOrder(bj_lastCreatedUnit,"walk",GetRectCenterX(to),GetRectCenterY(to))
        else
            call IssuePointOrder(bj_lastCreatedUnit,"walk",GetRandomReal(GetRectMinX(to),GetRectMaxX(to)),GetRandomReal(GetRectMinY(to),GetRectMaxY(to)))
        endif
    endif
endfunction

There is leaks.


And btw..: Trigger Editor != GUI. Let me correct that...
World Editor === GUI, For those who are unfamiliar with this line of comparison.. its mainly used to.
a: variable type is the same
b: value is the same


Why not use == ?, cause of a integer value of 0, returns false, and a integer value of 1 returns true.
Meaning you compare 2 different variable types.

It depends if you use the World Editor in Raw Data or in it's normal form.
 

Fulla

Evil Overlord
Reaction score
31
ok wtf...

I hope you understand that i want to make a function updates.
Adding 1 spell would mean i have to add a lot.. It stays GUI, and if you want to add something advanced as that, lean jass.

Did you honestly read my post? I said I know JASS, but having a 'slide unit' would be very helpful for GUI guys.
WEU has it, so I thought perhaps you'd attempt it.

e.g. In the GUI Actions>
Unit - Move Unit (Instantly)
Unit - Slide Unit

Unit - Slide (Triggering Unit) towards (Angle) for (X) seconds, with Deceleration (On), Destroying Destructables (On).


Some GUI thing like that would be very handy.
I was merely giving a link to a very good 'polished' version, which I thought might be helpful for you.
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
ok wtf...



Did you honestly read my post? I said I know JASS, but having a 'slide unit' would be very helpful for GUI guys.
WEU has it, so I thought perhaps you'd attempt it.

e.g. In the GUI Actions>
Unit - Move Unit (Instantly)
Unit - Slide Unit

Unit - Slide (Triggering Unit) towards (Angle) for (X) seconds, with Deceleration (On), Destroying Destructables (On).


Some GUI thing like that would be very handy.
I was merely giving a link to a very good 'polished' version, which I thought might be helpful for you.
Yes i did read your post..

I never said it wasn't a good spell.
In fact i really liked it.
But have you taken a look at the functions yet?, combined they are bigger then all of the functions i made.

Functions and idea's are getting made by other clan members of my clan.
I don't know how big this will be, but i wont use something advanced.

Sliding functions will be in it but i assume you know what causes the calling from a function to another that calls a native in a loop.
It creates a unnecessary lag.
Not to mention i must give credit by using his functions.

The slide functions (what I've heard) will be pretty much default
It will be the polar projection function in coordinates:

Code:
function
        call SetUnitX( unit, GetUnitX + Offset * Cos( Rotation + ( bj_PI / 2 * Index ) )  )
        call SetUnitY( unit, GetUnitY + Offset *Sin( Rotation + ( bj_PI / 2 * Index ) )  )
endfunction

This pretty much creates a wheel effect and that will be added as well.
Unit offset movement wouldn't be a lot different.

This is basically a slide function in simple.. and if you are good with GUI, making a function like his isn't so far off.

Things don't have to be premade for someone to use.
 

ragingspeedhorn

Is a Banned Asshole
Reaction score
94
Nice idea you got going here, though I've got absolutely no use for it as I hardly ever do any map making anylonger. Keep up the good work and good luck with it though.
 

SFilip

Gone but not forgotten
Reaction score
634
> Idea's are always welcome.
Why don't you create wrappers for the caster system functions? That would sure make a good addition.
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
> Idea's are always welcome.
Why don't you create wrappers for the caster system functions? That would sure make a good addition.

I'm not sure what you mean with this, could you explain it a little bit more?
 

SFilip

Gone but not forgotten
Reaction score
634
Caster System
Might be useful if you make GUI for some of its functions.
 

Hero

─║╣ero─
Reaction score
250
0) What? I created a few maps that uses that and people did not drop.

1)... Dont be so silly, you know what i mean.
- Maps are in python and a bit html. Everybody knows that..

2) That means you use GUI.
- In other words, you are using something that sucks ass. which is in my mind, something nasty.

3) Meh..
- Would you be so kind to change that. :banghead: I'm not always awake.
- Then if you mean that.. Don't say GUI. :rolleyes:

No point in fighting with SFilip...it's impossible to 'win' he is like a god in jass and can do anything in GUI with jass and make it even better...lol

anyways...this is getting interesting..are you still accepting ideas?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top