Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: actor walks in strange path  (Read 2588 times)

0 Members and 1 Guest are viewing this topic.

binary1

  • Supporter
  • Occasional poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 51
    • View Profile
actor walks in strange path
« on: March 15, 2012, 11:35:36 PM »

What scripts determine the path the actor takes?  I have a series of scenes of scenes.  I have most working ok but there is one where the actor is invisible coming from one side but ok (except for a strange path) coming from the other side.  I am running in 2.5D mode.
If I start from the beginning, the actor is standing in the middle of the room.  I click to go into room 2.  The actor doesn't show up but I can click on the entrance of room three to get him there.  He is at the bottom of the screen facing up.  From room three, I click to go back to room 2.  The entrance to room 2 is on the bottom right of the screen but he goes up and turn around before going down again.  From there, the actor enters room 2 where he is visible but he comes from the far left, turns facing down, walks down and then turns to face up.  If I then click to go back to room 1, I hear footsteps but there is no actor until he magically appears in the middle.
The script for entering room 2 from room 1 just has (in on "LeftClick")
                                 actor.GoToObject(this);
                                 Game.ChangeScene("scenes\hall\hall.scene");

The scene initialization script for room 2 has:
                                   actor.GoTo(650, 650);
                                   actor.Direction = DI_UP;
                                   actor.Active = true;

The other "LeftClick" and scene initialization scripts are similar.  I think the actor is getting stuck outside somewhere when he enters room 2 from room 1.  But how can I change the path he takes?  Are the scripts adding together somehow to give these strange paths? 

Thanks.  I appreciate any suggestions anyone can make.  I've searched scripts and the forum but I must be missing something.

                                         
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: actor walks in strange path
« Reply #1 on: March 16, 2012, 12:50:06 PM »

Actors' navigation is driven completely by the engine. You define the blocked areas and waypoints, and the engine plots the shortest path using the waypoint.
For 3D actors you can choose whether the navigation info is part of the 3D geometry, or (preferably) if it's defined the "2D way" (in SceneEdit).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.093 seconds with 23 queries.