home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
No Fragments Archive 12: Textmags & Docs
/
nf_archive_12.iso
/
MAGS
/
TEXTMAGS
/
3RD_DIM
/
3RDDM18.MSA
/
BRUSHES
/
ANIM_BRU.TXT
next >
Wrap
Text File
|
2004-06-27
|
6KB
|
147 lines
THE THIRD DIMENSION
BRUSHES AND BRUSHANIMS
I have had a lot of requests for more information on the use of
brushanims and most members mentioned on their questionnaire that
they would like to know a little more on this subject.
The first question must be- "what is a brush or brushanim?"
A brush is a piece from a picture that has been cut out and used
as a smaller picture.A brushanim is a set of 2 or more little
brushes (pictures) used to make a small animation.
The brush/brushanim feature only works in kit 2 and involves the
user in selecting parts of a picture to cut/crop out and then use
as a brush, or to use several to create a brushanim.So what use is
this to me?, you may ask.Well brushes could be used on your
border to tell the gameplayer that he/she has now picked up a
gun.For example -if a person was to pick up a gun,you could make
a brush appear in a small window with the name "weapon" above it
in your border and the brush would have a small picture of a gun
drawn onto it.Later on in the game the player could find a larger
weapon such as a laser gun,you could then replace the previous
brush picture with a new brush showing a laser gun drawn onto it.
To make things even more interesting,you could use a brushanim
instead of just a brush.Imagine a picture of a laser gun
appearing onto your border that showed a weapon changing colour
and shape.This is posiible by creating a brushanim which is
simply a selection of small pictures played in a sequence one
after the other.Remember drawing little stick men on the edge of
several pages of a book and then flicking the pages to give the
illusion of the stick man moving? No? well neither do i but it is
a similar principle of how brushanims work.
How to create a brushanim.
1- Draw some small pictures in your art package and then save as
NEO,PI1 or as a IFF/LBM picture etc or use the ANIM_BRU.IFF example
provided on this disk.
2- Load 3DEDIT then goto GENERAL menu and press on BRUSHES then
CUT brushes.
3- Load your picture file (or BRUSHES.NEO) then a dotted box will
appear.Size the box over the first little picture ( using the
bottom right corner of the dotted box ) with the left mouse
button.Position the dotted box using the left mouse button held
down with the mouse pointer in the centre of the box.NOTE THE
SIZE OF THE BRUSH! When your happy with the size and position of
the box then press your right mouse button.You will then have
your first brush.Repeat the above for more brushes.Try the six
lower brushes in the ANIM_BRU.IFF example on this disk to create
a pulsating laser cannon as used in my example.
4- When you have cut enough brushes go to the GENERAL menu then
select BRUSHANIMATIONS then CREATE.Next goto GENERAL menu again
then select BRUSHANIMATIONS then EDIT then select BRUSHANIM1 or
whatever the name is.Another menu will come up then press on the
EDIT button then the ADD button then select brush1 from the
list,then press on the ADD button then select brush2 and so
on,then press the OK button.
5- Press on the PREVIEW button to have a look at the
brushanimation that you have just created.If it is running too
fast then add a higher number next to SPEED to slow it down eg-1O
or use a low number ( 1 ) to speed it up.When you are happy with it
press the OK button and that is all there is to it!You now need
to write a few lines of simple code to get the brushanim working.
To use a brushanim try this as an example to see how it works -
Make a cube in an area then give it this condition-
IF SHOT?
STARTBRUSHANIM (1,1O,15,4)
ENDIF
Then shoot the cube in Test ( key F1 on your computer ) mode.
This assumes that you are still using the same datafile as you
used to create your brushanim in.
The example provided for you on this disk uses the following
files-
ANIM_BRU.IFF This is the brushes picture file.
ANIM_BRU.TXT This is what you are reading now
ANIOBJ.TXT This is the condition for the cube
condition.Simply create a cube in an area then
load in this object condition.
ANI_INIT.TXT This is the Initial condition for the example.
Simply create an Initial condition,Edit it and
then load in this condition.
ANBORDER.IFF This is the border for the example.
ANIM_BRU.3WD This is the finished fully working example for
Atari/Amiga users.PC users can simply load the
kit 2 up,create a cube in the centre of the area,
load the object condition for the cube,create
then edit an initial condition and then load
the initial condition text provided.Then follow the
brushanim tutorial above to load in the six
brushes.
The example works by shooting at the cube but ideally you would
create a gun that would carry out the following condition once it
was taken (activated) -
IF ACTIVATED?
THEN
ENABLEBRUSHANIM (1)
STARTBRUSHANIM (1,24,150,4)
SOUND(5)
INVIS(2)
ENDIF
This assumes that the object chosen was object number 2 and that
the brushanim ( number 1 ) was previosly disabled using an Initial
start up condition.E.g Initial Condition 1 would read-
IF BRUSHANIMACTIVE? (1)
THEN
DISABLEBRUSHANIM (1)
ENDIF
The numbers in the STARTBRUSHANIM command brackets in this
example mean the following-
Example STARTBRUSHANIM (1,10,15,4)
1 is the brushanim number
1O is the x coordinate ( position on screen )
15 is the y coordinate ( position on screen )
4 tells it to bounce,5 would give a random effect,3 would repeat
it,1 would stop it and 2 will do it a single time.
Try using the following-
STARTBRUSHANIM starts a brushanim
STOPBRUSHANIM stops a brushanim
SETBRUSHANIM used to alter brushanim parameters
GETBRUSHANIM used to get brushanim parameters
DISABLEBRUSHANIM used to disable a brushanim
ENABLEBRUSHANIM enables a brushanim
BRUSHANIMACTIVE? used to check if a brushanim is active
Look at the Addendum that came with kit 2 for more examples.
................TONY