The official site of Clan TMMM
 
HomeHomeSearchUsergroupsFAQRegisterLog in


Latest topics
» Gotta click fast - WC3 Mazing #mildlyinteresting
by hoffmann Wed Jun 21, 2017 10:28 pm

» Hey whats up
by Eat_bacon_daily Mon Oct 10, 2016 6:24 am

» I'm getting married and you guys are invited
by Achilles.42 Wed Sep 07, 2016 11:00 am

» Server Photo Album 1
by Pat1487 Sat Aug 06, 2016 5:28 pm

» Legacy of The Void Beta
by Achilles.42 Sun Oct 18, 2015 3:21 am

» Hey guys!!!
by Eat_bacon_daily Fri Oct 16, 2015 11:20 pm

» What everyone been up to
by The_Chosen_Oreo Sun Jun 14, 2015 11:55 am

SC2 Links
SC2 Challenge/Tourney Info

Official SC2 Forums

SC2 Curse

SC2Mapster

Team Liquid

SC2 Replayed

SC2 Strategy
WC3 Links
Clan_TMMM[Host] Info

WC3 Challenge/Tourny Rules

Epicwar
Poll
What game does everyone play now?
Starcraft 2
26%
 26% [ 8 ]
Warcraft 3
35%
 35% [ 11 ]
League of Legends
19%
 19% [ 6 ]
World of Warcraft
0%
 0% [ 0 ]
Diablo 2
0%
 0% [ 0 ]
No games at all
10%
 10% [ 3 ]
Other game not listed
10%
 10% [ 3 ]
Total Votes : 31
Transparency

Share | 
 

 patrols in jass???

Go down 
AuthorMessage
marksoccer
Commander
Commander
avatar


PostSubject: patrols in jass???   Thu Jan 28, 2010 12:43 pm

ok so i was wondering how to put patrols in jass?? like how nomor did his in loam because it ended up not causeing em leaks
Back to top Go down
nomorholywar
Sergeant
Sergeant



PostSubject: Re: patrols in jass???   Thu Jan 28, 2010 11:52 pm

write a set of functions that simplifies what you need to put in to generate a patrol.
simplest is:

Patrol(unittype, region1, region2)

and it creates the unit at region 1, makes it patrol to region 2.

If youre unsure how to make these functions, just ask carlos or FlRE. or me for a list of functions
Back to top Go down
marksoccer
Commander
Commander
avatar


PostSubject: Re: patrols in jass???   Fri Jan 29, 2010 1:32 pm

alright so how do u do the functions


Last edited by marksoccer on Fri Jan 29, 2010 5:33 pm; edited 1 time in total
Back to top Go down
nomorholywar
Sergeant
Sergeant



PostSubject: Re: patrols in jass???   Fri Jan 29, 2010 4:05 pm

http://www.wc3c.net/showthread.php?t=12687

Start reading at "OK, that's all neat..."
Back to top Go down
marksoccer
Commander
Commander
avatar


PostSubject: Re: patrols in jass???   Sat Jan 30, 2010 8:11 pm

o man i still dont get it. is it possible of u just to show me a patrol in jass then explane that to me? might be easier
Back to top Go down
nomorholywar
Sergeant
Sergeant



PostSubject: Re: patrols in jass???   Sat Jan 30, 2010 10:15 pm

message me in clan arun
Back to top Go down
AmAzIn[G]
Commander
Commander
avatar


PostSubject: Re: patrols in jass???   Sat Jan 30, 2010 11:28 pm

100% Credit to Arun. (btw if u want me 2 remove this mini tutorial i will)

PART 1
1) Make a Trigger call it Library, Convert to custom text and delete all the shit inside it. Then copy n paste this.
For the shit below this DO NOT EDIT IT IN ANYWAY. This is the trigger you do NOT edit.

---------------------------------------------------------------------------------------------------------------------

library Patrol

globals
// Orc
integer raider = 'orai'
integer grunt = 'ogru'
integer tauren = 'otau'
integer headhunter = 'ohun'
integer doctor = 'odoc'
integer kodo = 'okod'
integer shaman = 'oshm'
integer wyvern = 'owyv'
// Human
integer footman = 'hfoo'
integer knight = 'hkni'
integer rifle = 'hrif'
integer priest = 'hmpr'
integer sorc = 'hsor'
integer tank = 'hmtt'
integer captain = 'hcth'
integer gryphon = 'hgry'
integer gyro = 'hgyr'
// Undead
integer ghoul = 'ugho'
integer abom = 'uabo'
integer spider = 'ucry'
integer banshee = 'uban'
integer necro = 'unec'
integer garg = 'ugar'
integer frost = 'ufro'
// Night Elf
integer archer = 'earc'
integer claw = 'edoc'
integer talon = 'edot'
integer huntress = 'esen'
integer dryad = 'edry'
integer hippo = 'ehip'
integer hipporider = 'ehpr'
integer chim = 'echm'
integer wisp = 'ewsp'
// Attackers
integer mortar = 'hmtm'
integer catapault = 'ocat'
integer wagon = 'umtw'
integer ballista = 'ebal'
endglobals

function patrol takes integer t, rect r, rect s returns nothing
local unit u = CreateUnit(Player(11), t, GetRectCenterX(r), GetRectCenterY(r), 0)
call IssuePointOrder(u,"patrol",GetRectCenterX(s), GetRectCenterY(s))
endfunction

function attacker takes integer t, rect r, rect s returns nothing
local unit u = CreateUnit(Player(11), t, GetRectCenterX(r), GetRectCenterY(r), 0)
call IssuePointOrder(u,"attackground",GetRectCenterX(s), GetRectCenterY(s))
endfunction

endlibrary

---------------------------------------------------------------------------------------------------------------------

