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: Entity act on another scene  (Read 2100 times)

0 Members and 1 Guest are viewing this topic.

The Man

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 67
    • View Profile
Entity act on another scene
« on: March 18, 2006, 10:52:32 AM »

Hi,everybody.I really need a help,so I'll try to explain my problem.
I've got two scene.In one scene there's an entity called "talpa",in the other there's an entity called "buco",set as if it is not active.When I talk to "talpa" I want the object "buco" on the other scene to become active.How can I do this?Sorry for my english!
Logged

gajdy

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 5
  • data
    • View Profile
Re: Entity act on another scene
« Reply #1 on: March 18, 2006, 11:29:18 AM »

Hi,everybody.I really need a help,so I'll try to explain my problem.
I've got two scene.In one scene there's an entity called "talpa",in the other there's an entity called "buco",set as if it is not active.When I talk to "talpa" I want the object "buco" on the other scene to become active.How can I do this?Sorry for my english!

Hi,

you have got two entities, talpa, and buco. Buco is not active, and if you talk to talpa, you want to become active buco. Ok, open the talpa script and make like this:

the talpa script
Code: [Select]
#include "scripts\base.inc"

global buco2;

// enter some code here
buco = true;

and the buco script
Code: [Select]
#include "scripts\base.inc"

global buco2; // you will need create this global variable into this script and into talpa script of entity file
var Entbuco = Scene.GetNode("buco"); // this name must be the same as you entered in SceneEdit script

if(buco2 == true)
{
¦nbsp; ¦nbsp; ¦nbsp;buco.Active = true;
}

I`m sorry for my English, but I`m from Slovakia:). I hope that will help you.
Logged
gajdyi

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Entity act on another scene
« Reply #2 on: March 18, 2006, 01:12:21 PM »

to correct gajdy's response:

in the talpa script the line should read

buco2 = true;

also this talpa script won't look like that, you just add global variable and the buco2 line
to the place where you want to activate the other entity.

and the buco piece of script should be in the scene_init.script of the second scene.

Also you can short if(buco2 == true) to if (buco2)

hope that helps :)

Edit: just noted another bug in gajdy's script:
the bottom script should be:

if(buco2)
{
  Entbuco.Active = true;
}

To Gajdy: please try your code snippets first, otherwise you can really confuse newcomers with
incorrect code.
« Last Edit: March 18, 2006, 01:30:24 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

gajdy

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 5
  • data
    • View Profile
Re: Entity act on another scene
« Reply #3 on: March 18, 2006, 01:31:31 PM »

Quote
To Gajdy: please try your code snippets first, otherwise you can really confuse newcomers with
incorrect code.

Im sorry, this was just an idea. Im sorry again :).
Logged
gajdyi

The Man

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 67
    • View Profile
Re: Entity act on another scene
« Reply #4 on: March 18, 2006, 02:14:10 PM »

Thanks to both of you..I finally did it!
Logged
 

Page created in 0.298 seconds with 24 queries.