I've been so caught up in telling you what parts of a script do, I forgot to tell you where they should be. So let's cover that shall we? (You don't need to actually copy down the script, and probably shouldn't)
Scriptname TutorialSpellIIScript
Scriptname TutorialSpellIIScript
Ref me
Scriptname TutorialSpellIIScript
Ref me
Begin ScriptEffectStart
Set me to getSelf ;this will always come before a command or variable if needed
If me.isessential == 0 ;this will always come before a command if needed
Kill ;this is the command, you ought to know where this goes by now
endif ;this will always come before "end" if needed
end ;this is always last
That is the basic structure of a script. If you have any questions, you can either post it or send a PM. Hopefully I've filled any gaps in your understanding of scripting, have fun!
- So the first thing you want to put down is the name, which we covered, but just as a reminder it gives an ID to the script. It's always best to give your script the same name as the ID you plan to give the spell, but with "script" at the end. For example, if I were making a script for Grave Digger's Hallow, I would put "GDHSpellScript" as the Script name, and "GDHSpell" as the Spell ID. The name must ALWAYS be put down first. Example:
Scriptname TutorialSpellIIScript
- Second thing in the list is the references. It may seem confusing that the references come before the reference is actually assigned to a command, but it comes first so that the script knows to look out for these words, and recognize them as a command. If you didn't do this, the script would tell you it isn't a command, and would not let you save. Example:
Scriptname TutorialSpellIIScript
Ref me
- Now we do the block for the script. Begin the block with a block command.
Here is a list of block commands. Spell scripts use all types of block commands, plus 3 unique ones, begin scripteffectstart, begin scripteffectupdate, and begin scripteffectfinish. After you put the block command you add in the commands. Example:
Scriptname TutorialSpellIIScript
Ref me
Begin ScriptEffectStart
Set me to getSelf ;this will always come before a command or variable if needed
If me.isessential == 0 ;this will always come before a command if needed
Kill ;this is the command, you ought to know where this goes by now
endif ;this will always come before "end" if needed
end ;this is always last
That is the basic structure of a script. If you have any questions, you can either post it or send a PM. Hopefully I've filled any gaps in your understanding of scripting, have fun!