- Joined
- Feb 14, 2008
- Messages
- 289
yo, i got quite a few questions. All of which are specific about little details and really dont have time to read massive tutorials for one thing at a time. (college full-time) while i am at it, i think learning jazz a bit will help my class.
note: i am trying to understand by analyzing codes other people have made.
from the Code of this map: http://www.hiveworkshop.com/forums/spells-569/shadow-step-v1-3-a-197510/?prev=status=a
1.
the word "private" means what? that the constant only applys to the function it is inside? which would make no sense since the global function never actually uses it, just makes it.
2. Where does Jass BEGIN? Like, when u cast an ability, what would cause the entire code to start when the ability is cast. Do you use GUI to start it? (of course with functions having conditions, no need to have all the conditioning in gui)
3. Also, all of the functions actually begin in "private static/dynamic method". Shouldnt functions begin in "function"? also, does the word static/dynamic mean you cannot change any of the variables inside them? no matter what u set them to outside the function? and what is "method" vs "struct data/fade" is struct like a sub-procedure since it requires nothing and returns nothing?
note: i am trying to understand by analyzing codes other people have made.
from the Code of this map: http://www.hiveworkshop.com/forums/spells-569/shadow-step-v1-3-a-197510/?prev=status=a
1.
JASS:
globals
private constant integer ABILID = 'ABSS' // raw code of ability "Shadow Step"
private constant integer DUMABILID1 = 'ASS1' // raw code of ability "Shadow Swap"
private constant integer DUMABILID2 = 'ASS0' // raw code of ability "Shadow Step (Illusion)"
private constant integer CASTID = 'cAST' // raw code of unit "Caster Dummy"
private constant real OFFSET = 100. // offset distance from the target
private constant real PERIOD = 0.1 // update interval for shadow fade and illusion timer
private constant real SHADOW_DIST = 50. // distance interval where a shadow is created
private constant real TRANS = 150. // 0 = completely transparent, maximum of 255
private constant real FADE_DUR = 1. // time for shadows to fade
private constant real FADE_RATE = TRANS * PERIOD / FADE_DUR // rate of fading
private constant real TURN_RATE = 0.6 // caster's turn rate
private constant string ANIM = "slam" // animation to be played by shadows
private constant real ANIM_TIME = 0.5665 // animation time for ANIM
private constant real ANIM_TIME_SCALE = ANIM_TIME / FADE_DUR // time scale for shadows
private constant attacktype ATK = ATTACK_TYPE_HERO // attack type of damage
private constant damagetype DMG = DAMAGE_TYPE_NORMAL // damage type of damage
endglobals
the word "private" means what? that the constant only applys to the function it is inside? which would make no sense since the global function never actually uses it, just makes it.
2. Where does Jass BEGIN? Like, when u cast an ability, what would cause the entire code to start when the ability is cast. Do you use GUI to start it? (of course with functions having conditions, no need to have all the conditioning in gui)
3. Also, all of the functions actually begin in "private static/dynamic method". Shouldnt functions begin in "function"? also, does the word static/dynamic mean you cannot change any of the variables inside them? no matter what u set them to outside the function? and what is "method" vs "struct data/fade" is struct like a sub-procedure since it requires nothing and returns nothing?