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: Teleport to a scene if an item is in your inventory?  (Read 3298 times)

0 Members and 1 Guest are viewing this topic.

Barry Burton

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 13
    • View Profile
Teleport to a scene if an item is in your inventory?
« 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.
« Last Edit: June 04, 2013, 04:13:34 AM by Barry Burton »
Logged

Jose

  • Regular poster
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 134
    • View Profile
Re: Teleport to a scene if an item is in your inventory?
« Reply #1 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.
« Last Edit: June 04, 2013, 02:16:26 PM by Jose »
Logged
 

Page created in 0.026 seconds with 18 queries.