Gamestudio Links
Zorro Links
Newest Posts
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
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
holes #427805
08/13/13 22:21
08/13/13 22:21
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
hello everyone, i would need to know how can i print on the wall sprites of bullet holes, i´m thinking in using something like a trace, but i have a problem, and it´s the orientation of it (vertical / horizontal). For example the player shoots the wall, then i have a vertical hole, but if i supouse the player walks back and shoots in the same direction and hit the roof i have an horizontal hole... if i use the camera pan or tilt i can not do this because if i supouse the player shoot in the same directiom but hit diferents things(wall or roff) the orientatin of the hole will be diferent. how i can make the hole to have an orientation respect to the wall, roff or anything i hit?

Re: holes [Re: GaniX] #427806
08/13/13 22:28
08/13/13 22:28
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Use decals (ent_decal after c_trace)! The manual has a working code example on the ent_decal page.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: holes [Re: Superku] #428108
08/18/13 01:00
08/18/13 01:00
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
i study the ent decal...but i can not use because is only the comercial edtion. i have the free version.
is another way to do that ? and not use decal

Re: holes [Re: GaniX] #428109
08/18/13 01:20
08/18/13 01:20
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
If you shoot a wall and want to place the bullet hole there (at target.x/ hit.x), you can try to rotate the orientation of the sprite by the normal vector, thus vec_to_angle(bullet_hole.pan,normal);


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: holes [Re: Superku] #429581
09/14/13 18:27
09/14/13 18:27
Joined: Apr 2012
Posts: 106
G
GaniX Offline OP
Member
GaniX  Offline OP
Member
G

Joined: Apr 2012
Posts: 106
yes works fine tks
but i have another question...
when i shoot, the holes sometimes is cannot see.
i use the znear instrucction but... if i use the znear i can see the holes over the entiities
what can i do?

Re: holes [Re: GaniX] #429584
09/14/13 18:55
09/14/13 18:55
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
ZNEAR was not made for that. Its fex for carryed weapons.
Correct the pos of the sprite ure placing? fex
Code:
void placed_blood_leak(){
   my.tilt = 90;
   my.z += 5; // a bit higher than hit by trace or whatever
   ..



Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: holes [Re: rayp] #429586
09/14/13 18:59
09/14/13 18:59
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Rotate it and substract hit.nx from the position

Last edited by Ch40zzC0d3r; 09/14/13 19:00.

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