|
0 registered members (),
631
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Any ideas for my ent_decal issue?
#397272
03/17/12 08:48
03/17/12 08:48
|
Joined: Apr 2005
Posts: 795 U.S.A. Michigan
exile
OP
User
|
OP
User
Joined: Apr 2005
Posts: 795
U.S.A. Michigan
|
Hey there, so I have a grenade launcher I made in my project which works amazing so far and does exactly what I want it to do. The only problem I am having is trying to figure out how tp produce an explosion mark where the grenade hit something. I know how to use ent_decal and I have already made bullet holes before using c_trace. I have been trying to make this work but its just not looking so good. What i did was call a c_trace when the collision event is called, then place the explosion sprite at the hit location. But its just not working. Here is the code...
BMAP* exploMark = "burnMarkA.dds";
void asltLauncher_impact()
{
if (event_type == EVENT_BLOCK)
{
c_trace(my.x,vec_rotate(vector(0,50,0),my.pan),IGNORE_ME|IGNORE_PASSABLE|IGNORE_CONTENT);
PARTICLE* p = ent_decal(you,exploMark,7+random(50)+50,random(360)); // place a random sized decal at the hit entity
p.lifespan = 160; // remove decal after 100 seconds
ent_create(NULL,my.x,exploAsmoke_emitter);
set(my,INVISIBLE);
}
}
I keep getting an invalid call error. So does anyone know what I am doing wrong?
|
|
|
Re: Any ideas for my ent_decal issue?
[Re: Widi]
#397282
03/17/12 10:09
03/17/12 10:09
|
Joined: Oct 2011
Posts: 1,082 Germany
Ch40zzC0d3r
Serious User
|
Serious User
Joined: Oct 2011
Posts: 1,082
Germany
|
Ah dont talk shit, you is NULL when it doesnt hit anything (Level geo)! He needs SCAN_TEXTURE...
Last edited by Ch40zzC0d3r; 03/17/12 10:09.
|
|
|
Re: Any ideas for my ent_decal issue?
[Re: exile]
#397300
03/17/12 12:54
03/17/12 12:54
|
Joined: Aug 2007
Posts: 1,922 Schweiz
Widi
Serious User
|
Serious User
Joined: Aug 2007
Posts: 1,922
Schweiz
|
@Ch40zzC0d3r: From the manual: ENTITY* Entity auf das das Decal angebracht werden soll oder NULL, um es auf die Leveloberfläche aufzubringen.
If you want to place the decal at the Level geometry, then use "NULL" for ent_decal`s entity pointer! And next time please don`t de so harsh... (hast du mal (wieder !) einen schlechten Tag erwischt?)
Last edited by Widi; 03/17/12 12:59.
|
|
|
|