I have a bit of experience with VB6 and C++ and I think I've got the basics of JASS down. But I wondering if there were any good places to learn about more advanced things in JASS like memory leaks, gamecache, threads, etc.
Also, what are the most useful programs for working with JASS? I've been using JASS Craft, but while it's pretty good, it still leaves some things to be desired.
Advanced JASS Tutorials?
Moderator: Cheaters
-
- Senior Member
- Posts: 178
- Joined: February 15th, 2009, 9:08 pm
-
- The Flying Cow!
- Posts: 2197
- Joined: November 2nd, 2007, 10:34 pm
- Location: Melbourne
Re: Advanced JASS Tutorials?
Go and dissect dota.
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
AutoCP3 now available for free!
-
- Senior Member
- Posts: 178
- Joined: February 15th, 2009, 9:08 pm
Re: Advanced JASS Tutorials?
Well I have been looking at other people's triggers, although I haven't looked at DOTA yet
But anyway, looking at the the source only tells you "what", not "why". It won't help you much if you don't really understand the code
But anyway, looking at the the source only tells you "what", not "why". It won't help you much if you don't really understand the code
-
- The Flying Cow!
- Posts: 2197
- Joined: November 2nd, 2007, 10:34 pm
- Location: Melbourne
Re: Advanced JASS Tutorials?
Yes it does..And you need to look to understand. So look and look and look and then you will understand and then you will know the why as well as the what and also how
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
AutoCP3 now available for free!
-
- Forum Staff
- Posts: 2619
- Joined: June 2nd, 2007, 6:53 pm
- Title: I Just Lost the Game
Re: Advanced JASS Tutorials?
If you don't understand a thing, make JassCraft tell you what it does. Find it in the Native List on the right, and click on it. It'll display what it does in the bottom box. It'll only tell you about things like PlayerSetState, however, not things like "else" or an entire trigger.
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
-
- Senior Member
- Posts: 178
- Joined: February 15th, 2009, 9:08 pm
Re: Advanced JASS Tutorials?
But for natives, it only displays the prototype (I assume the actual logic of the natives is hardcoded into the game)
For example, when I look up ExecuteFunc, all I see is
That doesn't really clarify whether code like this is acceptable or not. If foo is called, do the functions execute simulatenously or in sequence? Which one goes first? Or is there an error?
For example, when I look up ExecuteFunc, all I see is
Code: Select all
native ExecuteFunc takes string funcName returns nothing
That doesn't really clarify whether code like this is acceptable or not. If foo is called, do the functions execute simulatenously or in sequence? Which one goes first? Or is there an error?
Code: Select all
globals
integer i
integer j
endglobals
function foo takes nothing returns nothing
set i=0
set j=0
call ExecuteFunc("bar")
loop
exitwhen i==1
set j=j+1
endloop
endfunction
function bar takes nothing returns nothing
//do stuff here
set i=1
endfunction
-
- The Flying Cow!
- Posts: 2197
- Joined: November 2nd, 2007, 10:34 pm
- Location: Melbourne
Re: Advanced JASS Tutorials?
Then go and try it?
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
AutoCP3 now available for free!
-
- Forum Staff
- Posts: 811
- Joined: January 1st, 2008, 12:58 am
Re: Advanced JASS Tutorials?
Code: Select all
native ExecuteFunc takes string funcName returns nothing
I think he's wanting to know if there's a way to show how it executes the code "ExecuteFunc()".
Wanna learn to hack maps? --> Guide
-
- Senior Member
- Posts: 165
- Joined: February 25th, 2008, 2:56 am
- Title: Sir Awesome
Re: Advanced JASS Tutorials?
Doesn't it always execute in sequence? I was reading up on JASS, and I think it said that. Lol. It was at like 1 o'clock
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Advanced JASS Tutorials?
Trail and error is good way to learn ...as well as a lot of testing.
ExecuteFunc can call functions that are ahead OR after the function that it's called from.
Normal calling can only reference functions that occur ahead of the function that calls it.
Using ExecuteFunc will also open a new thread, but the ExecuteFunc function called will occur before the code after ExecuteFunc.
This means that if I have "TriggerSleepAction(#)" (aka wait/sleep) in my Func1, Func2 will finish first. Otherwise, if I just call Func1 ( call Func1() ), Func2 will resume when Func1 is finished.
ExecuteFunc can call functions that are ahead OR after the function that it's called from.
Normal calling can only reference functions that occur ahead of the function that calls it.
Using ExecuteFunc will also open a new thread, but the ExecuteFunc function called will occur before the code after ExecuteFunc.
Code: Select all
function Func1 takes nothing returns nothing
I happen first
endfunction
function Func2 takes nothing returns nothing
call ExecuteFunc("Func1")
I happen second
endfunction
This means that if I have "TriggerSleepAction(#)" (aka wait/sleep) in my Func1, Func2 will finish first. Otherwise, if I just call Func1 ( call Func1() ), Func2 will resume when Func1 is finished.