My purpose is to play video (animation) in the 3D world.
I had insert the video already, but right now I want the video to been play according to certain condition.
My coding is complicated, including many subroutines. At the last part of the coding is "read map" where I am using a matrix to construct the 3D world.
Now, down below my "gosub _createmap" coding, I structure the coding in below. But I ready cannot think where or what command that
I can insert in order to play the video on certain condition.
The most I can think of is using "IF and Then", but still where should I insert though....Seriously. HELP.
rem Create Floor template
template=1024 : make object plane template,352,240
make mesh from object template,template
delete object template
rem Load template images
template=1024 : load animation "9.mpg",2
rem Create map
if mapid=25
width2 = animation width(2)
height2 = animation height(2)
make object plain 4, width2, height2
xrotate object 4,180-45
play animation to image 2,1024,0,0, width2, height2
loop animation 2
make object blockobj,1024,1024
set object collision off blockobj
position object blockobj,x*200,150,(10-z)*200
coly=300 : gosub _setblockcollision6
inc blockobj
endif
rem restore directory
set dir "..\.."
rem Set Block Object
_matrix:
data 01,01,01,01,01,01,01,01,01,01,01,01,01,01,01,01,01,01,01,01,01,01
data 01,01,01,01,01,01,01,00,00,00,25,00,00,00,00,01,01,01,01,01,01,01
data 01,01,01,01,01,01,01,00,00,00,00,00,00,00,00,01,01,01,01,01,01,01