Hi, here is a new plugin from me. This allows you to easily use billboards. I hope that one or the other can use it.
File:
billboard-plugin_20111003_madbit.zip (Uploading)
Here the Commands.
ENABLE BILLBOARDS
MAKE BILLBOARD
CREATE ANIMATED BILLBOARD
UPDATE BILLBOARDS
BILLBOARD EXIST
DELETE BILLBOARD
ANIMATION SPEED BILLBOARD
BILLBOARD ANIMATION SPEED
SET BILLBOARD FRAME
GET BILLBOARD FRAME
PLAY BILLBOARD
LOOP BILLBOARD
STOP BILLBOARD
BILLBOARD PLAYING
ROTATE BILLBOARD
BILLBOARD ANGLE
CLONE BILLBOARD
LOCK BILLBOARD AXIS X
LOCK BILLBOARD AXIS Y
UNLOCK BILLBOARD AXIS X
UNLOCK BILLBOARD AXIS Y
Here an examplecode:
animDelay = 100
animFrame = 0
SYNC ON
SYNC RATE 60
SET WINDOW OFF
ENABLE BILLBOARDS
LOAD IMAGE "./../../../media/textures/Explo0.png", 1
CREATE ANIMATED BILLBOARD 1, 1, 8, 4
ANIMATION SPEED BILLBOARD 1, animDelay
SET OBJECT TRANSPARENCY 1, 1
SET OBJECT LIGHT 1, 0
DO
`Space to play animation once
IF SPACEKEY() = 1 THEN PLAY BILLBOARD 1
`F1 to lopp animation
IF KEYSTATE(59) = 1 THEN LOOP BILLBOARD 1
`F2 to stop animation
IF KEYSTATE(60) = 1 THEN STOP BILLBOARD 1 : animFrame = GET BILLBOARD FRAME(1)
`[Num +] to increase the delay between two frames of animation
IF KEYSTATE(78) = 1 THEN INC animDelay : ANIMATION SPEED BILLBOARD 1, animDelay
`[Num -] to decrease the delay between two frames of animation
IF KEYSTATE(74) = 1 THEN DEC animDelay : ANIMATION SPEED BILLBOARD 1, animDelay
IF BILLBOARD PLAYING(1) = 0
`[PgUp] to increase animation frame.
IF KEYSTATE(201) = 1 THEN INC animFrame : SET BILLBOARD FRAME 1, animFrame
`[PgDown] to decrease animation frame.
IF KEYSTATE(209) = 1 THEN DEC animFrame : SET BILLBOARD FRAME 1, animFrame
IF animFrame < 0 THEN animFrame = animFrame + (8*4)
IF animFrame > (8*4) THEN animFrame = animFrame - (8*4)
ENDIF
move# = move# + MOUSEMOVEZ() / 10000.0
mx# = mx# + MOUSEMOVEX() / 10.0
my# = my# + MOUSEMOVEY() / 10.0
ROTATE CAMERA my#, mx#, 0
MOVE CAMERA move#
CENTER TEXT SCREEN WIDTH()/2, 0, "Frame :" + STR$(GET BILLBOARD FRAME(1)) + " Animation Speed :" + STR$(BILLBOARD ANIMATION SPEED(1))
UPDATE BILLBOARDS 0
SYNC
LOOP
Have fun with this.
Hope this is nearly bug free.
With Computers you can solve Problems that you have never befor.
Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)