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.

Newcomers DBPro Corner / Muzzleflash help?

Author
Message
lil marioman
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: Canada
Posted: 2nd Aug 2009 23:30
I'm making a simple FPS, and I can't get the muzzle flash to work correctly. (See Screen Shot) I'm using a sprite for the Muzzle flash if that helps...

Any help is appreciated!


Scrabble is not my thing. X_X

Attachments

Login to view attachments
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 3rd Aug 2009 06:43
ok you arent explaining what you want it to do, remember that from now on.

If you are trying to get it to go behind the gun then you would need to turn that sprite into an image and then texture it to a plain that you place in front of the camera, us hide object when theres no flash and show object when there a flash...

lil marioman
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: Canada
Posted: 3rd Aug 2009 17:50
I tried that, but I can't get the transparent parts of the texture to actually become transparent.

I'm scared of bugs. I mean that in more ways than one.
zeroSlave
15
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 3rd Aug 2009 18:01
Use "SET OBJECT TRANSPARENCY PlainNum,1"

There's something in this room that makes you can't speak well.
lil marioman
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: Canada
Posted: 3rd Aug 2009 18:24
OK, now I can't get the muzzleflash to the right position...

It appears under/behind the player with this code:



I'm scared of bugs. I mean that in more ways than one.
zeroSlave
15
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 3rd Aug 2009 18:50 Edited at: 3rd Aug 2009 18:52
You may need to play around with the positions a bit to get it in the right spot. Also, I would point the object at the camera's position:



``could also do this perhaps:


There's something in this room that makes you can't speak well.
lil marioman
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: Canada
Posted: 3rd Aug 2009 19:39
Testing that now...

Would it be possible by any chance to set the Muzzleflash Position to the gun position instead? (I tried, can't get it to work...)

I'm scared of bugs. I mean that in more ways than one.
zeroSlave
15
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 3rd Aug 2009 20:09
I'm not sure about that. Since the gun is probably animated inside the model file you would probably have to do it through limbs, but I am not fluent in their use yet so I don't know. If you are animating the gun with DBPro commands, however, you could glue the object to the end of the gun once you have its position figured out.

There's something in this room that makes you can't speak well.
lil marioman
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: Canada
Posted: 3rd Aug 2009 20:23
OK, I almost got it working.

But it doesn't flash.
It's solid when I'm clicking, and not there when I'm not.

I'm scared of bugs. I mean that in more ways than one.
zeroSlave
15
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 3rd Aug 2009 21:49
Hmm... You will probably need to build some timer events so that it randomly appears and disappears while you are holding down the mouseclick. I'm at work, so if someone doesn't get to this before me, I'll test it when I get home and maybe type up some examples.

There's something in this room that makes you can't speak well.
lil marioman
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: Canada
Posted: 3rd Aug 2009 22:06
OK, thanks.

I'm scared of bugs. I mean that in more ways than one.
zeroSlave
15
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 4th Aug 2009 00:26 Edited at: 4th Aug 2009 00:27
You might try something like this in your mouse click code in the main loop:



There's something in this room that makes you can't speak well.
lil marioman
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: Canada
Posted: 4th Aug 2009 03:35
Thanks, it worked.

This thread may be closed now.

I'm scared of bugs. I mean that in more ways than one.

Login to post a reply

Server time is: 2024-11-25 04:43:13
Your offset time is: 2024-11-25 04:43:13