• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Beginner here :(

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
Hey I'm very new the the Jass idea. I have been using GUI for almost the entire time. Now that i want to get into Jass, i have a few questions, i foundthat he tutorials i read didnt answer, or the answer was such that i could not understand it. I do have a few questions:

1) Do functions have to be stated? Or can calling natives work just as well?


2) If i were to convert GUI to custom text, Is there an easier way to simplify the functions, instead of, say, having 16 functions?

These questions probably sound retarded, but, ya. Thanks in advance.
 
Level 11
Joined
Feb 22, 2006
Messages
752
1. Natives and BJs don't have to be redeclared. If you want to use your own functions, you obviously have to declare them.

2. In most cases, the answer is yes. But unfortunately there isn't one general way to do it. Basically you just need to learn how JASS works bit by bit and figure out from there how to get a less messy equivalent of what GUI generates.
 
Level 8
Joined
Jun 18, 2007
Messages
214
Hey I'm very new the the Jass idea. I have been using GUI for almost the entire time. Now that i want to get into Jass, i have a few questions, i foundthat he tutorials i read didnt answer, or the answer was such that i could not understand it. I do have a few questions:

1) Do functions have to be stated? Or can calling natives work just as well?


2) If i were to convert GUI to custom text, Is there an easier way to simplify the functions, instead of, say, having 16 functions?

These questions probably sound retarded, but, ya. Thanks in advance.

1) Try looking at functions like triggers in GUI, in them you call actions (natives and BJs), but BJs are bad. For example function MyFunction takes nothing returns nothing - you could look at this as the start of the actions in GUI. First you call locals (which are similar to variables in GUI) and you assign them to whatever you want: local unit, local real, local integer, local location, local rect, etc. Look at the natives as actions, let's say you want to change unit Fly Height in GUI it would be: Animation - Set Unit Fly Height, in JASS native would be :SetUnitFlyHeight(whichunit, real height, real rate), BJ would be: SetUnitFlyHeightBJ, natives are much better and always use them.

2) Hmm.. I don't actually understand what you mean. But, yes, removing BJs, rewriting codes, putting multiple functions in one (such as filters for picking units in group). Having timer loops: in GUI you would use another trigger for a loop, in JASS you just use another function, and call it over native action....

Hope this helps :p... I also learned JASS a month ago, and was using GUI for years.
 
Status
Not open for further replies.
Top