Script Structuring

    Share

    Guest
    Guest

    Script Structuring

    Post by Guest on Sun Jul 12, 2009 11:17 pm

    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)

    • 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!
    avatar
    OblivionModda
    Admin

    Posts : 557
    Skill points : 964
    Reputation : 31
    Join date : 2009-06-08
    Age : 23
    Location : New Zealand

    Re: Script Structuring

    Post by OblivionModda on Sun Jul 12, 2009 11:23 pm

    PERFECT. THANKS SO MUCH. Answered the most part of my question Very Happy. Thanks again Very Happy I think I have advanced in my knowledge of scripting by 10+ Very Happy


    _________________
    Fear Denies Fatih.

    Guest
    Guest

    Re: Script Structuring

    Post by Guest on Sun Jul 12, 2009 11:24 pm

    Glad to hear it Smile
    avatar
    Monkeyuncle8

    Posts : 468
    Skill points : 729
    Reputation : 22
    Join date : 2009-07-04
    Location : The last place you would look

    Re: Script Structuring

    Post by Monkeyuncle8 on Sun Jul 12, 2009 11:43 pm

    I think I can take it from here

    alright if you want to not put the full "scriptname" just put scn

    now for variables
    ref is for referance
    short is a whole number
    float can go up to six digets
    long can go up to 12 digets I think, You will hardley need that
    since the begin commmands were already done I will move on

    Timer - now this can be a bite difficult, but very helpfull

    scn Timer
    short trigger
    float timer; needs to be float
    begin gamemode
    if timer > 0
    set timer to timer - get secondspassed; this will count down the timer
    endif
    if trigger == 1; whenever this variable is 1 this will run
    set timer to 10 ; setting it for ten sec
    endif
    if timer <= 0 && trigger == 1 ;when ther timer is up this will run
    set trigger to 0 ; make sure it doesn't loop
    ;here is where you put the effects
    endif
    end

    Now I know it can be very difficult for beginers, but it is extrodinarily usefull and I have explained it as best as I can

    Tell me if I need to explain anything
    avatar
    psman012

    Posts : 335
    Skill points : 504
    Reputation : 20
    Join date : 2009-06-16
    Age : 22
    Location : Earth

    Re: Script Structuring

    Post by psman012 on Sun Jul 12, 2009 11:46 pm

    Holy crap...


    _________________
    "I know what you're thinking. "Did he fire six shots or only five?" Well, to tell you the truth, in all this excitement I kind of lost track myself. But being as this is a .44 Magnum, the most powerful handgun in the world, and would blow your head clean off, you've got to ask yourself one question: Do I feel lucky? Well, do ya, punk?"

    -Harry Callahan, Dirty Harry
    avatar
    Monkeyuncle8

    Posts : 468
    Skill points : 729
    Reputation : 22
    Join date : 2009-07-04
    Location : The last place you would look

    Re: Script Structuring

    Post by Monkeyuncle8 on Mon Jul 13, 2009 12:00 am

    I know it looks hard, but if you take it piece by piece it is a lot easier than it seems

    Guest
    Guest

    Re: Script Structuring

    Post by Guest on Mon Jul 13, 2009 12:15 am

    I never learned that stuff...maybe you should make your own tutorial. These guys aren't that advanced anyway, they just recently learned conditions...
    avatar
    OblivionModda
    Admin

    Posts : 557
    Skill points : 964
    Reputation : 31
    Join date : 2009-06-08
    Age : 23
    Location : New Zealand

    Re: Script Structuring

    Post by OblivionModda on Mon Jul 13, 2009 12:29 am

    Very Happy Thanks Monkeyuncle I feel like I have learned a lot today Very Happy


    _________________
    Fear Denies Fatih.
    avatar
    psman012

    Posts : 335
    Skill points : 504
    Reputation : 20
    Join date : 2009-06-16
    Age : 22
    Location : Earth

    Re: Script Structuring

    Post by psman012 on Mon Jul 13, 2009 12:33 am

    Your not the only one, OblivionModda...


    _________________
    "I know what you're thinking. "Did he fire six shots or only five?" Well, to tell you the truth, in all this excitement I kind of lost track myself. But being as this is a .44 Magnum, the most powerful handgun in the world, and would blow your head clean off, you've got to ask yourself one question: Do I feel lucky? Well, do ya, punk?"

    -Harry Callahan, Dirty Harry
    avatar
    Monkeyuncle8

    Posts : 468
    Skill points : 729
    Reputation : 22
    Join date : 2009-07-04
    Location : The last place you would look

    Re: Script Structuring

    Post by Monkeyuncle8 on Mon Jul 13, 2009 12:57 am

    I am just going out on a limb here, but I think I am the person anyone here should come here for any scripting problems Very Happy

    Sponsored content

    Re: Script Structuring

    Post by Sponsored content


      Current date/time is Mon Nov 20, 2017 7:17 am