If you hit the alien,
play object OBJECT NUMBER , StartFrame, EndFrame
startFrame would be 200
endFrame would be 250
once it is done playing:
if object playing(OBJECT NUMBER
)=0
then delete object OBJECT NUMBER
example:
`sync stuff
sync on
sync rate 0
`turn off autocam
autocam off
`make the player cube
make object cube 1,50
`make the matrix, texture it, randomize it, and update it
make matrix 1,10000,10000,50,50
load image "grass1.bmp",1
prepare matrix texture 1,1,1,1
randomize matrix 1,200
update matrix 1
`load the aliens
for f= 10 to 30
load object "alien.x",f
x=rnd(10000)
z=rnd(10000)
y=get ground height(1,x,z)
position object f,x,y,z
scale object f,50,50,50
loop object f,0,100
next f
do
`player movement
if upkey() = 1 then move object 1,5
if downkey() = 1 then move object 1,-5
if rightkey() = 1 then yrotate object 1,object angle y(1)+2
if leftkey() = 1 then yrotate object 1,object angle y(1)-2
`simple camera to follow
set camera to follow object position x(1),object position y(1),object position z(1),object angle y(1),200,200,10,1
`position the cube on top of the matrix
position object 1,object position x(1),get ground height(1,object position x(1),object position z(1))+25,object position z(1)
`collision
for f= 10 to 30
`get the positions of the alien
x#=object position x(f)
z#=object position z(f)
`if the object is colliding, start the die animation
if object position x(1)>x#-20 and object position x(1)<x#+20
if object position z(1)>z#-20 and object position z(1)<z#+20
play object f,200,250
endif
endif
`if the die animation is done, respawn the alien
if object playing(f)=0
delete object f
load object "alien.x",f
x=rnd(10000)
z=rnd(10000)
y=get ground height(1,x,z)
position object f,x,y,z
scale object f,50,50,50
loop object f,0,100
endif
next f
`refresh screen
sync
loop
just put the alien guy and a grass image in the directory of this code and it will kill an alien and animate him when you hit him, then respawn another alien
Be happy, tomorrow is another day