Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (1 invisible), 672 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
bullet traises #472179
04/14/18 18:16
04/14/18 18:16
Joined: Mar 2018
Posts: 37
Blobfist Offline OP
Newbie
Blobfist  Offline OP
Newbie

Joined: Mar 2018
Posts: 37
Hello,

I have "bullets" using c-trace instead of an actual flying model.
However, since I am using a trace, how can I add an nice bullet trace effect, especially since the bullet (trace) will have an immediat impact. Maybe an after image or something like that?

Re: bullet traises [Re: Blobfist] #472180
04/14/18 18:26
04/14/18 18:26
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Hi, take a look at this wonderful example made by Superku:
[Code/ Idea] bullets without entities

Greets!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: bullet traises [Re: 3run] #472184
04/14/18 22:36
04/14/18 22:36
Joined: Mar 2018
Posts: 37
Blobfist Offline OP
Newbie
Blobfist  Offline OP
Newbie

Joined: Mar 2018
Posts: 37
3run, thats a fast reply Oo

Thank you!

Re: bullet traises [Re: Blobfist] #472186
04/15/18 00:10
04/15/18 00:10
Joined: Mar 2018
Posts: 37
Blobfist Offline OP
Newbie
Blobfist  Offline OP
Newbie

Joined: Mar 2018
Posts: 37
hmmm,

is it passable to play sounds at specific vector or traceed positions?

Code:
ent_playsound(hit,impact,100);//play impact sound from actual impact location.

OR

ent_playsound(vectorposition,impact,100);//play bullet flyby sound from current vector position


Re: bullet traises [Re: Blobfist] #472189
04/15/18 09:39
04/15/18 09:39
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
If you want to play impact sound, simply create a dummy model at hit->x position (or target.x) and play ent_playsound at it (note that there should be a pointer to ENTITY, not vector as you've used in your example). After sound was played, remove that dummy model.

Example:
Code:
void impact(){
	
	var snd_handle = ent_playsound(my, impact_wav, 500);
	
	while(my){
		
		if(!snd_playing(snd_handle)){ break; }
		wait(1);
		
	}
	
	safe_remove(my);
	
}

// in bullet function
if(trace_hit){
	
	ent_create(NULL, &hit->x, impact);
	
}



Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | 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