BGS Modders

Would you like to react to this message? Create an account in a few clicks or log in to continue.

3 posters

    Script Structuring

    avatar
    Guest
    Guest


    Script Structuring Empty Script Structuring

    Post by Guest 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!
    OblivionModda
    OblivionModda
    Admin


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

    Script Structuring Empty Re: Script Structuring

    Post by OblivionModda 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
    avatar
    Guest
    Guest


    Script Structuring Empty Re: Script Structuring

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

    Glad to hear it Smile
    Monkeyuncle8
    Monkeyuncle8


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

    Script Structuring Empty Re: Script Structuring

    Post by Monkeyuncle8 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
    psman012
    psman012


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

    Script Structuring Empty Re: Script Structuring

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

    Holy crap...
    Monkeyuncle8
    Monkeyuncle8


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

    Script Structuring Empty Re: Script Structuring

    Post by Monkeyuncle8 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
    avatar
    Guest
    Guest


    Script Structuring Empty Re: Script Structuring

    Post by Guest 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...
    OblivionModda
    OblivionModda
    Admin


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

    Script Structuring Empty Re: Script Structuring

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

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


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

    Script Structuring Empty Re: Script Structuring

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

    Your not the only one, OblivionModda...
    Monkeyuncle8
    Monkeyuncle8


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

    Script Structuring Empty Re: Script Structuring

    Post by Monkeyuncle8 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


    Script Structuring Empty Re: Script Structuring

    Post by Sponsored content


      Current date/time is Fri May 10, 2024 2:51 am