Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Talk help  (Read 4161 times)

0 Members and 1 Guest are viewing this topic.

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Talk help
« on: October 29, 2008, 03:37:19 PM »

I got this message from someone who needs help---it's not the exact words but enough to give you the idea:

"I started with WME 3 days ago and I do now dialogues between actor, and second character (snow)
The problem is: I have this script for entity snow:
#include "scriptsbase.inc"

global Statesomething;

////////////////////////////////////////////////////////////////////////////////
on "Talk"
{
GoToObject();
Game.Interactive = false;

// greetings
actor.Talk("Hi there.");
this.Talk("Welcome to my country.");


and its not functioning. How may look the good script?"

I'm not anywhere near my computer right now---can someone help them?   
« Last Edit: October 29, 2008, 03:39:10 PM by Catacomber »
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Talk help
« Reply #1 on: October 29, 2008, 03:41:34 PM »

there are too many errors in the snippet. I suggest starting from the very beginning as nothing in this script can work. :)

Advise him to start with a book, which could lead them through the basics of scripting.



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

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: Talk help
« Reply #2 on: October 29, 2008, 03:50:48 PM »

Do you mean something other than the WME book? 

http://res.dead-code.org/doku.php/wmebook:start
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Talk help
« Reply #3 on: October 29, 2008, 03:51:04 PM »

Not that many, are there? At the very least there's one closing } missing, and the GoTo line should be actor.GoToObject(this);
Then it should work, as long as the script is really attached to an entity.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Catacomber

  • Supporter
  • Frequent poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 443
  • I love mice.
    • View Profile
    • Catacomber.com
Re: Talk help
« Reply #4 on: October 29, 2008, 03:52:22 PM »

He's Czech---I put the link to the WME book that's English---is there a link to the Czech one?

Is nice Czech guy.  :  ) ) ) Or girl, not sure.  : )
« Last Edit: October 29, 2008, 03:54:10 PM by Catacomber »
Logged
http://www.catacomber.com/
Code: WME Script
  1. Mnemonic is wonderful.
  2.  

kypho

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 33
    • View Profile
Re: Talk help
« Reply #5 on: October 29, 2008, 08:09:07 PM »

Here is a example of my Talk on one of my entities named "cultist". I hope this helps...

Code: [Select]
on "Talk"
{

   GoToObject();
   Game.Interactive = false;

  // greetings
  if(!StateRoom.TalkedToCultist) actor.Talk("Howdidlidou!");
  else actor.Talk("Wzup Ketchup, it's me again.");
  this.Talk("Hello, Fat Wizard.");

  // set the flag, so that we know we've already talked to him
  StateRoom.TalkedToCultist = true;

  if(!StateHell.Curry)
  {
  CultistDialogue();
  }
  else CultistDialogue3();
 
  // and let the dialogue begin
 

  // restore interactivity
  Game.Interactive = true;
}

some parts you can cut away, like the dialogues and so on, if you just want some really basic stuff said.

- Kypho the beginner
Logged

kypho

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 33
    • View Profile
Re: Talk help
« Reply #6 on: October 29, 2008, 08:10:46 PM »

also it should be like this: #include "scripts\base.inc"

hope this gets you started

Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Talk help
« Reply #7 on: October 29, 2008, 09:46:43 PM »

Not that many, are there? At the very least there's one closing } missing, and the GoTo line should be actor.GoToObject(this);
Then it should work, as long as the script is really attached to an entity.

this and also the include line is wrong + the code doesn't return to Interactive state so the game hangs. :)
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet
 

Page created in 0.05 seconds with 21 queries.