Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Script error with the tutorial game  (Read 4744 times)

0 Members and 1 Guest are viewing this topic.

Kato

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • View Profile
    • Company Website
Script error with the tutorial game
« on: February 19, 2007, 01:55:14 AM »

I'm working on that last bit of the tutorial, trying to get the door to change the scene, but I'm coming up with an error. It's on the line with the Game.ChangeScene. This is what my code looks like.
Code: [Select]
#include "scripts\base.inc"


////////////////////////////////////////////////////////////////////////////////
on "LookAt"
{
  actor.GoToObject(this);
  actor.Talk("Blah");
}


////////////////////////////////////////////////////////////////////////////////
on "Take"
{
  actor.GoToObject(this);
  actor.Talk("Blah");
}


////////////////////////////////////////////////////////////////////////////////
on "Talk"
{
  actor.GoToObject(this);
  actor.Talk("Blah");
}


////////////////////////////////////////////////////////////////////////////////
on "LeftClick"
{
  actor.GoToObject()
  Game.ChangeScene("scenes\MyScene\MyScene.scene");
}


////////////////////////////////////////////////////////////////////////////////
//function GoToObject()
//{
//  actor.GoTo(200, 200);
//  actor.TurnTo(DI_UP);
//}

...a lil help, eh? :-P
Logged
Cavernite/URUman

leucome

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 86
    • View Profile
    • Leucome Games
Re: Script error with the tutorial game
« Reply #1 on: February 19, 2007, 04:12:57 AM »

Try to add ;  at the end of the line
actor.GoToObject();

Logged
Look my Site ——► http://news.leucome.ca

Kato

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • View Profile
    • Company Website
Re: Script error with the tutorial game
« Reply #2 on: February 19, 2007, 07:22:19 AM »

Thanks for the help mate, but now it says there's an error on the line that I added the ; to. It works in the way of changing scenes, but the actor of course doesn't move to the door.

-Kato
Logged
Cavernite/URUman

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Script error with the tutorial game
« Reply #3 on: February 19, 2007, 11:52:38 AM »

you call actor.GoToObject without specifying what object it should go to.

Try this:

actor.GoToObject(this);

Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Script error with the tutorial game
« Reply #4 on: February 19, 2007, 01:11:12 PM »

Maybe you need to remove ALL the // before every line starting with GoToObject().

Isn't // used to comment lines?
Logged

sharkbait

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 13
    • View Profile
Re: Script error with the tutorial game
« Reply #5 on: February 19, 2007, 04:30:30 PM »

..and don't forget to set the walk-to coordinates for the door region in the scene manager.
Logged
 

Page created in 0.029 seconds with 18 queries.