Need help adding custom text script to war3map.j file.

lancerx

Member
Joined
Feb 13, 2004
Messages
6
Reaction score
0
Website
Visit site
Anyone know how to put a custom text script into the war3map.j file. I use ultra edit to open the jass file but cant seem to figure out how to copy and paste of where to copy and paste the custom text script into the jass file.So if anyone knows how to export a custom text script into a jass file I would be greatly appreciative for the help.
 

Maciej64

Member!
Joined
Oct 2, 2002
Messages
26
Reaction score
0
Website
www.pure-dream.com
Originally posted by lancerx
Anyone know how to put a custom text script into the war3map.j file. I use ultra edit to open the jass file but cant seem to figure out how to copy and paste of where to copy and paste the custom text script into the jass file.So if anyone knows how to export a custom text script into a jass file I would be greatly appreciative for the help.
Paste your functions just before the triggers.

If you are using the standard TFT Editor then you can also click on the map name, and you'll have a
place where you can paste your funcions
 

lancerx

Member
Joined
Feb 13, 2004
Messages
6
Reaction score
0
Website
Visit site
OK thanks ill try to find the triggers. then I just paste everything from the custom text script in there ? also what do you mean by having a place to paste your function if im using tft editor?
 

lancerx

Member
Joined
Feb 13, 2004
Messages
6
Reaction score
0
Website
Visit site
sorry im not quite following you, i got there click my maps name? what is it supposed to do? is there someway here I can add the scripts to the war3map.j file?
 

Maciej64

Member!
Joined
Oct 2, 2002
Messages
26
Reaction score
0
Website
www.pure-dream.com
Originally posted by lancerx
sorry im not quite following you, i got there click my maps name? what is it supposed to do? is there someway here I can add the scripts to the war3map.j file?
I m sorry for my sloppy english.

In the Trigger Editor. click where it says "yourmapname.w3x"

Then you'll see an empty screen on the right titeled 'custom script code' (or something like that in english)

There you paste your code, and when you save the map it's added to the .j file
 

lancerx

Member
Joined
Feb 13, 2004
Messages
6
Reaction score
0
Website
Visit site
wow thats very helpfull, now could you maybe help me know as to why im getting 20 compile erros when I copy and paste from the custom text script to the top. Is there a certain way to copy and paste it?
 

Maciej64

Member!
Joined
Oct 2, 2002
Messages
26
Reaction score
0
Website
www.pure-dream.com
I can't help you without seeing it . Probably it tries to access some global variables that were declared in the map you took that code from and doesn't find them...
 

lancerx

Member
Joined
Feb 13, 2004
Messages
6
Reaction score
0
Website
Visit site
Ok here is what I done to test this. I made a new map. Made 2 regions and then made a trigger that moved unit from region 1 to region 2 upon entering the region.


------------------------------------------------------------------------------------
function Trig_test_Actions takes nothing returns nothing
call SetUnitPositionLoc( GetTriggerUnit(), GetRectCenter(gg_rct_Region_001) )
endfunction

//===========================================================================
function InitTrig_test takes nothing returns nothing
set gg_trg_test = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_test, gg_rct_Region_000 )
call TriggerAddAction( gg_trg_test, function Trig_test_Actions )
endfunction
------------------------------------------------------------------------------------

I just copy and pasted everything into the custom text panel like you said on this new map. and i get these 3 compile errors.

"set gg_trg_test = CreateTrigger( )" -Expected a variable Name
"call TriggerRegisterEnterRectSimple( gg_trg_test, gg_rct_Region_000 )" - Expected a Name
"call TriggerAddAction( gg_trg_test, function Trig_test_Actions )"-Expected a name.

so those 3 erros no those 3 lines is the error im getting. And thats on a brand new map with nothing on it but the 2 regions i made. I declared no variables. By the way thanks for the help.
 

NewPosts

New threads

Top