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

New to scripting? We want you!

Official Ventrilo: Host:Apollo.MaxFrag.net Port:3840
TestBed needs our help! Please donate a few dollars to keep it running here!
Have you mastered a specific part of GS2? Create a guide and help others!

You are not connected. Please login or register

Assignment 1 - Astram

3 posters

Go down  Message [Page 1 of 1]

1Assignment 1 - Astram Empty Assignment 1 - Astram Mon May 09, 2011 6:11 pm

Astram



Well here you go =D
Put this is a level!
Code:

//#CLIENTSIDE
function onCreated()
  {
  this.image = "block.png";
  }
function onPlayerTouchsMe()
  {
  player.chat = "GET YOUR HANDS OFF ME!";
  }
Very Happy

2Assignment 1 - Astram Empty Re: Assignment 1 - Astram Tue May 10, 2011 1:14 pm

Kavan



Astram wrote:Well here you go =D
Put this is a level!
Code:

//#CLIENTSIDE
function onCreated()
  {
  this.image = "block.png";
  }
function onPlayerTouchsMe()
  {
  player.chat = "GET YOUR HANDS OFF ME!";
  }
Very Happy

Not to be rude or anything, but your braces here kind of confused me. Looks like one big line down the middle of your code. Laughing
Plus, it will make it harder for others to read (for me anyway). I always expect the last brace to be the furthest left after an event.

ie.
Code:
function onCreated() {
 this.image = "block.png";
} // In line with 'function', so it looks finished.

Just saying... Rolling Eyes

3Assignment 1 - Astram Empty Re: Assignment 1 - Astram Wed May 11, 2011 3:20 pm

Deas



should have setshape(1,32,32); in onCreated() also, as you should not rely on the "shape" of the image

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum