TGC Codebase Backup



Teleporter Object, Graphics, and Function by Trek

30th Jun 2006 22:02
Summary

Code, object, and graphics for your own teleporter effect.



Description

This is a very short piece of code that produces a nice graphical effect on an included teleporter object using some simple gradient graphics. It was made for my friend's entry to the Caiman TotalPack contest which has over 3,250 dollars of cash prizes!! To check it out go to http://www.caimen.be/forum/topic.asp?TOPIC_ID=1405

To see more productions by Trek Software go to http://roborangers.home.comcast.net/Trek.html



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    hide mouse
sync on
sync rate 30
autocam off

position camera 0,0,0
point camera 0,0,5

load image "MainTexture.bmp",1
load image "SubTexture.bmp",2

load object "Teleporter.x",1
position object 1,0,0,5
ghost object on 1
texture object 1,1
fade object 1,500

load object "Teleporter.x",2
position object 2,0,0,5
ghost object on 2
texture object 2,2
fade object 2,100
scale object 2,101,101,101

color backdrop rgb(100,100,100)

do
   if rightkey()=1 then yrotate object 1,object angle y(1)+2 : yrotate object 2,object angle y(2)+2
   if leftkey()=1 then yrotate object 1,object angle y(1)-2 : yrotate object 2,object angle y(2)-2
   if upkey()=1 then xrotate object 1,object angle x(1)+2 : xrotate object 2,object angle x(2)+2
   if downkey()=1 then xrotate object 1,object angle x(1)-2 : xrotate object 2,object angle x(2)-2
   TeleporterAnimation(1,2)
   sync
loop

function TeleporterAnimation(TNumber,TNumber2)

   RndFade=rnd(250)+250
   fade object TNumber,RndFade
   scroll object texture TNumber2,.01,0

endfunction