Thread: Learning GS2 :D
View Single Post
  #1  
Old 08-31-2006, 04:41 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Learning GS2 :D

I was problem solving with Chicken yesterday and he was teaching me about each aspect of GS2. So I learned alot really. Here's a couple things I put together with Chicken_l33t.

Simple Light Switch

PHP Code:
function onCreated()
{
this.Number_1 0;
this.Number_2 0;
if (
this.Number_1 this.Number_2 0);
this.value 0;
}
function 
onPlayertouchesme()
{
if (
this.value 0);
this.value 1;
player.chat "On!";
}
else 
{
this.value 0;
player.chat "Off!";

Chat Text Changer

PHP Code:
function onCreated()
{
this.StringArray "GS1 sux.","GS2 is awesome.","blah";
}
function 
onPlayerchats()
{
this.value int(random(0,2));
player.chat this.StringArray[this.value];

How'd I do for a beginner?

E: Eew wasn't in PHP. My bad. :]
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote