Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: How to make a non walkable zone in walkable area  (Read 1424 times)

0 Members and 1 Guest are viewing this topic.

HelLRaiseR

  • I don't want to make a Monkey Island clone :(
  • Wiki editor
  • Frequent poster
  • ****
  • Karma: 4
  • Offline Offline
  • Posts: 270
    • View Profile
    • Adventure Box Studios
How to make a non walkable zone in walkable area
« on: June 15, 2009, 05:25:23 PM »

I need to make a non walkable zone in the walkable area, but I can't use a blocked region. I'm going to try explain it.

I've one secondary actor in a scene, this actor is seated in a chair, when the main actor executes a determinated action, the secondary actor will sit up, and will go to out of the scene.

Due that is necessary that the secondary actor walk, this must be positioned in the walkable area, but then the main actor can go to the position of the secondary actor. This is a problem, becouse the main actor is mixed with secondary actor and the chair.

Any idea?

Logged
Regards,

    Fernando

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5675
    • View Profile
    • Dead:Code Site
Re: How to make a non walkable zone in walkable area
« Reply #1 on: June 19, 2009, 07:34:01 AM »

Can you simply use a blocked region and only enable/disable it when needed? I'm afraid I don't fully understand the problem.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

HelLRaiseR

  • I don't want to make a Monkey Island clone :(
  • Wiki editor
  • Frequent poster
  • ****
  • Karma: 4
  • Offline Offline
  • Posts: 270
    • View Profile
    • Adventure Box Studios
Re: How to make a non walkable zone in walkable area
« Reply #2 on: June 20, 2009, 12:29:26 AM »

The problem is that I don't want that the main actor walk in the zone occupied by the secondary actor. But your idea works fine. I have a blocked region, the actor can't walk in this area, when I need that the secondary actor walk, I do the following:

Game.Interactive =false; // the main actor can't do any action.
actor.GoTo (posX, posY); // the main actor is going to the correct position.
blkreg = GetNode("blocked_region);
blkreg.Active = false; // The blocked region disappear, the secondary actor can walk
second_actor.WalkTo (posX,posY); // The secondary actor go outside of the screen
Game.Interactive = true; // Now, the actor can do any action, including walk in the zone that has been occupied for the secondary actor.

Thanks again Mnemonic.
Logged
Regards,

    Fernando
 

Page created in 0.174 seconds with 17 queries.