Poll | | What game does everyone play now? | Starcraft 2 | | 26% | [ 8 ] | Warcraft 3 | | 35% | [ 11 ] | League of Legends | | 19% | [ 6 ] | World of Warcraft | | 0% | [ 0 ] | Diablo 2 | | 0% | [ 0 ] | No games at all | | 10% | [ 3 ] | Other game not listed | | 10% | [ 3 ] |
| Total Votes : 31 |
|
| | patrols in jass??? | |
| | Author | Message |
---|
marksoccer Commander
| Subject: 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 | |
| | | nomorholywar Sergeant
| Subject: 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 | |
| | | marksoccer Commander
| Subject: 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 | |
| | | nomorholywar Sergeant
| Subject: Re: patrols in jass??? Fri Jan 29, 2010 4:05 pm | |
| | |
| | | marksoccer Commander
| Subject: 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 | |
| | | nomorholywar Sergeant
| Subject: Re: patrols in jass??? Sat Jan 30, 2010 10:15 pm | |
| | |
| | | AmAzIn[G] Commander
| Subject: 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. | |
| | | AmAzIn[G] Commander
| Subject: Re: patrols in jass??? Thu Feb 04, 2010 9:21 pm | |
| | |
| | | marksoccer Commander
| Subject: 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( ) | |
| | | marksoccer Commander
| Subject: Re: patrols in jass??? Fri Feb 05, 2010 6:23 pm | |
| | |
| | | Pat1487 Moderator
| Subject: Re: patrols in jass??? Fri Feb 05, 2010 7:40 pm | |
| Change the name of Untitled Trigger 001 to Patrols | |
| | | marksoccer Commander
| Subject: 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. | |
| | | ShiFteh Recruit
| Subject: Re: patrols in jass??? Sat Jun 25, 2011 7:09 pm | |
| I'm having trouble with this. Here's my trig: - Spoiler:
function Trig_Patrols takes nothing returns nothing
call Patrol('ogru', gg_rct_Region_182, gg_rct_Region_183) call Patrol('ogru', gg_rct_Region_184, gg_rct_Region_185) call Patrol('hrif', gg_rct_Region_187, gg_rct_Region_188) call Patrol('hmpr', gg_rct_Region_186, gg_rct_Region_200) call Patrol('ohun', gg_rct_Region_189, gg_rct_Region_190) call Patrol('ugho', gg_rct_Region_191, gg_rct_Region_199) call Patrol('ugho', gg_rct_Region_195, gg_rct_Region_194) call Patrol('owyv', gg_rct_Region_193, gg_rct_Region_192) call Patrol('oshm', gg_rct_Region_196, gg_rct_Region_211) call Patrol('orai', gg_rct_Region_197, gg_rct_Region_198) call Patrol('orai', gg_rct_Region_201, gg_rct_Region_202) call Patrol('uban', gg_rct_Region_203, gg_rct_Region_204) call Patrol('uban', gg_rct_Region_206, gg_rct_Region_205) call Patrol('hgry', gg_rct_Region_209, gg_rct_Region_210) call Patrol('hrif', gg_rct_Region_207, gg_rct_Region_208) call Patrol('uabo', gg_rct_Region_213, gg_rct_Region_212) call Patrol('hmpr', gg_rct_Region_215, gg_rct_Region_214) call Patrol('otau', gg_rct_Region_216, gg_rct_Region_217) call Patrol('hfoo', gg_rct_Region_218, gg_rct_Region_223) call Patrol('esen', gg_rct_Region_221, gg_rct_Region_222) call Patrol('esen', gg_rct_Region_219, gg_rct_Region_220) call Patrol('unec', gg_rct_Region_224, gg_rct_Region_225) call Patrol('unec', gg_rct_Region_226, gg_rct_Region_227) call Patrol('edry', gg_rct_Region_228, gg_rct_Region_229) call Patrol('edry', gg_rct_Region_230, gg_rct_Region_231) call Patrol('otau', gg_rct_Region_232, gg_rct_Region_237) call Patrol('oshm', gg_rct_Region_233, gg_rct_Region_243) call Patrol('oshm', gg_rct_Region_234, gg_rct_Region_240) call Patrol('oshm', gg_rct_Region_235, gg_rct_Region_244) call Patrol('oshm', gg_rct_Region_236, gg_rct_Region_247) call Patrol('edot', gg_rct_Region_238, gg_rct_Region_248) call Patrol('edot', gg_rct_Region_239, gg_rct_Region_241) call Patrol('hgyr', gg_rct_Region_242, gg_rct_Region_245) call Patrol('hfoo', gg_rct_Region_250, gg_rct_Region_251) call Patrol('ugho', gg_rct_Region_226, gg_rct_Region_227)
endfunction
function InitTrig_Patrols takes nothing returns nothing set gg_trg_Patrols=CreateTrigger() call TriggerAddAction(gg_trg_Patrols,function Trig_Patrols) endfunction
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 | |
| | | Pat1487 Moderator
| Subject: Re: patrols in jass??? Mon Jun 27, 2011 1:44 am | |
| It looks like your missing the Patrol library that amaz posted above | |
| | | ShiFteh Recruit
| Subject: 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:
Events: Map Initialization
Actions: Unit - Create 1 (UNIT) for Player 12 (Brown) at (Center of Region 005 <gen>) facing (Position of (Triggering Unit) )
Unit - Order (Last created unit) to Patrol To (Center of Region 006 <gen>)
Unit - Create 1 (DIFFERENT UNIT) for Player 12 (Brown) at (Center of Region 007 <gen>) facing (Position of (Triggering Unit) )
Unit - Order (Last created unit) to Patrol To (Center of Region 008 <gen>)
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. | |
| | | Serenity09 Moderator
| Subject: 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 | |
| | | Sponsored content
| Subject: Re: patrols in jass??? | |
| |
| | | | patrols in jass??? | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| |