Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: decoration regions dont't work except target coordinates are within region  (Read 5957 times)

0 Members and 1 Guest are viewing this topic.

joaomesq

  • Teacher / Game Designer
  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 44
    • View Profile
    • Nó Górdio

I'm a newbie on wme and I've been test-driving it to use on some projects I'm currently working on.

So far, so good but I stumbled into something that i really doesn't know if it's a bug or not, at least I searched the forum and didn't find any reference to it.

In the tutorial, when we set the decoration region  on the top right of the room, it works fine, but only if the target coordinates are within the region. The decoration region color is blended with Molly if we set the target destination within the decoration region.

Try this: stand next to the window and set the destination next to door. As Molly walks through the decoration region the color set on the decoration region doesn't work.

It is supposed to behave like this? If so how can I set shadows that change the looks of the caracter? another layer?

Thanks

joaomesq
joaomesq's propaganda - http://joaomesq.blogspot.com

UPDATE: The method GoToObject() it's not working correctly. If you set the target of the object in the SceneEdit, it works fine, if you  set it by script (as in step 7) it doesn't work correctly. Maybe has something to do with the new 3d actor object?
« Last Edit: December 09, 2004, 01:47:27 AM by joaomesq »
Logged
Crisis is just another word for opportunity

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: decoration regions dont't work except target coordinates are within region
« Reply #1 on: December 09, 2004, 08:34:10 AM »

Hmmmm ??? That's strange. I'll test it in the evening (CET) and I'll let you know.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

joaomesq

  • Teacher / Game Designer
  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 44
    • View Profile
    • Nó Górdio
Re: decoration regions dont't work except target coordinates are within region
« Reply #2 on: December 09, 2004, 11:32:27 AM »

Regarding the GoToObject() method, I've already managed to figure it out. The documentation isn't right about this. The GoToObject() only works if you pass the parameter "this" and set the "walk to" feature in sceneedit to some coordinates. My guess is:

1 The default value of the "walk to" is 0,0;
2.The "walk to" feature overrides always the value set by script;

Of course it's not a major problem, and I can live with it but I think that script should always take precedence on GUI options.

Thanks
Logged
Crisis is just another word for opportunity

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: decoration regions dont't work except target coordinates are within region
« Reply #3 on: December 09, 2004, 11:45:36 AM »

Quote
2.The "walk to" feature overrides always the value set by script;
Just for clarity: by "setting by script" you mean setting the WalkToX and WalkToY (and WalkToDirection) attributes of the scene entity? Where were you setting them? In the scene_init script of a given scene?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

joaomesq

  • Teacher / Game Designer
  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 44
    • View Profile
    • Nó Górdio
Re: decoration regions dont't work except target coordinates are within region
« Reply #4 on: December 09, 2004, 12:28:15 PM »

no, in step 7 of the tutorial you wrote

This code mimics the actor’s placement we just set in SceneEdit. All we have to do now is to paste this code to the GoToObject function in our “desk.scene” script. The function now looks like this:

function GoToObject()
{
  actor.GoTo(544, 638);
  actor.TurnTo(DI_UPRIGHT);
}


If the sceneedit "walk to" from the desk entity is set to 0,0 <none>, Molly goes to the top of the room and says the line. Hope this helps.
 
Logged
Crisis is just another word for opportunity

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: decoration regions dont't work except target coordinates are within region
« Reply #5 on: December 09, 2004, 12:44:12 PM »

Oh, I see. That's a misuderstanding then. If you define your own GoToObject() function in the same script, you should then call this function. You are probably still calling actor's GoToObject method instead. Those are two different things.

Your code probably looks something like this:

Code: [Select]
on "LeftClick"
{
  actor.GoToObject(this); // this calls the built-in method
}

If you want to use your explicitly defined function, the code would look like:

Code: [Select]
on "LeftClick"
{
  GoToObject(); // this calls the user-defined function
}

The fact they use the same name is just a coincidence.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

joaomesq

  • Teacher / Game Designer
  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 44
    • View Profile
    • Nó Górdio
Re: decoration regions dont't work except target coordinates are within region
« Reply #6 on: December 09, 2004, 01:03:57 PM »

So one is a method of the actor object and the other in a function name? Instead of GoToObject() could be GoToDesk()?
Logged
Crisis is just another word for opportunity

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: decoration regions dont't work except target coordinates are within region
« Reply #7 on: December 09, 2004, 01:14:14 PM »

So one is a method of the actor object and the other in a function name? Instead of GoToObject() could be GoToDesk()?
Yes, exactly.
The reason of this confusion is, that orignally, in some older versions of WME, you had to use that function approach. Later I added the actor.GoToObject method to simplify the scene creation process.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

joaomesq

  • Teacher / Game Designer
  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 44
    • View Profile
    • Nó Górdio
Re: decoration regions dont't work except target coordinates are within region
« Reply #8 on: December 09, 2004, 01:21:57 PM »

Thanks for your patience.

How about the decoration region?
Logged
Crisis is just another word for opportunity

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: decoration regions dont't work except target coordinates are within region
« Reply #9 on: December 09, 2004, 04:49:55 PM »

How about the decoration region?
I just tried it in WME demo and it seems to be working ok. Molly only gets darker when she's standing (or walking) inside the "shade" region, no matter what the target point is.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

joaomesq

  • Teacher / Game Designer
  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 44
    • View Profile
    • Nó Górdio
Re: decoration regions dont't work except target coordinates are within region
« Reply #10 on: December 09, 2004, 09:05:33 PM »

yes, i've already made other tests and that's it. sorry for your trouble and keep up the good work!
Logged
Crisis is just another word for opportunity
 

Page created in 0.036 seconds with 19 queries.