Hi guys I learned JASS about a month or 2 ago now and I'm just starting to properly get the hang of it. Anyways theres 2 questions I really want answering that no tutorial I've read seems to answer properly (well, I suppose wyrmlord brushes over #2 but doesn't at all explain it enough)
#1:When browsing the JassCraft library of functions etc I came across the different object types: they were declared sort of like maybe constant variables. Heres what I think the syntax is:
heres an example which declares the unit type:
It would certainly be good to know how to use custom types and how to set their attached(I don't think thats the correct term)variables (such as a unit has hit points, man points, defense points, attack points...)
#2:what are boolexpr and how to use them? Because without this knowledge I can't properly use most enum functions and quite a bit more useful JASS. Wyrmlord just said, in his tutorial, "its a condition, kind of" which doesn't actually help me one bit
The first one might be me wanting to do more than JASS allows, but I think since you can declare custom types there must be a way to use them to your advantage in warcraft.
I hope you can help me with these problems as I think after I've learned these I'll be on my way to mastering JASS and will (hopefully) come up with many good systems and spells in JASS in the future.
#1:When browsing the JassCraft library of functions etc I came across the different object types: they were declared sort of like maybe constant variables. Heres what I think the syntax is:
JASS:
type typename extends parenttype
JASS:
type unit extends widget
//unit is the type being declared
//widget is unit's parent or root type - you can give
//units as a param for a function which takes widgets
#2:what are boolexpr and how to use them? Because without this knowledge I can't properly use most enum functions and quite a bit more useful JASS. Wyrmlord just said, in his tutorial, "its a condition, kind of" which doesn't actually help me one bit
The first one might be me wanting to do more than JASS allows, but I think since you can declare custom types there must be a way to use them to your advantage in warcraft.
I hope you can help me with these problems as I think after I've learned these I'll be on my way to mastering JASS and will (hopefully) come up with many good systems and spells in JASS in the future.