April 26, 2024, 08:58:27 AM
Welcome,
Guest
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
For WME related articles and tutorials visit
WME Resource Center
.
Home
Help
Search
Calendar
Login
Register
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Two playing actors
« previous
next »
Pages: [
1
]
Print
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
Posts: 34
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
Gender:
Posts: 1456
Lamp dog!
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
Gender:
Posts: 1511
Vampires!
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
Print
Pages: [
1
]
« previous
next »
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Two playing actors