Before You Get Started:
Description of Each File in easy_sprite.zip:
Be sure to download the easy_sprites.zip file that contains everything you need.
Other Files Needed:
- tutorial.txt: This is the file you're reading right now.
- easy_sprite.cog: This COG displays up to 10 sprites at ghost positions and has the option to animate the sprite.
- fire_ani.mat: This multi-celled fire MAT goes along with the tutorial.
- burn.spr: This is a fire SPRITE. (Uses the fire_ani.mat supplied)
master.tpl (For JK Project) -or- mots.tpl (For MOTS Project)
- The master.tpl and mots.tpl can be found in the jed/jeddata folder
- Copy the filed needed into your project directory
If you want to make your own SPRITE here is what the fire sprite used in this tutorial looks like:
#material type width height geo light tex extralight xoff yoff zoff
fire_ani.mat 0 0.12 0.12 4 0 0 0.0 0.0 0.0 0.0
Now you have all of the files in their correct spots in the project directory you can now begin the addition of sprites into your level.
Steps for Adding Sprites:
- Open up JED and start a new JK/MOTS level.
- Save the .jed file in your project directory.
- Minimize JED and open your project directory.
- Open master.tpl or mots.tpl (depending on which you copied to the folder).
- At the very bottom (always add to the bottom of templates) of the template add the following lines:
# BBOX: 0 0 0 0 0 0
+fire_sprite none orient=(0.000000/0.000000/0.000000) type=cog move=physics
thingflags=0x10000000 sprite=burn.spr mass=0.050000 physflags=0x200
- Save the template and close it.
- Now maximize JED.
- Now goto Commands and click RELOAD TEMPLATES. (Always hit reload templates when you have edited the template manually)
- Now goto THING and insert a GHOST. (Remember the thing # of this ghost)
- Now goto Tools and click PLACED COGS
- Click ADD COG
- In the Resource Picker click cog/
- Select easy_sprite.cog
- Click OK
- Setup the COG
Description of each Option:
SPRITEx (thing): These are where the thing # of your ghosts go. Since you
only have added 1 ghost so far place its thing # in the
sprite0 (thing) box.
SPR (template): This is where you select the SPRITE you will be using.
double click the empty box to open the resource picker.
At the end of the list should be +fire_sprite. Select it
and hit OK.
NOTE: The two options below are for animating the sprite (if the mat used in the
sprite is multi-celled). For this tutorial they will be used.
MATANIM (material): Here you select the MAT you wish to animate. Double-click the box. In the resource picker select mat/. Select the fire_ani.mat.
FPS (flex): This option lets you select how fast the mat gets animated.
- Click REFRESH and then OK.
- Now Save the .jed, setup the level in the Episode Editor, and save the .jkl and .gob.
- Run the level.
If you have any questions or problems email me at email@example.com
Copyright © 1998-2003 Respective Authors &
The Massassi Temple