Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Shotgun spread, how to? #140844
07/13/07 01:50
07/13/07 01:50
Joined: Oct 2003
Posts: 2,194
Saturn
Metal_Thrasher Offline OP
Expert
Metal_Thrasher  Offline OP
Expert

Joined: Oct 2003
Posts: 2,194
Saturn
Uh, this probably comes up often. But I can't figure it out...and at least not before posting it here =P. Uhhh, if I'm using the following code for bullet hole placement, how should I do the spread? I thought it'd be simple. But you can only put vectors in the given space and not expressions. Should I go though the work of using multiple traces? or is there a more simplified fix to this?
Code:
 bullhole = ent_create ("bullethole1.tga",target,bullethole); 


Thanks in advance dudes =)


-Johnny Thrash
Re: Shotgun spread, how to? [Re: Metal_Thrasher] #140845
07/13/07 08:26
07/13/07 08:26
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Maybe you could trace the shot to different targets. You code the position of the targets so it looks like spread. The effect to achieve this could be done by particles.

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: Shotgun spread, how to? [Re: Metal_Thrasher] #140846
07/13/07 08:28
07/13/07 08:28
Joined: Jul 2007
Posts: 24
N
noobie86 Offline
Newbie
noobie86  Offline
Newbie
N

Joined: Jul 2007
Posts: 24
HI I couldn't understand the problem correctly but i think you mean you have a picture one bullet hole in a .tga file and want to create multiple instances of it on the wall.

well i don know much of C-script, so i don know about multiple traces but can't you create many .tga files, say 5 or 6 of multiple bullet holes in random spread (using PS or paint??) and then everytime u shoot pick a random number between 1 and 6 and according to that number display the corresponding tga?

result = random(1,6);
if(result==1) {bullhole = ent_create ("bullethole1.tga",target,bullethole);}
if(result==2) {bullhole = ent_create ("bullethole2.tga",target,bullethole);}
etc etc..

i think tat's how a noob like me would do it, coz i don know much of C-script

of course, the problem with this is that the distance between the holes stays constant whatever distance you shoot from.. maybe you can scale the .tga and cheat

Re: Shotgun spread, how to? [Re: frazzle] #140847
07/13/07 14:30
07/13/07 14:30
Joined: Oct 2003
Posts: 2,194
Saturn
Metal_Thrasher Offline OP
Expert
Metal_Thrasher  Offline OP
Expert

Joined: Oct 2003
Posts: 2,194
Saturn
Quote:

Maybe you could trace the shot to different targets. You code the position of the targets so it looks like spread. The effect to achieve this could be done by particles.

Cheers

Frazzle




Target is just the result of my trace. so that the bullet hole ends up where I'm shooting at.

I thought about your idea too noobie, but I thought it might come off kinda of lame, and you loose the random factor as well


-Johnny Thrash
Re: Shotgun spread, how to? [Re: Metal_Thrasher] #140848
07/13/07 15:22
07/13/07 15:22
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
If there are different traces, you could determ which trace is used for the target where the bullet hole should appear and the other traces used for the 'spread effect' where the particles or sort like are used to create the effect

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: Shotgun spread, how to? [Re: frazzle] #140849
07/16/07 11:41
07/16/07 11:41
Joined: Oct 2003
Posts: 2,194
Saturn
Metal_Thrasher Offline OP
Expert
Metal_Thrasher  Offline OP
Expert

Joined: Oct 2003
Posts: 2,194
Saturn
I'll try the multiple trace idea, maybe that'll work. I tried, in the meantime, to do shooting out entities to where the bullet hole should be traced, but I came acroos tons of problems. it seems to be alot of work for something I don't know will even work. I'll try the muliple trace idea.


-Johnny Thrash

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1