Quote: "code. I think this is what you are looking for"
Yes and no, that I can fill in a number and see it at the screen is good but I am using 3d objects and that gives problems, I had created a background by creating a box and texturing it, the texture is completely screwed up it are now numbers and signs like &é"'(§è and letters. and object 1 should move and that doesn't happen anymore.
But I think I wil be able to solve it now and also found this on the forums
http://forum.thegamecreators.com/?m=forum_view&t=180888&b=1, which helps too.
EDIT:The movement of the object is back ok only background still messy
EDIT:Found the problem forgot to check image number they were the same changed the number everything ok now.
The code I am having now
SYNC ON : SYNC RATE 60
AUTOCAM OFF
POSITION CAMERA 0,0,-300 : Point camera 0,0,0
load object "raf22031.x",1
scale object 1,70,70,70
rotate object 1,0,-90,0
fix object pivot 1
position object 1,400,-100,0
load object "3dm-Cavalry.3ds",2
position object 2,0,-175,100
scale object 2,200,200,200
load image "bus.png",50
make object box 3,screen width(),screen height(),0
position object 3,0,0,195
texture object 3,50
start=0
ambulance as float=25.0
persoon as float=0.0
sirene as float=300.0
geluid as float=340.0
TotalLen = 0 : UserInput$ = "" : keypress = 0
// make 'box' image the size of two digits
tw = text width("44") + 4 : // calculate how wide the box will need to be
th = text height("44") + 4 : // calculate how tall the box will need to be
ink rgb(255,255,0),0 : // yellow
line 0,0,tw,0 : line tw,0,tw,th : line 0,0,0,th : line 0,th,tw,th
get image 1,0,0,tw + 1,th + 1
cls
ink rgb(0,255,0),0
tw2 = text width("444") + 4 : // calculate how wide the box will need to be
th2 = text height("444") + 4 : // calculate how tall the box will need to be
ink rgb(255,255,0),0 : // yellow
line 0,0,tw2,0 : line tw2,0,tw2,th2 : line 0,0,0,th2 : line 0,th2,tw2,th2
get image 2,0,0,tw2 + 1,th2 + 1
cls
ink rgb(0,255,0),0
do
center text screen width()/2,10,"bewegende bron"
text 10,10,"snelheid ambulance: " +STR$((ambulance)*3.6) +"km/u = " +STR$(ambulance) +"m/s"
text 10,25,"snelheid persoon: " +STR$((persoon)*3.6) +"km/u = " +STR$(persoon) +"m/s"
text 10,40,"frequentie sirene: " +STR$(sirene) +"Hz"
text 10,55,"geluidsnelheid: " +STR$(geluid) +"m/s"
if TotalLen=2 and start=0 then start=1
if TotalLen2=2 and start=1 then start=2
if TotalLen3=3 and start=2 then start=3
if start=3 then text 10,100,"bron in rust, golflengte: " +STR$(geluid/sirene,2) +"m"
if keystate(59)=1 then start=5
if start=0 and TotalLen<2
paste image 1,150,200
ink rgb(0,0,255),0
text 152,202,UserInput$
ink rgb(0,255,0),0
inp$ =""
if len(inkey$()) > 0 then inp$ = inkey$()
if inp$ >= "0" and inp$ <= "9" and TotalLen < 2 and keypress = 0
inc TotalLen
UserInput$ = UserInput$ + inp$
keypress = 1
endif
ambulance = val(userinput$)
endif
if start=1 and TotalLen2<2
paste image 1,150,200
ink rgb(0,0,255),0
text 152,202,UserInput2$
ink rgb(0,255,0),0
inp$ =""
if len(inkey$()) > 0 then inp$ = inkey$()
if inp$ >= "0" and inp$ <= "9" and TotalLen2 < 2 and keypress = 0
inc TotalLen2
UserInput2$ = UserInput2$ + inp$
keypress = 1
endif
persoon = val(userinput2$)
endif
if start=2 and TotalLen3<3
paste image 2,150,200
ink rgb(0,0,255),0
text 152,202,UserInput3$
ink rgb(0,255,0),0
inp$ =""
if len(inkey$()) > 0 then inp$ = inkey$()
if inp$ >= "0" and inp$ <= "9" and TotalLen3 < 3 and keypress = 0
inc TotalLen3
UserInput3$ = UserInput3$ + inp$
keypress = 1
endif
sirene = val(userinput3$)
endif
if start=5
text 10,100,"bron in beweging, golflengte voor de ambulance: " +STR$((geluid-ambulance)/sirene,2) +"m"
text 154,115,"golflengte achter de ambulance: " +STR$((geluid+ambulance)/sirene,2) +"m"
text 10,140,"hoorbare frequentie: " +STR$(freq) +"Hz"
if object position x(1)>object position x(2)+60 then freq =(geluid/(geluid+(-ambulance))*sirene)
if object position x(1)<object position x(2) then freq=(geluid/(geluid+(ambulance))*sirene)
if object position x(1)>object position x(2) && object position x(1)<object position x(2)+60 then freq=sirene
move object left 1,1
endif
if scancode() = 0 then keypress = 0
sync
loop
Tnx for your response it helped a lot.