ROBOTS (Path Followers) |
Robots are Basically Path Followers. They follow predetermined path's as defined using the Path Point System (link). Many different objects in the Original Jumpman game used this mechanism (for example in addition to Robots; Dragons, Moving Lifts/Platforms, Moving Ladders, The Barrel from Roll Me Over) They can move along these paths at different speeds and can be told to stop at certain Path Points and start moving again on commands from Scriptlets. Robots can also (if defined) be killed by the Player. Touching a Robot will cause instant death for the Player. When you create a Robot, the following object graphic is drawn in the editor.. It can then be selected and moved around as per any other object. (Shown is the non-selected and selected states of the object)
There is no limit to the number of Robot's which can be created on each level. The Purple Circle (with the '01' below it) is a Path Point.. When you first create a Robot, an initial Path Point will automatically be created.. This can be selected and moved like any other object. Please refer to the Path Point System (link). Editor Tip: When working on objects
which have a lot of Path Points (which may cross over other Path Points
in other objects) then you may find it useful to make all other objects
using path points, inactive and making the one you want to work on Active
(thus it will be drawn brighter than the others).. Right clicking on the
object who has a point you which to modify and selecting 'Draw in Front'
will insure that the current object and all it's Path Points are drawn
over everything else)
When a Vampire Bat is Selected, the Property Editor Window will bring up the following dialog;
It is important to note that changing the name of an object will not change any references to it via the scriptlets. Generally it would be unlikely that you would change the name of an object from the one generated by the program.
Defines the Image set to use for rendering the Robot at run-time. Selecting this item will bring down a list of all the Images available in the Image Manger (link). The Image is made up out of 5 Rows.. The Top Row is used for when the object is stationary.. The Second Row is used when moving Left and the Third Row when Moving Right. Rows Four and Five are used for moving Up and Down respectively. Each direction type is animated out of 4 Frames.
If Ticked, then the Robot (when Moving) will stop at the Next Path Point (in it's Path) which has the 'Way Point' property ticked. The Robot will then await a command via a Scriptlet to start moving again. Please refer to the Path Point System (link) for more information about Way Points.
Defines what to do when the Robot reaches the Last Path Point. Valid Values are;
If Ticked, then the Robot will start moving to the First Path Point immediately at run-time. If Not Active (un-ticked) then the Robot will be stationary until it receives a command via a scriptlet). If the Robot is not Active then it and it's Path Points are drawn in a darker shade.
Defines the Speed (in Frames Per Second) which the Robot will Animate at. Valid values range from 1 to 60.
Defines at what speed to move the Robot between Path Points. Valid Values are;
Defines the Sound to play when the Robot reaches a Path Point (ie. a Junction in the Path it is following). This sound is played irrelevant to whether the Path Point is a Way Point or not. Selecting this item will bring down a list of all the Sounds available in the Sound Manger (link).
If Ticked, then the Robot can be Killed by either the Players Bullet or by the Object the Player Throws (if either have been defined). When a object is shot it will fade out.
Defines the Number of Points to increase the current players score by when the Robot has been Shot. Valid numbers range from 0 to 10000.
Defines at to do when a Robot has been shot. Valid Values are;
Defines the Sound to play when the Robot has been shot and is fading out. Selecting this item will bring down a list of all the Sounds available in the Sound Manger (link).
A Method is a function call which can be executed whilst a Property changes the state of a individual flag in the object.
Script Example..
Makes a Robot or Not.. An Active Robot will move between Path Points. Valid Values are True and False. If the Robot is already moving at run-time then changing this property to True will have no effect. If it is changed to False (while the Robot is moving) then it will Immediately Stop. Script Example..
Several Objects (Robots, Lifts, Moving Ladders etc..) use Path Points to define the path for them to follow. Path points are basically a X/Y point on the map which a object will move to. What the object does when it reaches that point is defined by that object. IMPORTANT: Path Points are not tracked by the Undo System as they are sub-objects from the parent.
When an object is created which uses Path Points, then it will automatically create the first Path Point at the center of the object.. Each path point in an object is numbered starting at 01. As the object moves, it will move from its original starting point to Path Point 01 and then onto 02 etc.. There must always be at least 1 Path Point and the Editor will not allow you to delete a Path Point if it is the only one attached to the parent object. What the object does when it reaches the last Path Point is defined by the parent object. Below is a Robot which includes Path Point 01;
When the Path Point (Purple Circle) is selected, it will be high lighted by Red as per any other object.. It can then be dragged to any other point on the level. Unlike other objects though, Path Points can exist off the level boundary's to allow for the parent object to move smoothly off the screen if needed). A Line is Drawn between each Path Point (or the Parent Object).
Clicking on a path Point (Purple Circle) will bring up the following dialog in the Property Editor Window;
Each Path Point can be defined as being a Way Point.. If the parent Object is required to stop moving when it reaches a certain Path Point then it will ONLY every stop at a Way Point. If Ticked, then a dotted box is drawn around the Path Point for the Size of the Parent Object. (as pictured below).
Each Parent Object can have any number of Path Points to follow. To create a new Path Point Right Click on the Position at which you want to create a new Point. (pictured below);
This will create a new Path Point (drawn in the different colour) at the same location as the currently selected Path Point. Path Points are drawn alternatively in Purple and Yellow.
Selecting the New Path Point again allows it to be moves to any location on the Level Map.
Path Points (belonging to the Parent object) are not accessible via any Scriptlets. |