• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Convert Jass to GUI

Status
Not open for further replies.
Level 7
Joined
Feb 28, 2014
Messages
185
Can someone help me convert it to GUI ?
JASS:
function O43580 takes nothing returns nothing
	set udg_rects01[0]=udg_rect23
	set udg_rects01[1]=udg_rect22
	set udg_rects01[2]=udg_rect21
	set udg_rects01[3]=udg_rect32
	set udg_rects01[4]=udg_rect20
	set udg_rects01[5]=udg_rect19
	set udg_rects01[6]=udg_rect16
	set udg_rects01[7]=udg_rect18
	set udg_rects01[8]=udg_rect17
	set udg_rects01[9]=udg_rect30
	set udg_rects01[10]=udg_rect07
	set udg_rects01[11]=udg_rect06
	set udg_rects01[12]=udg_rect29
	set udg_rects01[13]=udg_rect05
	set udg_rects01[14]=udg_rect24
	set udg_rects01[15]=udg_rect28
	set udg_rects01[16]=udg_rect09
	set udg_rects01[17]=udg_rect10
	set udg_rects01[18]=udg_rect04
	set udg_rects01[19]=udg_rect08
	set udg_rects01[20]=udg_rect13
	set udg_rects01[21]=udg_rect11
	set udg_rects01[22]=udg_rect25
	set udg_rects01[23]=udg_rect12
	set udg_rects01[24]=udg_rect27
	set udg_rects01[25]=udg_rect26
	set udg_rects01[26]=udg_rect33
	set udg_rects01[27]=udg_rect34
	set udg_rects01[28]=udg_rect35
	set udg_rects01[29]=udg_rect36
	set udg_integer18=GetRandomInt(0,29)
	set udg_boolean03=RectContainsUnit(udg_rects01[udg_integer18],GroupPickRandomUnit(GetUnitsOfPlayerAll(ConvertedPlayer(GetForLoopIndexA()))))
	set bj_forLoopAIndex=1
	set bj_forLoopAIndexEnd=10
	loop
		exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
		if(O43487())then
			call ForGroupBJ(GetUnitsInRectOfPlayer(udg_rect15,Player(10)),function O43386)
			call ForGroupBJ(GetUnitsInRectOfPlayer(udg_rect15,Player(11)),function O43390)
		else
			call DoNothing()
		endif
		set bj_forLoopAIndex=bj_forLoopAIndex+1
	endloop
endfunction
Rects= Region
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
  • Events
  • Conditions
  • Actions
    • Set rects01[1] = rect23
    • Set rects01[2] = rect22
    • Set rects01[3] = rect21
    • Set rects01[4] = rect32
    • Set rects01[5] = rect20
    • Set rects01[6] = rect19
    • Set rects01[7] = rect16
    • Set rects01[8] = rect18
    • Set rects01[9] = rect17
    • Set rects01[10] = rect30
    • Set rects01[11] = rect07
    • Set rects01[12] = rect06
    • Set rects01[13] = rect29
    • Set rects01[14] = rect05
    • Set rects01[15] = rect24
    • Set rects01[16] = rect28
    • Set rects01[17] = rect09
    • Set rects01[18] = rect10
    • Set rects01[19] = rect04
    • Set rects01[20] = rect08
    • Set rects01[21] = rect13
    • Set rects01[22] = rect11
    • Set rects01[23] = rect25
    • Set rects01[24] = rect12
    • Set rects01[25] = rect27
    • Set rects01[26] = rect26
    • Set rects01[27] = rect33
    • Set rects01[28] = rect34
    • Set rects01[29] = rect35
    • Set rects01[30] = rect36
    • Set integer18 = (Random Integer Number Between 0 and 29)
    • Set boolean03 = (rects01[integer18] contains (Random unit from (Units owned by (Player((Integer A))))))
    • For each (Integer A) from 1 to 10, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (BLANK)
          • Then - Actions
            • Unit Group - Pick every unit in (Units in rect15 owned by Player 11 (Dark Green)) and do (BLANK)
            • Unit Group - Pick every unit in (Units in rect15 owned by Player 12 (Brown)) and do (BLANK)
      • Else - Actions
thereeee you go, I didn't finish it tho.. I don't know what to fill in those (BLANK).
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
There is no reverse compiler for JASS to GUI. Most things in JASS and not possible in GUI and generated GUI structures are often removed by map optimizers (which do the protection). All names might also be removed by obfuscation/optimization which cannot be restored to the GUI (made up names have to be used).

The best you can do is manually re-creating the trigger by reading the JASS and trying your best to make GUI that is functionally the same. At this stage you might as well keep it JASS and edit it as JASS.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
It is very important to keep backups to prevent this kind of situation from occuring. Dropbox for example could be used for backups since you get about a gigabyte free and since it is cloud storage it is semi-reliable and even if your computer fails you can still access and download from it. I use it all the time to transfer files between people. Other cloud data solutions would work as well so I leave the choice up to user discretion.

You can always re-create triggers into GUI as you want to modify them. Alternatively it might be a good idea to spend a few minutes to learn JASS (it really is not that difficult!) so that you could modify them directly and save time re-creating GUI triggers in future. Even if you do not learn much, it might help you translate triggers back into GUI without help in the future which would likely save you time as well.
 
Status
Not open for further replies.
Top