Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Multiple character problem  (Read 3129 times)

0 Members and 1 Guest are viewing this topic.

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 116
    • View Profile
Multiple character problem
« on: February 01, 2010, 11:19:41 AM »

Hi, I'm finding problems in working with multiple main characters.

The idea is make the same as "Day of the Tentacle" or "Maniac Mansion", the player can change the main actor in the game.

Code: [Select]
actor1=Game.LoadActor(actor1);
actor2=Game.LoadActor(actor2);

Game.MainObject=actor1;

If 2 actors are assigned to Game (Game.LoadActor), like in the code I wrote, I have the 2 actors in all rooms. This is bad because If the player goes to another room with actor1, the actor2 would be staying in the previous room.
When the player selects to play with actor2, the game needs to change the current scene to the current room of actor2. It doesn't work.

Any help? Any example? Anyone have worked with more than one actor in WME?

Thanks.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Multiple character problem
« Reply #1 on: February 01, 2010, 03:39:46 PM »

If you don't want an actor to be visible, simply hide it (set its .Active property to false). The engine doesn't keep track of which actor is in which scene (it only sees the current scene). If you need that, you'll have to keep track of it yourself.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.038 seconds with 20 queries.