GUI to Jass?
Moderator: Cheaters
-
- Newcomer
- Posts: 9
- Joined: March 14th, 2007, 7:14 pm
-
- Honorary wc3edit.net Traitor
- Posts: 2507
- Joined: February 1st, 2007, 4:11 pm
- Location: NEVADA
-
- Old Wrinkly Member
- Posts: 247
- Joined: March 7th, 2007, 7:04 am
-
- Honorary wc3edit.net Traitor
- Posts: 2507
- Joined: February 1st, 2007, 4:11 pm
- Location: NEVADA
Thats cause being a seperate trigger from the rest it doesn't need it... If you want to add it all to one trigger then you'll need to add that, I think.vosszaa wrote:once u convert to text.. it doesnt show the global declaration and the "call initxx" thingy in function main..
is there anyway to make it display?
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
gg_trg_triggername and InitTrig_triggername() are completely different from the trigger itself.
When you create a trigger, you're really creating a "trigger variable" which must be declared as a trigger in globals (ie: trigger gg_trg_triggername=null)
InitTrig_triggername() is under function main which loads up all the map info and the trigger must be "Initialized"
Only need to worry about gg_trg_triggername and InitTrig_triggername() if you're editing the .j script directly
When you create a trigger, you're really creating a "trigger variable" which must be declared as a trigger in globals (ie: trigger gg_trg_triggername=null)
InitTrig_triggername() is under function main which loads up all the map info and the trigger must be "Initialized"
Only need to worry about gg_trg_triggername and InitTrig_triggername() if you're editing the .j script directly
-
- Old Wrinkly Member
- Posts: 247
- Joined: March 7th, 2007, 7:04 am
I know but at first i was learning to edit jass from convert GUI to text, then i use that text to put in jass.Aero wrote:gg_trg_triggername and InitTrig_triggername() are completely different from the trigger itself.
When you create a trigger, you're really creating a "trigger variable" which must be declared as a trigger in globals (ie: trigger gg_trg_triggername=null)
InitTrig_triggername() is under function main which loads up all the map info and the trigger must be "Initialized"
Only need to worry about gg_trg_triggername and InitTrig_triggername() if you're editing the .j script directly
But bcoz of when i already done GUI trigger and convert into text it doesnt show the declare part to me.. so i have to make it maslef, and i just worry that i could make mistake.
The tallest tower.. begins from the ground
Today, you are novice..
Tomorrow, you might be The Master..
And when you are..
Vosszaa will hunt you down..
-
- Newcomer
- Posts: 9
- Joined: March 14th, 2007, 7:14 pm
-
- Honorary wc3edit.net Traitor
- Posts: 2507
- Joined: February 1st, 2007, 4:11 pm
- Location: NEVADA
Heres a way to not mess up.
Extract your maps .j with GUI Triggers within it.
Take the global variables, put them along with the others in your other maps .j.
Now, take all the functions, but remove comments and unnecessary blank lines and such.
Now, don't copy the "call custom triggers" thing,.
Manually type out InitTrig_yourtriggername( ) after it sais "InitBlizzard()" under function main.
Do this, and after reimport the .j over the other, flush the map in mpqmaster, delete the attributes, and its a sure with, but, if you aren't confident with yourself, check your syntax on the way or take it slow!
=o
Extract your maps .j with GUI Triggers within it.
Take the global variables, put them along with the others in your other maps .j.
Now, take all the functions, but remove comments and unnecessary blank lines and such.
Now, don't copy the "call custom triggers" thing,.
Manually type out InitTrig_yourtriggername( ) after it sais "InitBlizzard()" under function main.
Do this, and after reimport the .j over the other, flush the map in mpqmaster, delete the attributes, and its a sure with, but, if you aren't confident with yourself, check your syntax on the way or take it slow!
=o
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
It doesn't where you put InitTrig_yourtrig() under function main as long as it's declared after any locals
Also, you could eliminate InitTrig all together by declaring your trigger as =CreateTrigger() in globals and adding the TriggerRegister + Conditions/Actions with the rest of them under function main
Also, you could eliminate InitTrig all together by declaring your trigger as =CreateTrigger() in globals and adding the TriggerRegister + Conditions/Actions with the rest of them under function main
-
- Newcomer
- Posts: 9
- Joined: March 14th, 2007, 7:14 pm