Hi all
small snippet on using the SET OBJECT TRANSPARENCY command and put and object on the screen and making it clear.
if you change object 1 to some other type eg cube you will yhen see what happens.
cheers
Rem Project: clear objects
Rem Created: 6/6/2005 5:27:55 PM
Rem ***** Main Source File *****
rem Standard Setup Code
sync on : sync rate 0 :
backdrop on
color backdrop rgb(0,255,0) : hide mouse
set text font "arial" : set text size 40 : set text transparent
text 50,50,"Hello I am here"
rem get above image
get image 1,0,0,600,400
set text size 14
rem load image of bullet hole
load image "bullethole.bmp",2
rem change backdrop colour to red.
color backdrop rgb(220,0,0)
rem make colour black transparency
SET IMAGE COLORKEY 0,0,0
rem as it says
autocam off
position camera 0,0,0,-200
rem make object 2 and 3
make object plain 1,100,100
rem puts image one above onto object
texture object 1,1
rem put sphere at the back
make object sphere 2,50
position object 2,0,0,150
rem make bullet hole plain
make object plain 3,15,15
rem put bullet hole onto object
texture object 3,2
rem make both object clear
SET OBJECT TRANSPARENCY 1,1
SET OBJECT TRANSPARENCY 3,1
do
center text screen width()/2,50,"Press spacebar to fire gun at glass"
if spacekey()=1
center text screen width()/2,60,"see me not "
SET OBJECT TRANSPARENCY 1,1
SET OBJECT TRANSPARENCY 3,1
rem hello object
position object 1,0,0,0
rem random bullets holes
position object 3,rnd(70),rnd(70),0
else
center text screen width()/2,60,"see me"
rem change to 0 to 1 to make plain clear
SET OBJECT TRANSPARENCY 1,0
position object 1,0,0,0
rem move the camera around
control camera using arrowkeys 0,1,1
endif
rem update screen
sync
loop
I'm not getting you down am I, Ho Look! another fancy Door?