[Help] Add A Trigger

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

kietne19
Newcomer
Posts: 9
Joined: June 21st, 2009, 2:15 am

[Help] Add A Trigger

Post by kietne19 »

_Is There Any Way I Could Add A New Trigger into a map, without using Worldeditor, because after i use it and save game it ........ (This Is Deprotect map of course)
_I Think about Jasscraft .....But I couldn't do it too ...
_Ak, Do you have another solfware to do it ?
carina94
Junior Member
Posts: 29
Joined: July 26th, 2010, 3:23 pm

Re: [Help] Add A Trigger

Post by carina94 »

you should fix the jass script of deprotected map...then you can save it and add gui/jass scripts into it
kietne19
Newcomer
Posts: 9
Joined: June 21st, 2009, 2:15 am

Re: [Help] Add A Trigger

Post by kietne19 »

Oh Thanks, but "How" Is the proplem i'm not good at this, fix this and make another one error, And more fix it is no "easy" (Sao có thằng trả lời ngu thế kia ??)
carina94
Junior Member
Posts: 29
Joined: July 26th, 2010, 3:23 pm

Re: [Help] Add A Trigger

Post by carina94 »

post the map i may be able to fix the script
User avatar
haxorico
Super Moderator
Posts: 3195
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: [Help] Add A Trigger

Post by haxorico »

If you don't know jass, use the deprotected map, and make the trigger using the GUI.
When your finished, click on the edit tab on top (if I am not mistaken) and use "Convert To Custom Text".
Then you will have the trigger in jass.

Exit world editor, extract the war3map.j file (You better use it on the deprotected map) and insert the lines you had under "endglobals"
Now, the W/E GUI System is renaming your variables, function names etc.. And I do not remember them and I can't checkem (at the moment).

From the JASS code you got from WE, youll find a line that starts like this "function init_trig" paste it here and Ill tell you what to post on globals and function main.
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac: 

Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).

Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
kietne19
Newcomer
Posts: 9
Joined: June 21st, 2009, 2:15 am

Re: [Help] Add A Trigger

Post by kietne19 »

_@haxorico :I Tried, I can host a map without proplem, but when the map open, the jass I've been add into war3map.j is not .... active, it just like I not do any to war3map.j, "if" you have time, can you post some pictures or make a video ????? I'm not good at this, I'm Just a "Newbie" :(
_@carina94 : Thanks, You are very kind, but I want do to this by myself,and thanks for deprotect map "Divide & Fight v1.22" for me, but when I Save The Map, Why It get error again, Do I Need Some other solfware too ??? :oops:
_And one More I'm Vietnamese people... So sometime (may be always) my language is very hard to ..... understand (isn't It ??) So ...Sorry if my sentence make you misunderstanding :!:
User avatar
Nuuby
Forum Staff
Posts: 519
Joined: October 18th, 2010, 8:43 am

Re: [Help] Add A Trigger

Post by Nuuby »

kietne19 wrote:_@haxorico :I Tried, I can host a map without proplem, but when the map open, the jass I've been add into war3map.j is not .... active, it just like I not do any to war3map.j, "if" you have time, can you post some pictures or make a video ????? I'm not good at this, I'm Just a "Newbie" :(
_@carina94 : Thanks, You are very kind, but I want do to this by myself,and thanks for deprotect map "Divide & Fight v1.22" for me, but when I Save The Map, Why It get error again, Do I Need Some other solfware too ??? :oops:
_And one More I'm Vietnamese people... So sometime (may be always) my language is very hard to ..... understand (isn't It ??) So ...Sorry if my sentence make you misunderstanding :!:
Mind telling us what you did to the script to make it "not active"?
Try using Jass NewGen and see if you still get an error.
kietne19
Newcomer
Posts: 9
Joined: June 21st, 2009, 2:15 am

Re: [Help] Add A Trigger

Post by kietne19 »

_Um....
_Under globals I but this Script
Spoiler:
trigger gg_trg_Untitled_Trigger_001 = null
_Under Endglobals I but this script
Spoiler:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'hfoo', Player(0), GetRectCenter(GetPlayableMapRect()), bj_UNIT_FACING )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Untitled_Trigger_001, 1.00 )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
_And when I open map nothing happen ... Just like I never add anything to war3map.j ... Any Wrong ..???
User avatar
Nuuby
Forum Staff
Posts: 519
Joined: October 18th, 2010, 8:43 am

Re: [Help] Add A Trigger

Post by Nuuby »

Under function main. Add this line
call InitTrig_Untitled_Trigger_001()
kietne19
Newcomer
Posts: 9
Joined: June 21st, 2009, 2:15 am

Re: [Help] Add A Trigger

Post by kietne19 »

Cám ơn (Thanks :D )