Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
0 registered members (), 631 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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