|
2 registered members (AndrewAMD, TipmyPip),
5,487
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Shotgun spread, how to?
#140844
07/13/07 01:50
07/13/07 01:50
|
Joined: Oct 2003
Posts: 2,194 Saturn
Metal_Thrasher
OP
Expert
|
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
Expert
|
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
noobie86
Newbie
|
Newbie
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: Metal_Thrasher]
#140848
07/13/07 15:22
07/13/07 15:22
|
Joined: Mar 2006
Posts: 2,758 Antwerp,Belgium
frazzle
Expert
|
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
OP
Expert
|
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
|
|
|
|