Translations of this page:

This is an old revision of the document!
—-

Having multi entrance and exits to and from your zones

Summery

The default scene files that come with WME have set start positions for the actor as soon as the room loads. For most cases this is fine. Though in some cases you will find that you need to have different start locations in the same room.

The prime example of this is if you have a large main room, with a number of exits all leading to different rooms. If you enter the main room from one of these doorways you want to have the actor appear near the doorway.

Lets have a quick look at the default scenes_int.script file that come with WME

#include "scripts\base.inc" 
 
// here comes the stuff which initializes the scene 
 
actor.SkipTo(400, 400); 
actor.Direction = DI_DOWN; 
actor.Active = true; 
 
 
//////////////////////////////////////////////////////////////////////////////// 
// scene state 
global StateRoom; 
 
 
// default values 
if(StateRoom==null) 
{ 
  StateRoom.Visited = false; 
  // add scene states here 
} 
 
 
 
//////////////////////////////////////////////////////////////////////////////// 
// setup scene according to state variables 
 
 
 
//////////////////////////////////////////////////////////////////////////////// 
if(!StateRoom.Visited) 
{ 
  StateRoom.Visited = true; 
 
  // this is our first visit in this scene... 
}

Ok the bit we are interested in is

actor.SkipTo(400, 400); 
actor.Direction = DI_DOWN;

What this means is as the scene is loaded it will take the actor and "SkipTo" (place) it at the cords 400, 400 and also point the actor in the DI_DOWN (Direction Down). So. by simply editing these values you can change the start position of you actor whenever the scene loads.

OK... The Good Stuff

Here is a layout of our scene

————UNDER CONSTRUCTION—————–
——————-NEED TO STEP OUT FOR A FEW MINS.. BRB TO FINISH THIS———————————-
————UNDER CONSTRUCTION—————–

 
kbase/meaecode.1204026457.txt.gz · Last modified: 2008/02/26 12:47 by Jyujinkai
Recent changes RSS feed Creative Commons License Driven by DokuWiki