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: how to remove Actor?  (Read 5312 times)

0 Members and 1 Guest are viewing this topic.

A.Y.

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 27
    • View Profile
    • http://www.free-lance.ru/users/Yar/info/
how to remove Actor?
« on: November 06, 2007, 01:10:59 PM »

Hello.
Long did not appear in this forum,
during this time my son was born, and it already has grown a little.
I came time to start its project.
 
I would like to ask how to remove Actor from the Scene?
And, Entity can move independently like Actor?

atm_deev

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 69
  • A. Deev
    • View Profile
    • CreativeDream Studio
Re: how to remove Actor?
« Reply #1 on: November 06, 2007, 01:15:42 PM »

nameactor.Active=FALSE;
Logged

A.Y.

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 27
    • View Profile
    • http://www.free-lance.ru/users/Yar/info/
Re: how to remove Actor?
« Reply #2 on: November 06, 2007, 01:18:20 PM »

Thanks.
but what about the second question?

A.Y.

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 27
    • View Profile
    • http://www.free-lance.ru/users/Yar/info/
Re: how to remove Actor?
« Reply #3 on: November 06, 2007, 10:10:04 PM »

I am writing:

on "sute_01"
{
  Game.Interactive = false;
  actor.Talk("Bla.");
  Game.DropItem("sute_01");

////////////delete beggar_01
 var Beggar_01 = Scene.LoadActor("actors\beggar_01\beggar_01.actor"); 
 if (Beggar_01.Active==true)
 {
    Beggar_01.Active = false;
 }

 //////////load beggar_01_sute
 var Beggar_01_sute = Scene.LoadActor("actors\beggar_01_sute\beggar_01_sute.actor");
 Beggar_01_sute.SkipTo(400, 550);
 ///////////
  Game.Interactive = true;
}

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: how to remove Actor?
« Reply #4 on: November 06, 2007, 11:01:25 PM »

well, your code is strange indeed. You operate with 3 actors in here...


on "sute_01"
{

This is probably your main actor which does the talking and stuff
  Game.Interactive = false;
  actor.Talk("Bla.");
  Game.DropItem("sute_01");


Here you load brand new actor and immediately hide it so it will never be shown.
////////////delete beggar_01
 var Beggar_01 = Scene.LoadActor("actors\beggar_01\beggar_01.actor");
 if (Beggar_01.Active==true)
 {
    Beggar_01.Active = false;
 }

Now you load the third actor and show it.
 //////////load beggar_01_sute
 var Beggar_01_sute = Scene.LoadActor("actors\beggar_01_sute\beggar_01_sute.actor");
 Beggar_01_sute.SkipTo(400, 550);
 ///////////
  Game.Interactive = true;
}


Also you place the new actor to the local variable so after this event ends you no longer own any "handle" to it. Is this intentional?
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

A.Y.

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 27
    • View Profile
    • http://www.free-lance.ru/users/Yar/info/
Re: how to remove Actor?
« Reply #5 on: November 08, 2007, 10:05:22 AM »

thank you very much for the help.
But I am an artist and not the programmer, and the way to take programming - copy / past.
I found how to remove actor from the scene.

////////////delete beggar_01
this.Active = false;

Unfortunately you are right about a local variable, for the last actor,
and if I leave this scene, then return actor disappears from the scene.
as it back, I still do not know.

Now you load the third actor and show it.
 //////////load beggar_01_sute
 var Beggar_01_sute = Scene.LoadActor("actors\beggar_01_sute\beggar_01_sute.actor");
 Beggar_01_sute.SkipTo(400, 550);
 ///////////
  Game.Interactive = true;
}


Also you place the new actor to the local variable so after this event ends you no longer own any "handle" to it. Is this intentional?

Please, explain to me, how I can change the Actor correctly.

« Last Edit: November 08, 2007, 10:17:11 PM by A.Y. »
Logged
 

Page created in 0.038 seconds with 20 queries.