• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Exploading Fireball Spell

Status
Not open for further replies.

peq

peq

Level 6
Joined
May 13, 2007
Messages
171
Let me give you one piece of advice: Do not try to convert some Code from GUI to Jass. This will always result in terrible unreadable code.

Also you should know that Jass is not some wonder-thing which makes everything easier, efficient and leakless. So you will have to understand the basics.

So if you want to do this in vJass (yes vJass, there is no reason using old jass unless you want to create all your variables in gui and write thousands of stupid lines) you would start by creating a library or scope where you will put all your code.
Then you define a struct which holds all the variables you need for the spell.

Then you basically write three function which do the same thing as your three GUI-Triggers. The easiest way is to use one timer per spell-instance and attach the struct to it using Timer-Utils.
 

peq

peq

Level 6
Joined
May 13, 2007
Messages
171
You should start with understanding functions, expressions, variables, loops, functions, if-then-elseif-else and functions.
I think this tutorial is the best for this: Introduction to JASS - Wc3campaigns

After that you should read about globals, scopes, libraries and structs in the jasshelpermanual.

Now you got the basic structure of the language and should look at some spells other people have made and try to understand every detail of how they work. Try to add comments to every single line and descripe what that line does to control yourself.

Then try to make your own spell, start with some simple examples.
 
Status
Not open for further replies.
Top