I've started to make GS2 lessons which will could become available on servers in the form of interactive GUI's which display information, give questions/feedback as well as practical lessons. It's just an idea i've had and I'd like to know if it is actually a decent idea before i sit down and map out a few lessons. below is my first basic lesson on objects (Information may be slightly incorrect but i'm sure Skyld will kick me if i give wrong information).
Lesson Base
PHP Code:
/* Lesson 1 : Objects */
//#CLIENTSIDE
function onWeaponFired()
showLesson();
public function showLesson()
{
new GuiWindowCtrl("Lesson1Window")
{
profile = "GuiBlueWindowProfile";
extent = "450 300";
position = "5 5";
text = "Lesson 1 : Learn About Objects. By Twinny";
destroyonhide = true;
canmaximize = false;
canresize = false;
new GuiTextCtrl("Lesson1Title")
{
profile = "GuiBlueTextProfile";
position = "30 25";
profile.fontsize = 40;
text = "Brief Lesson on Objects!";
}
new GuiScrollCtrl("Lesson1Scroll") {
profile = "GuiBlueScrollProfile";
position = "15 75";
extent = "420 200";
hscrollbar = "dynamic";
vscrollbar = "dynamic";
visible = true;
canmove = true;
new GuiMLTextCtrl("Lesson1Body") {
useownprofile = true;
profile = "GuiBlueScrollProfile";
position = "5 5";
extent = "400 180";
}
}
}
graalControl.addControl(Lesson1Window);
setLesson();
}
Actual lesson
PHP Code:
function setLesson()
{
Lesson1Body.settext(
"Welcome to Twinny's basic lesson about objects!" NL
"Graal is made up of objects. Some examples include players, levels,
weapons, horses, bombs and gui controls." NL "" NL
"An object is made up of variables, functions and other objects.
Let's take a look at a few variables, objects and functions found in a level." NL "" NL
"Some Functions" NL
"function objecttype()" NL
"function findareanpcs()" NL
"function getmappartfile()" NL
"function tiletype()" NL "" NL
"Some Objects" NL
"arrows = TGraalVar;" NL
"bombs = TGraalVar;" NL
"chests = TGraalVar;" NL
"compus = TGraalVar;" NL
"horses = TGraalVar;" NL "" NL
"Some Variables" NL
"isnopkzone = 0;" NL
"issparringzone = 0;" NL
"name = graalcitybank_inside_01.nw;" NL
"nopkzone = 0;" NL
"tilelayercount = 1;" NL
"tiles = 0;" NL
"timeout = 0;" NL
"width = 64;" NL "" NL
"The function used to make that will become available in lesson 2
GS2 allows for intereaction with objects. For example:
player.chat = level.name;. This will make the player say the levels name" NL "" NL
"You can also access custom functions using objects. Eg. player.customfunction();" NL
"You can also access the object itself using this eg. this.x = 40" NL "" NL
"This is just a brief example of what will no doubt become alot more clearer.
Hopefully this wasn't too hard to understand. If not - mail me at [email protected]" NL
"Next lesson: Advanced Objects with a few practical based lessons"
);
}
Very basic with no interactive material. Do not judge / vote on that exact lesson but moreso on the idea of interactive lessons
[Edit]: You may notice i made showlesson(); a public function. I intend to link all these weapons together to form a much more interactive lesson scheme.