|
Author
|
|
Thread
|
|
|
|
|
|
10-31-2003 21:57
Posted by:
Leorik The Creator
Location:
Montréal,Québec(canada)

|
hi,
My friends and other tnt basic users and me were looking for a sprite rotation made by someone who know well to program the exemple can be a car that can turn with 180 and 360 degrees.
We don'T need a game but just a simple exemple that show us how to use that sprite rotation that is not very easy to make...
It'S will be very appreciated !
Cheers,
Leorik
|
|
10-31-2003 22:01
Posted by:
Leorik The Creator
Location:
Montréal,Québec(canada)

|
sorry i've just seen that i write example by "exemple"
hehe...
|
|
10-31-2003 22:05
Posted by:
someone
Location:
Quebec ( Canada )

|
graphics mode 640,480
load images 128
int angle=0
while true
'replace this part by the script that decides the rotation degree!
' >>>>>> >>>>> >>>>> >>>>> >>>>>
angle=angle+2
if angle>630 then angle=0
' >>>>>> >>>>> >>>>> >>>>> >>>>>
sprite 1,320,240,0
set sprite rotation 1,angle
draw frame
wend
' hope this helps,
' Mathew
|
|
10-31-2003 22:25
Posted by:
Leorik The Creator
Location:
Montréal,Québec(canada)

|
yes thats help me but...
its doesnt work i've putted the code down and if you see something wrong change it and post it here plz
graphics mode 640,480
load images 128
global int gPlayerImage
global int gPLayerDirection
global int angle=0
global int gPlayerX,gPlayerY
global int gPlayerspeed=5
if up then gPlayerDirection=0
gPlayerY=gPlayerY-gPlayerSpeed
if right then gPlayerDirection=1
gPlayerX=gPlayerX+gPlayerSpeed
if down then gPlayerDirection=2
gPlayerY=gPlayerY+gPlayerSpeed
if left then gPlayerDirection=3
gPlayerX=gPlayerX-gPlayerSpeed
while true
gPlayerImage=gPLayerDirection
sprite 0,gPlayerX,gPlayerY,gPlayerImage
angle=angle+2
if angle>630 then angle=0
sprite 1,320,240,0
set sprite rotation 1,angle
draw frame
wend
while mouse button
thanks Mat
Leo
|
|
10-31-2003 23:10
Posted by:
-wyvern
Location:
Bedroom

|
You need to use
Graphics Mode Hardware xxx,yyy
Apparently. This puts you into accelerated hardware mode, giving your computer a few handy sprite related tricks (providing your computer's graphics card is compatible, which mine currently isn't...)
|
|
11-01-2003 13:29
Posted by:
someone
Location:
Quebec ( Canada )

|
d'oh! my mistake...
|
|
All times are GMT
|
|
|
|
|