PART 2

Now you'll need a trigger to make the function and patrols happen in game Right?
1) Now make a trigger called Patrols
2) Copy n Paste This.
3) Keep in mind that the two back slashes need to be removed in order for the trigger to run.
4) Remember for the bottom part make sure it says Patrols and you name your trigger Patrols.
5) Now all you have to do is instert a unit type, Archer, Shaman, etc (Pick any unit from Globals --> EndGlobals)
6) The first region is the creating a unit region
7) The second region is the region the created unit is patrolling to.
---------------------------------------------------------------------------------------------------------------------

function Trig_Patrols_Actions takes nothing returns nothing

//call patrol(shaman, gg_rct_Region_000, gg_rct_Region_001)
//call attacker(mortar, gg_rct_Region_000, gg_rct_Region_001)

endfunction

//===========================================================================
function InitTrig_Patrols takes nothing returns nothing
set gg_trg_Patrols = CreateTrigger( )
call TriggerAddAction( gg_trg_Patrols, function Trig_Patrols_Actions )
endfunction

---------------------------------------------------------------------------------------------------------------------

And thanks to arun, thats all you need to know how to do to make fast patrols in jass.
Back to top Go down
AmAzIn[G]
Commander
Commander
avatar


PostSubject: Re: patrols in jass???   Thu Feb 04, 2010 9:21 pm

Bump my post above.
Back to top Go down
marksoccer
Commander
Commander
avatar


PostSubject: Re: patrols in jass???   Fri Feb 05, 2010 5:37 pm

this is the whole trigger:

function Trig_Patrols_Actions takes nothing returns nothing

call patrol(grunt, gg_rct_Region_075, gg_rct_Region_076)
call attacker(mortar, gg_rct_Region_224, gg_rct_Region_104)
call patrol(grunt, gg_rct_Region_095, gg_rct_Region_077)
call patrol(priest, gg_rct_Region_096, gg_rct_Region_103)
call patrol(rifle, gg_rct_Region_194, gg_rct_Region_193)
call patrol(rifle, gg_rct_Region_188, gg_rct_Region_187)
call patrol(priest, gg_rct_Region_184, gg_rct_Region_183)
call patrol(headhunter, gg_rct_Region_109, gg_rct_Region_122)
call patrol(shaman, gg_rct_Region_181, gg_rct_Region_182)
call patrol(rifle, gg_rct_Region_197, gg_rct_Region_198)
call patrol(archer, gg_rct_Region_199, gg_rct_Region_200)
call patrol(rifle, gg_rct_Region_105, gg_rct_Region_108)

endfunction

//===========================================================================
function InitTrig_Patrols takes nothing returns nothing
set gg_trg_Patrols = CreateTrigger( )
call TriggerAddAction( gg_trg_Patrols, function Trig_Patrols_Actions )
endfunction


it says this is wrong

undeclared variable set gg_trg_Patrols = CreateTrigger( )
Back to top Go down
marksoccer
Commander
Commander
avatar


PostSubject: Re: patrols in jass???   Fri Feb 05, 2010 6:23 pm

Back to top Go down
Pat1487
Moderator
Moderator
avatar


PostSubject: Re: patrols in jass???   Fri Feb 05, 2010 7:40 pm

Change the name of Untitled Trigger 001 to Patrols
Back to top Go down
marksoccer
Commander
Commander
avatar


PostSubject: Re: patrols in jass???   Sat Feb 06, 2010 6:57 pm

yea i figuered that out after i forgot the s the 1st time. then i redid it and i forgot the whole changing the name. Very Happy
Back to top Go down
ShiFteh
Recruit
Recruit



PostSubject: Re: patrols in jass???   Sat Jun 25, 2011 7:09 pm

I'm having trouble with this. Here's my trig:
Spoiler:
 

Yes, the trigger name is Patrols, and I made the Library trigger.
Anyway, I save my map and I get this error from jasshelper.
Spoiler:
 

Can anyone plz help? I've been trying to solve this for like a whole day now.. I compared it to the same trigger in Maze of Glory 3, and they're the same.




Last edited by ShiFteh on Sat Jun 25, 2011 10:45 pm; edited 1 time in total
Back to top Go down
Pat1487
Moderator
Moderator
avatar


PostSubject: Re: patrols in jass???   Mon Jun 27, 2011 1:44 am

It looks like your missing the Patrol library that amaz posted above
Back to top Go down
ShiFteh
Recruit
Recruit



PostSubject: Re: patrols in jass???   Mon Jun 27, 2011 12:55 pm

Well I can't show you any pictures now.. I deleted the triggers because I never solved it, so I just basically made the same trigger in GUI.
Spoiler:
 

And then I keep doing that until I finish all the patrols. More work though. :/
BTW I did have the Patrol library. Didn't edit anything in there like Amaz said.






Back to top Go down
Serenity09
Moderator
Moderator
avatar


PostSubject: Re: patrols in jass???   Wed Jun 29, 2011 7:29 pm

you could make the patrols trigger in gui

something like it having no event
but the actions would create a unit at a global region and order it to move to the other global region

you'd have to set each of the regions though and in the end it'd be much more difficult
even more difficult then writing each out in gui

you really should use a jass patrol trigger though, otherwise each patrol leaks

anyways pat's right
the only reason you'd get that error is if your map didnt have any function called Patrol

looking at mark's screenshot,
the function name is patrol not Patrol
everything is case sensitive
of course this is relying on mark's version being right
which is never a good idea
Back to top Go down
Sponsored content




PostSubject: Re: patrols in jass???   

Back to top Go down
 
patrols in jass???
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Clan TMMM :: Warcraft 3 :: WC3 Tutorials and Help-
Jump to: