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: Two playing actors  (Read 2805 times)

0 Members and 1 Guest are viewing this topic.

Javi-Wan Kenobi

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 34
    • View Profile
Two playing actors
« on: October 04, 2007, 10:29:23 PM »

I think I've read about this, but I can't find it.
It's possible to have two playing actors, each with his own inventory, and change between them, just like in "Day of the Tentacle" or "Fred & Jeff: A movie adventure".
You can send me to the appropiate post if this is already answered.
Logged

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Two playing actors
« Reply #1 on: October 04, 2007, 11:03:45 PM »

It's possible to have as many characters as you want (not just two) with just one rule. You can control only one character at a time like it's done in the games your mentioned. Those characters will have their own inventory too.

You can load every character in a variable like
global Actor1 = Game.LoadActor("actor_dir/Actor1");
global Actor2 = Game.LoadActor("actor_dirActor2");
etc

and use the character you like at any time (you can also store the active character at the "actor" variable so you don't have to use mixed/complex script).
Logged
fl*p

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Two playing actors
« Reply #2 on: October 05, 2007, 12:03:25 AM »

For inventory work you have to set up first InventoryObject
I'll build on what odnorf said. If you want to centralize it and have global variables with your
playable characters (Bernard, Hoagie, Laverne) you'd set inventory to Hoagie like this:

actor = Hoagie;
Game.InventoryObject = actor; // this would switch the inventory to current actor.

And all your item taking will be done through

actor.TakeItem instead of Game.TakeItem

hope that helps...
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet
 

Page created in 0.116 seconds with 24 queries.