TGC Codebase Backup



a function that compines the text commands by The man of the west

18th Jun 2004 19:16
Summary

A simpeler way to use the text command



Description



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    remstart
------------------------------------------------------------------------------
    The explanation program (not the function)
------------------------------------------------------------------------------
remend

load sound "pop.wav",1
load sound "gong.wav",2
load music "dance of darkness.mid",1
loop music 1
play sound 1
inserttext(10,150,20,"This is how to use my "inserttext" function.")
inserttext(30,210,350,"INSERTTEXT")
wait 2500
cls
play sound 1
inserttext(30,280,20,"INSERTTEXT")
inserttext(10,0,10,"The first perameter is the size of the text.")
wait 2000
play sound 1
inserttext(10,0,30,"The second parameter is the x coordinates.")
wait 2000
play sound 1
inserttext(10,0,50,"The third parameter is the y coordinates")
wait 2000
play sound 1
inserttext(10,0,70,",and the most important part is the fouth parameter the string.")
wait 2500
play sound 1
inserttext(10,0,90,"and incase anyone was wondering you can use this in your programs...")
play sound 1
inserttext(10,0,105,"and I will be working on making this function even better :)")
wait 4500
stop music 1
play sound 2
cls
end

remstart
------------------------------------------------------------------------------
      The Actual inserttext Function
------------------------------------------------------------------------------
remend

function inserttext(size,x,y,string$)
  set text size size
  text x,y,string$
endfunction