Elven
Posting Freak
Posts: 862
Threads: 37
Joined: Aug 2011
Reputation:
26
|
Elven scripting tutorials
I am not maybe as amazing scripter then the old advanced scripters, but I have noticed that many people (maybe not you) have problems with understanding the scripting itself. So I decided that I should put my knowledge into use and make video for those who maybe want to start scripting or who isn't so good at it.
English ain't my primary language, so I hope if you forgive me for my small grammar errors and stuff. Anyway if you have any suggestions about what to do tutorial, let me know here please ! If I consider it needed, I'll give it a go. I know also that there probably are already many tutorials. But I didn't see any that basic level. You cannot jump one level up without knowing previous level after all ! Since as I said, English ain't my primary language, I tend to talk little bit easier as well and use less words what might confuse people (hard language). I hope thought that it will help for some people!
Here is the current list (only one, tha start)
Basics of the Basic!
When is it syntax and when not?
Make your life easier: Notepad++ with plugin & Debugging!
* So, how the duckling I install hps support?
Scripting Functions (intro)
Timers
Piano Scare (Request)
Adding Credits!
Setting up development mode!
LOOPABLE TIMERS (Limited edition)
Hallucination monster scare!
Yes, probably after I am done with all tutorials, I will post that "creation" here as well
Thanks,
Elven
(This post was last modified: 04-16-2012, 10:46 PM by Elven.)
|
|
08-27-2011, 10:16 PM |
|
Juby
Senior Member
Posts: 290
Threads: 2
Joined: May 2011
Reputation:
5
|
RE: Elven scripting tutorials
Ahh nice, I am far too lazy to make videos so I salute you for that!
Insanity. Static.
|
|
08-27-2011, 10:28 PM |
|
Elven
Posting Freak
Posts: 862
Threads: 37
Joined: Aug 2011
Reputation:
26
|
RE: Elven scripting tutorials
Taking 15-25 minutes per day isn't sooo bad .
Plus it is for myself as well. I also study thing or do and then share it with others .
(This post was last modified: 08-27-2011, 10:42 PM by Elven.)
|
|
08-27-2011, 10:42 PM |
|
JetlinerX
Senior Member
Posts: 599
Threads: 49
Joined: Jun 2011
Reputation:
19
|
RE: Elven scripting tutorials
Thanks very much! I am a fairly good scripter, but I really look forward to these and hope to learn something. Page, Bookmarked.
|
|
08-27-2011, 10:56 PM |
|
MegaScience
Member
Posts: 213
Threads: 1
Joined: Aug 2011
Reputation:
2
|
RE: Elven scripting tutorials
And yet you almost always deny my scripting advice, you silly man you!
|
|
08-28-2011, 01:01 PM |
|
Elven
Posting Freak
Posts: 862
Threads: 37
Joined: Aug 2011
Reputation:
26
|
RE: Elven scripting tutorials
|
|
08-28-2011, 02:15 PM |
|
JetlinerX
Senior Member
Posts: 599
Threads: 49
Joined: Jun 2011
Reputation:
19
|
RE: Elven scripting tutorials
I know your tutorials are on scripting, but can I make a request? Can you do a tutorial on building outside environments?
|
|
08-28-2011, 03:11 PM |
|
Juby
Senior Member
Posts: 290
Threads: 2
Joined: May 2011
Reputation:
5
|
|
08-28-2011, 03:14 PM |
|
JetlinerX
Senior Member
Posts: 599
Threads: 49
Joined: Jun 2011
Reputation:
19
|
RE: Elven scripting tutorials
Holy crap! Sorry! I totally missed that tutorial!
Thnaks Juby!
(This post was last modified: 08-28-2011, 03:16 PM by JetlinerX.)
|
|
08-28-2011, 03:16 PM |
|
Kyle
Posting Freak
Posts: 911
Threads: 36
Joined: Sep 2010
Reputation:
7
|
RE: Elven scripting tutorials
You should add something about what each word in the script means. It's all about the details, the details.
Here's some scripting words that are somewhat simplified compared to some of the tutorials on the wiki. I hope you check it out.
bool = This is a true/false statement. It is used mostly to check to see something. True meaning yes, false meaning no.
int = This is an integer. It is a whole number that can be positive or negative. Examples: 1, 6, 32, -8, 0, -43
float = This is a whole number and some more left after it. Examples: 1.2, 3.23, 53234.3, -443.1, -323.1
string = This is a word or phrase. It is not a number. You can think of it as a string of characters. Examples: Hello, Hello World, How are you
"" = This is used to go around strings to seperate them from other things, so the game can recognize that a phrase is being used instead of a word. Examples: "Hello", "Hello World", "How are you"
void = This is used at the beginning of functions. It means that nothing is before it, aside from using int, bool, or string. Examples: void OnStart(), void OnEnter(), void OnLeave(), void CollideRoomTwo()
== = This is used for when something equals something else in an "if" statement or an "else if" statement. It literally means "equal to". Examples: x == a, t + 1 == x
!= = This is used when something does not equal something else in an "if" statement or an "else if" statement. Examples: x != a, 2 != 3
&& = This is an "and" symbol. It is used mostly when asking for multiple things. Example: for(int i = 1; i > 0 && i < 11; i++)
|| = This is an "or" symbol. It is used for asking multiple things and if one of them is true, then whatever you want happens aside from it being false.
if = This is an "if" statement. It is used when you are going to ask something. Example: if (x == a) { [whatever you want here] }
else = This is an "else" statement. It is used when something of an "if" statement isn't true, then it will do that. Example: if (x == a) { } else { [do what ever would happen instead if x doesn't equal a] }
else if = This is an "else if" statement. It is used when you want to ask if another thing is true if the "if" statement was false. Example: if (x == a) { } else if (x == b) { [What ever you want to happen if x == b && x != a] }
for = This is a "for" statement. It is used mostly when creating multiple instances of something. Example: for (x = 1; x > 5 && x < 0; x++) { AddTimer("timer"x, x * 1.5, "TimerFunction01") }
< = This is a less than sign.
> = This is a greater than sign.
<= = This is a less than or equal to sign.
>= = This is a greater than or equal to sign.
++ = This adds 1 to a number. Example: x++
-- = This subtracts 1 to a number. Example: x--
Scope = This term refers to the access a variable has to the whole network of scripts within your custom story files. Examples: int x in a function stays within that function. x would become undefined if attempted to be used within another function. SetLocalVarInt("Variable", 1); is like saying x = 1, but it can be used all within the script. SetGlobalVarInt("Variable", 1); is the same thing but can be used within all the scripts within your custom story folder. Need global.hps to work. See below.
// = This is used to signal that all text to the right of it will be notes and will not conflict with the script itself.
/* = This is used to signal that all text to right and underneath it will become notes. This can be useful for typing paragraphs at the beginning to explain a script or ideas or organization. Only stopped by */
*/ = This is used to stop a /* from turning things into notes, so the space between /* and */ will all be notes.
(This post was last modified: 08-28-2011, 03:27 PM by Kyle.)
|
|
08-28-2011, 03:25 PM |
|
|