• 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 with Custom Script for GUI tutorials?

Status
Not open for further replies.
Level 12
Joined
Nov 3, 2013
Messages
989
So every so often I find myself in a position where I can imagine how something most likely should be done but I don't know the function call(s) for it.

Like; GetOwningPlayer(), GetUnitTypeId() & GetUnitX/Y().

Now some can be found if you scour through threads and tutorials but besides event related function calls like GetTriggerUnit() there is close to no information to be had, AFAIK. (with custom scripts)

I think that it's reasonable that custom scripts should be the stepping stone between normal GUI and coding with raw jass but instead it seems to me that you would need experience with raw jass to know how to use custom scripts by then I doubt you have much use of them or GUI...

I reckon I wouldn't be wasting as much of people's time with what are most likely stupid questions If there were just some list or something of all the function calls that I could read through :3
 
But usually, to get those stuff, I just create another trigger, set some random variable to what I want (e.g. Set tempunit=Triggering Unit) then just convert the trigger to custom text. That's basically how I learned some basic JASS.

I think this is how I learned as well.

Alternatively, you can look up the function in the common.j.

http://wiki.thehelper.net/wc3/jass/common.j

Sometimes it is intuitive to guess what it might be called e.g. GetUnitX or GetUnitTypeId. Other times, it is difficult, so you should just create a new trigger and convert it (as mentioned above). But I recommend using the common.j to make sure you are inputting the proper values. The part after the "takes" is the arguments it expects. For example:
JASS:
native GroupAddUnit                         takes group whichGroup, unit whichUnit returns nothing

That expects a group as the first argument, and then a unit as the second argument (separated by a comma).

So you can use these native declarations as a guideline for what type of data you should provide.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Well there's couple of chapters here that deals with that. Have you read through it?

Yes, It's one of the tutorials I come back to quite often as I have it bookmarked :p. It has been very helpful and is of great use. However it mostly cover function calls to events. (out of the related things to this subject, there is obviously loads of other useful things in it)

But usually, to get those stuff, I just create another trigger, set some random variable to what I want (e.g. Set tempunit=Triggering Unit) then just convert the trigger to custom text. That's basically how I learned some basic JASS.

Thanks for the tip, this might be the perfect thing as it would let me see what is being done and how.
 
Status
Not open for further replies.
Top