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 / Transparent Muzzle Flash?

Author
Message
DBAlex
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: United Kingdom
Posted: 10th Apr 2005 20:24 Edited at: 10th Apr 2005 20:25
Hi im trying to create a muzzle flash effect in my game...

Im using a textured plain but it wont go transparent!

(i want the black bits around to image to not show up)

heres my code atm:



Thanks if you can help.

EDIT:

Heres a pic of whats happening atm...


AMD 64 3000 + 512mb RAM + 80GB HD + Radeon 9600se 128mb
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Apr 2005 21:24
Hi,
Quote: "
he transparent colour is determined by the SET IMAGE COLORKEY command.
"


Found this in the set transparent command help file.

SET IMAGE COLORKEY Red Value, Green Value, Blue Value
make r g b your background colour of object.

In Space No One can Hear You Scream! (When your comm Line is cut?)
DBAlex
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: United Kingdom
Posted: 10th Apr 2005 21:47
Ok.

How do i set the background color?




AMD 64 3000 + 512mb RAM + 80GB HD + Radeon 9600se 128mb
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Apr 2005 22:11
from your screen shot in looks like you would put in this



Give it try see what happens, if nothing come back at ill see what else can be done.

In Space No One can Hear You Scream! (When your comm Line is cut?)
DBAlex
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: United Kingdom
Posted: 10th Apr 2005 22:23
That still isnt working...


AMD 64 3000 + 512mb RAM + 80GB HD + Radeon 9600se 128mb
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 10th Apr 2005 22:25
SET OBJECT TRANSPARENCY 305, 1
change to
SET OBJECT TRANSPARENCY 305, 4

also make sure that the image used to texture is a bmp and that the color key is black
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Apr 2005 22:30
have a look at the post colorkey strangness may show you where when and what to do. I think the colourkey command might need to go at the being of code.

In Space No One can Hear You Scream! (When your comm Line is cut?)
DBAlex
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: United Kingdom
Posted: 10th Apr 2005 22:30
Argh.


nvm...Its the image that is the problem...

Thanks anyway.


AMD 64 3000 + 512mb RAM + 80GB HD + Radeon 9600se 128mb
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Apr 2005 22:38
this what I've done replace yourimage.bmp name to your file name in your code.


sync on : sync rate 0 :
color backdrop rgb(0,0,128) : hide mouse
SET IMAGE COLORKEY 0,0,0
load image "yourimage.bmp",1,1
set text font "arial" : set text size 12 : set text transparent
make object plain 305,50,50
texture object 305,1
SET OBJECT TRANSPARENCY 305, 4

do
sync
loop
sync on : sync rate 0 :
color backdrop rgb(0,0,128) : hide mouse
SET IMAGE COLORKEY 0,0,0
load image "yourimage.bmp",1,1
set text font "arial" : set text size 12 : set text transparent
make object plain 305,50,50
texture object 305,1
SET OBJECT TRANSPARENCY 305, 4

do
sync
loop

In Space No One can Hear You Scream! (When your comm Line is cut?)
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Apr 2005 22:40
Ah! that what happens if you don't use the close code button.

here its is again



just so you can tell when it list ends

In Space No One can Hear You Scream! (When your comm Line is cut?)
Philip 1337
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 10th Apr 2005 23:28
Remember to use Set Image Colourkey before loading images

Dark Days Online

Login to post a reply

Server time is: 2025-05-28 06:13:05
Your offset time is: 2025-05-28 06:13:05