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: Stuck Already  (Read 6639 times)

0 Members and 1 Guest are viewing this topic.

StarLite

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 34
    • View Profile
    • StarLite Palace
Stuck Already
« on: June 29, 2005, 06:45:31 PM »

Hi, goodday/night

I just finished the tutorial and I'm stuck already. I think I may have screwed up the script somehow. Once I managed to get Molly to go to the door, actually I think she went out the door because the screen went black. But now I can't get her to go to the door again. I deleted everything in the ready made script and I just have 3 lines.
on(Leftclick)
GoToObject(###, ###)
Game.GameScene("scene\menu\menu.??)
Can't remember the rest. Little help please. How do I get Molly to walk to the door
Logged
Be Thankful For The Dawn Of The Coming Day - Lisle Engle

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re: Stuck Already
« Reply #1 on: June 29, 2005, 06:59:25 PM »

Hi StarLite,

I just finished the tutorial and I'm stuck already. I think I may have screwed up the script somehow. Once I managed to get Molly to go to the door, actually I think she went out the door because the screen went black.

And stays black? In the demo, the second scene (outside) should appear then. I'm not sure what you are trying though. :)

Anyway, please paste us your original code. If it is like you remember, the GoToObject parameters are wrong, the only parameter would be "door" or however the object is called. And check the error log for thrown errors, maybe they already explain what went wrong to you.

Greetings, J.
Logged
Mooh!

StarLite

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 34
    • View Profile
    • StarLite Palace
Re: Stuck Already
« Reply #2 on: June 29, 2005, 07:30:07 PM »

Ok, bare with me I'm newbier than a newbie so all this is way over my head. I'm at step 9 of the tutorial
My script says

on "LeftClick"
actor.GoToObject(476, 601)
Game.ChangeScene("scenes\menu\menu.scene");

The error when I start My scene say: Script complier error. View log for details. So I'm guessing I screwed the script up somehow. The only lines that exist in my door script are those three

For the co-ordinates I got about six different ones. I took Molly and placed her in front of the door with the actor placement tool. Like I said I have nothing but time on my hands I'm thinking of starting the tutorial over again because I think there might have been some things I've missed. Everything up to this point has been a breeze. I don't really like to continue leaving errors behind, that is not a good way to learn. I greatly appreciate any help you can give me. Thanks

StarLite
Logged
Be Thankful For The Dawn Of The Coming Day - Lisle Engle

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re: Stuck Already
« Reply #3 on: June 29, 2005, 07:39:11 PM »

actor.GoToObject(476, 601)

As I mentioned - that's a wrong syntax. "GoToObject" expects an object as parameter, not coordinates like "GoTo". Try "GoToObject(door)" instead. (Assuming your door is called "door". :) )

The error when I start My scene say: Script complier error. View log for details.

Well, then... do that. View the log for details. :) You'll find it in the project's directory.
Don't worry, you're doing fine if until here everything worked fine. And you always learn more from mistakes anyway. ;)
Logged
Mooh!

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Stuck Already
« Reply #4 on: June 29, 2005, 08:20:13 PM »

StarLite, you're almost there, but the script needs a few corrections. It should look like this:

Quote
#include "scripts\base.inc"

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


The #include line should be present in all the scripts, never delete this line. It inserts some common code, so that your script knows about things like "actor", "Scene" etc. You don't have to worry about that too much, just never forget this line.

Notice the curly braces { }. They enclose all the commands you want to be called when the left mouse button is clicked.

And the last change: actor.GoToObject(this); This line tells the actor to walk to object called "this". "this", in this case, is the door, because this script is attached to the door.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

StarLite

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 34
    • View Profile
    • StarLite Palace
Re: Stuck Already
« Reply #5 on: June 29, 2005, 10:31:22 PM »

Oh, great I got it now. This is fantastic I actually know what you're talking about. I would never try to use a program like this  on my own because I thought it would be so complicated. I actually enjoying it so much I'm almost addicted to it. I greatly appreciate the help, thank you both once again. :)
Logged
Be Thankful For The Dawn Of The Coming Day - Lisle Engle

mrwitticism

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
    • View Profile
Re: Stuck Already
« Reply #6 on: November 18, 2010, 09:35:43 AM »

I'm having the same trouble, somewhat, in that I can't go out the door -- not in what've I've created in following the tutorial, nor in the actual tutorial itself (to clarify that latter part, when I run Tutorial step 8, I can't go out the door. I'm afraid that maybe I've screwed up some code there). 

I took what Mnemonic said and added #include "scripts\base.inc" to the beginning of the code, but still it's not working.  Really, I blame myself, being extremely new to this, and not quite understanding the code and how it works.  This is what I have as code for the door now:

#include scripts\base.inc"

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

Maybe someone can tell me what "scenes\menu\menu.scene" means once the actor goes through the door (i.e. how the tutorial ends)?  Does that mean I will go back to go the black menu screen that has tutorials 1-8 + My scene on it?

Also, if I wanted to put a code for going into another room, would I use "scenes\menu\*name of the next scene here*\menu.scene ?

Sorry for the possibly stupid questions
Logged

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: Stuck Already
« Reply #7 on: November 18, 2010, 01:42:59 PM »

I am a relative novice so maybe this answer will be corrected.

To address the point of the Game.ChangeScene function - you first need to appreciate that Scene object is a key structural component in any Wintermute based games, and the change scene command does just what it says.

So you might create a scene called cave entrance and when the actor moves through the entrance he would go into a second scene called "cave"

in which case the syntax would be

Game.ChangeScene("scenes\cave\cave.scene");
The directory "cave" and the file cave.scene are created automatically when you create a scene in the wintermute project manager.

As to why your actor does not go to the door their could be a number of reasons for this, firstly the entity door may not interactive, you also may need to specify the location of the actor in relation to the object.  Without a sight of the enitiy in the scene editor I cannot tell
« Last Edit: November 18, 2010, 03:39:01 PM by eborr »
Logged

mrwitticism

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
    • View Profile
Re: Stuck Already
« Reply #8 on: November 19, 2010, 08:00:47 PM »

Something I probably should've mentioned was that when I left-clicked the door, the actor didn't go to the door for some reason.  But I really wasn't thinking about that; it didn't really bubble to the surface of my consciousness until just recently.  Anyhow, long story short, I got rid of the regional entity for the door (even though the door was ALREADY supposed to be interactive!) and put a new one.  Then I wrote script to JUST go to the door if I left clicked.  Yes!!!  Then I went back in and added   Game.ChangeScene("scenes\menu\scene\menu.scene");
SUCCESS!  Thank you for your help.  I'm sure I'll be around here asking more dumb questions.
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: Stuck Already
« Reply #9 on: November 20, 2010, 12:34:48 PM »

Dear guy :)

Could you please start a new Topic, instead of replying to a five year old post?

Thanks ;)


Logged
 

Page created in 0.063 seconds with 23 queries.