Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Barry Burton on June 04, 2013, 04:06:27 AM

Title: Teleport to a scene if an item is in your inventory?
Post by: Barry Burton on June 04, 2013, 04:06:27 AM
Say if I wanted there be a case in a scene where if an item in my inventory is present, it teleports the 3D actor to a new scene after having left the room?

Something like this:

actor.Active = true;

switch(Game.PrevScene)
{
  case "hallway2":
    actor.SkipTo(322, 294);
    actor.Direction = DI_LEFT;
    else if item in inventory slot;
    actor.SkipTo(blah, blah);
    break;
}

But with proper syntax.
Title: Re: Teleport to a scene if an item is in your inventory?
Post by: Jose on June 04, 2013, 02:13:32 PM
I don't know if I've understood you well but if you want to teleport your actor, you can use the ChangeScene method to do it. You can use the HasItem method to check if the item is either in the general inventory for the game or the particular one for your actor (as you have implemented it in your game) if so, then you invoke the ChangeScene method to teleport your actor to the new scene.