Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (AndrewAMD), 3,675 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Flamethrower #363734
03/14/11 16:18
03/14/11 16:18
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
I made simple flamethrower, but I have few questions:
1 - How to make collusions for flames?
First I just used trace in front of the player... but I want something else...
2 - How to make particles move away from weapon (or vertex)?
The way I did, they move only in X coordinates, whatever player turns to, I tried to use "vec_rotate" and other staff, no luck...


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Flamethrower [Re: 3run] #363737
03/14/11 16:23
03/14/11 16:23
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
1 - maybe use c_scan from player with a cone around approximately the flames?


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: Flamethrower [Re: 3run] #363738
03/14/11 16:24
03/14/11 16:24
Joined: Jul 2010
Posts: 974
United Arab Emirates, Dubai
TheShooter Offline
User
TheShooter  Offline
User

Joined: Jul 2010
Posts: 974
United Arab Emirates, Dubai
I guess, particles haven't any collisions detect.

Last edited by TheShooter; 03/14/11 16:25.

Staub ist das neue Prime!!

Programming is like sex:
One mistake and you have to support it for the rest of your life.

Aktuelles Projekt: http://thisiswargame.bplaced.net/index.html

A8 Commercial *freu*
Re: Flamethrower [Re: painkiller] #363739
03/14/11 16:25
03/14/11 16:25
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
But how to make player get damage from flames too?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Flamethrower [Re: 3run] #363746
03/14/11 16:39
03/14/11 16:39
Joined: Feb 2010
Posts: 886
Random Offline
User
Random  Offline
User

Joined: Feb 2010
Posts: 886
maby with texture scanning;
c_trace(my.x,trace_flammes.x, SCAN_TEXTURE);.
Now when you make the flammes of the flammthrower out of alot of little spirets, you can just remove the flammes that touches the wall (or whatever) and with an easy else you can also scan the actors , with should get burned by the flammes.
When that happens, just create new flame spirets on the model, with got burned;
PARTICLE* hole = ent_decal(you,burn_wund,5,random(360));
or you even better you create new fire spirets on the model that got hit ,that expanse and creates the "burn_wund" particale at the places the flame on the model, that was created becouse of the flammes on the flammthrower.



Re: Flamethrower [Re: 3run] #363748
03/14/11 16:45
03/14/11 16:45
Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
Roel Offline
Senior Member
Roel  Offline
Senior Member

Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
1

you can C_trace from every particle along the velocity vector
This way you can perform collision detection on particles(this is slow).
you can also trace once, when you initialize the particle,
and store the hit position somewhere(particles will fade out when they reach this spot).
This is in most cases sufficient, as walls normally don't move.

2
some idea for moving direction:
vec_for_angle( temp, players_angle);
vec_normalize( temp, some_velocity);
effect(particle,1,weapons_vertex, temp);

Last edited by Roel; 03/14/11 16:47.

Check out the throwing game here: The throwing game
Re: Flamethrower [Re: Roel] #363751
03/14/11 16:48
03/14/11 16:48
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
1 - Good idea with traces, will try but I hope it'll be not to much slow...
2 - I already tried that, but didn't work frown

Random: FYI: I can't use decals laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Flamethrower [Re: Roel] #363752
03/14/11 16:49
03/14/11 16:49
Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
Roel Offline
Senior Member
Roel  Offline
Senior Member

Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
for the damage:
you can use C_trace with the ACTIVATE_SHOOT flag
then you write a shoot event, I think there are some examples in the manual.


Check out the throwing game here: The throwing game
Re: Flamethrower [Re: Roel] #363759
03/14/11 17:04
03/14/11 17:04
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
I'll try thing with traces, sounds easy...
But what about making particles move away from specific model or vertex?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Flamethrower [Re: 3run] #363764
03/14/11 17:13
03/14/11 17:13
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
I dont know if it works but you can try it wink

when the player shoots with the flamethrower create a box (or a sphere, or...).
while firing, scale the box with the same speed, the particles are moving untill its scaled to the max range of the flames.
also while firing, set the angle of the box always to the direction the particles are moving.

now you should be able to use a simple collision detection laugh

(why do all try the most complicated ways first?!)


[Edit]
... but it could be a problem if the player turns fast.
(i have to think about that...)

@problem 2)
using vec rotate should work... do you use the velocity vector of the particles?

Last edited by Kartoffel; 03/14/11 17:47.

POTATO-MAN saves the day! - Random
Page 1 of 2 1 2

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