Difference between revisions of "Myfirstscript"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Persidon
(My first script - scriptinf tutorial)
 
imported>Persidon
(My First Script)
Line 1: Line 1:
welcome to the G.E.C.K basic scripting tutorial.
welcome to the G.E.C.K basic scripting tutorial.
First off, what is a script. a script is a segment of code written by the written to produce outcome effects. Say foe example:[code]
First off, what is a script. a script is a segment of code written by the written to produce outcome effects. Say foe example:<pre>
scriptname MyFirstScript
scriptname MyFirstScript


Line 10: Line 10:
[/code]
[/code]
Whats all this you say. It's quite simple actually.
Whats all this you say. It's quite simple actually.
[b]scriptname[/b] : this defines the scriptname. You must have a scriptname or you cant compile(save) it.
'''scriptname''' : this defines the scriptname. You must have a scriptname or you cant compile(save) it.
[b]Begin OnActivate[/b] : This is the most important part of script, OnActivat is one of three main block types. the others are, GameMode and MenuMode.
'''Begin OnActivate''' : This is the most important part of script, OnActivate is one of three main block types. the others are, GameMode and MenuMode.
[b]ShowMessage MyMessage[/b] : Shows the message MyMessage, wich is hello world.
'''ShowMessage MyMessage''' : Shows the message MyMessage, wich is hello world.
[b]End[/b] : is a must have or it wont compile.
'''End''' : is a must have or it wont compile.
There you go, its simple isn't it.
There you go, its simple isn't it.

Revision as of 21:42, 2 May 2010

welcome to the G.E.C.K basic scripting tutorial.

First off, what is a script. a script is a segment of code written by the written to produce outcome effects. Say foe example:

scriptname MyFirstScript

Begin OnActivate

Showmessage Mymessage

end
[/code]
Whats all this you say. It's quite simple actually.
scriptname : this defines the scriptname. You must have a scriptname or you cant compile(save) it.
Begin OnActivate : This is the most important part of script, OnActivate is one of three main block types. the others are, GameMode and MenuMode.
ShowMessage MyMessage : Shows the message MyMessage, wich is hello world.
End : is a must have or it wont compile.
There you go, its simple isn't it.