Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Problems using 2d sprites for as seperate images on multiple planes

Author
Message
laser_beam
16
Years of Service
User Offline
Joined: 29th Jun 2010
Location:
Posted: 24th Jul 2010 05:45
Hi, i'm trying to make multiple images on seperate 2d planes. When i run the code i only seem to get the one image on both crossed 2d planes. Anyone got any hints?

rem Make tree
set image colorkey 255, 0, 255
make object plane 100, 1, 1
make object plane 101, 1, 1
position object 100, 8, 1, 8
position object 101, 8, 1, 8
rotate object 101, 0, 90, 0
load bitmap "tree01.bmp", 3
get image 100, 0, 0, 610, 606
delete bitmap 3
texture object 100, 100
texture object 101, 100
set object transparency 100, 1
set object transparency 101, 1

rem Second tree
set image colorkey 255, 0, 255
make object plane 102, 2, 2
make object plane 103, 2, 2
position object 102, 16, 1, 16
position object 103, 16, 1, 16
rotate object 103, 0, 90, 0
load bitmap "Pomegranate_Tree.bmp", 4
get image 102, 0, 0, 418, 415
delete bitmap 4
texture object 102, 100
texture object 103, 100
set object transparency 102, 1
set object transparency 103, 1
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 24th Jul 2010 10:59
You grab the 2nd image as 102, and then texture both objects with image number 100 (the 1st tree)

Change the last 2 Texture Object image numbers to 102 and all will be good.



laser_beam
16
Years of Service
User Offline
Joined: 29th Jun 2010
Location:
Posted: 24th Jul 2010 15:40
Awesome! That worked. Thanks a billion!
laser_beam
16
Years of Service
User Offline
Joined: 29th Jun 2010
Location:
Posted: 24th Jul 2010 16:48
thanks champ

Login to post a reply

Server time is: 2026-07-25 07:00:49
Your offset time is: 2026-07-25 07:00:49