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: Scene Change  (Read 5093 times)

0 Members and 1 Guest are viewing this topic.

ChrisWiki

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 20
    • View Profile
Scene Change
« on: January 22, 2006, 06:30:35 PM »

Hi Everybody,

I'm verty interressted by the survival horror games like the Resident Evil Games... I wish to know if it would be possible to change camera view of a scene without "a right click" in the concerned region into the Wme 3D Demo. I wish that a 3D actor can change the camera view of a scene when this actor walk in the concerned region, like a resident Evil game. If it's possible, can you explain to me how to insert this script into the wme 3D Demo ?

After, i wish to know how to insert a new 3D scene, when a 3D actor reachs the end of a initial scene. Can you explain to me how to insert this script into the wme 3D Demo ?. I know that i must do a geometry file of my scene. (I'm using Blender with a 3DS exporter plugin). But I don't know the scripting syntax to use in the Wme 3D Demo so that when a 3D actor reachs the end of a intial scene a new scene appear with a new background bitmap.

Sorry for these questions, but I'm not very good in scripting !!! :-[

Regards :)

Regards  :)

« Last Edit: January 24, 2006, 04:37:26 PM by Jerrot »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Scene Change
« Reply #1 on: January 22, 2006, 08:27:27 PM »

It can be done quite easily. You need to define a region within the scene. The region will cover the part of the scene which should trigger scene transition whenever the actor enters it.
1) In SceneEdit, click "Add region" and modify the region shape.
2) Click the "Scripts..." button, and a new script will be created for your region. Edit the script and enter the following code:
Code: [Select]
on "ActorEntry"
{
  Game.ChangeScene("path\filename.scene");
}

Now, whenever your actor enters the region, a new scene will be loaded.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

ChrisWiki

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 20
    • View Profile
Re: Scene Change
« Reply #2 on: February 05, 2006, 05:47:49 PM »

Hi

Thank you very much for these precisions, Mnemonic !  :). Just another one question to you or everybody.. Is there a mean to change the actor direction when the actor enters to a new region in order that the actor walks in the direction of the new background picture scene ?

Regards !

Chris :)
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: Scene Change
« Reply #3 on: February 05, 2006, 06:41:55 PM »

If I got you right, you want to have actors direction and position according to the previous scene?
It's quite easy, just insert this to your scene_init.script:

if (Game.PrevScene=="MyTestScene")
{
  actor.SkipTo(x,y); // some coordinates there
  actor.Direction = DI_DOWN; // seek other constants in documentation
}

In more than two exits I recommend using switch() for this condition though.

Hope that helps.

Edit: thanks Mnemonic. I had some weak moment writing it. :(
« Last Edit: February 06, 2006, 08:17:17 PM by metamorphium »
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Scene Change
« Reply #4 on: February 06, 2006, 05:02:52 PM »

It should be Game.PrevScene
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

varnama

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 44
    • View Profile
Re: Scene Change
« Reply #5 on: February 07, 2006, 09:34:12 AM »

Sorry for that, I have one question about "ActorEntry" and I take advantage of that ;D, Are there any way to know, if some character is stay on, in a region (and what character is stay), without loop or delimit control with actor.X, etc..
Something for example like that, Region.CharactersStayOn -> Return Actor1 and Actor 2
That's all Thanks again!!  ;)
« Last Edit: February 07, 2006, 09:36:46 AM by varnama »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Scene Change
« Reply #6 on: February 07, 2006, 09:50:17 AM »

No, you will need to test each actor against the region, like:

Code: [Select]
on "ActorEntry"
{
  if(Scene.GetRegionAt(some_actor.X, some_actor.Y) == this)
  {
    ...
  }
}
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

varnama

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 44
    • View Profile
Re: Scene Change
« Reply #7 on: February 07, 2006, 10:13:34 AM »

ok, that's work.. Return [ad region], But i have an other region in the floor to do walk sound, and ever show me [ad region], it's posible to show region name??
Thanks againnn!  :D
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Scene Change
« Reply #8 on: February 07, 2006, 10:26:01 AM »

I'm not sure what you mean. If you want to ignore the "material" region used for footsteps only, mark it as a "decoration" region in SceneEdit. The Scene.GetRegionAt() method has an optional third parameter to ignore decorations.

To display the name, use Region.Name.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

varnama

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 44
    • View Profile
Re: Scene Change
« Reply #9 on: February 07, 2006, 10:35:39 AM »

I mark footsteps as a "decoration" region in SceneEdit and all work great, Thankss Mnemonic !!
Logged

ChrisWiki

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 20
    • View Profile
Re: Scene Change
« Reply #10 on: February 28, 2006, 05:37:13 PM »

Thank tou very much for your replies, Mnemonic, Metamorphium, Varnama ! :)
Logged
 

Page created in 0.046 seconds with 24 queries.