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
1 registered members (TipmyPip), 18,633 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
How can I move decal at real time ? #338583
08/19/10 11:21
08/19/10 11:21
Joined: Jul 2009
Posts: 96
M
mEnTaL Offline OP
Junior Member
mEnTaL  Offline OP
Junior Member
M

Joined: Jul 2009
Posts: 96
i have this simple code for creating a decal in front of the player:

Code:
VECTOR trace_target;
vec_set(trace_target,vector(500,0,0)); 		
vec_rotate(trace_target, me.pan);
vec_add(trace_target, me.x);
c_trace(me.x,trace_target, IGNORE_PASSABLE | USE_POLYGON | SCAN_TEXTURE);
PARTICLE* zz = ent_decal(you,laser_dot,10,random(360));
zz.flags|=BRIGHT;		
vec_scale(normal,10);




But how can i make the decal staying always in front of the player so that I will be able to make round trail from a flashlight and red dot from a laser of a weapon.

Help plz

Re: How can I move decal at real time ? [Re: mEnTaL] #338606
08/19/10 15:16
08/19/10 15:16
Joined: Nov 2008
Posts: 946
T
the_clown Offline
User
the_clown  Offline
User
T

Joined: Nov 2008
Posts: 946
Step 1: Write the code you have already in a loop.
Step 2: Set the decal's lifespan to a very short time OR give the decal an event wich removes it smoothly after a while.


Moderated by  HeelX, Spirit 

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