Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Akow, degenerate_762), 1,430 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 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 | 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