Gamestudio Links
Zorro Links
Newest Posts
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
2 registered members (AndrewAMD, Ayumi), 1,405 guests, and 4 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
Page 2 of 2 1 2
Re: bullets should not collide [Re: Metal_Man] #127904
05/04/07 16:24
05/04/07 16:24
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
or try vec_dist.

Code:

if (vec_dist(my.x,enemy.x) < dist)
{
enemy.health -= 1;
if (enemy.health <= 0)
{
enemyDie();
}
}



Re: bullets should not collide [Re: vlau] #127905
05/07/07 11:32
05/07/07 11:32
Joined: Jul 2004
Posts: 52
Vienna
H
Hawk Offline OP
Junior Member
Hawk  Offline OP
Junior Member
H

Joined: Jul 2004
Posts: 52
Vienna
sry has been a while since my last post..
thanks for your ideas, i am satisfied with my current result although they are still colliding from time to time. But nevertheless my main issue has been solved because the bullets don't create any bulletholes and dust anymore if they collide with each other. I didn't think about pointers, so thanks for the hint tompo
I didn't tried everything because I don't want to change my shooting script anymore. The game isn't a fps anyways, so the current script is ok for me. I will occupy myself with the colliding when i have more time. For now i just want to get things working. If the bullets collide they just remove themselfes and my current explanation for missing bullets is that they are duds


Commcercial A6.60
Re: bullets should not collide [Re: Hawk] #127906
05/07/07 12:56
05/07/07 12:56
Joined: Apr 2006
Posts: 265
V
vartan_s Offline
Member
vartan_s  Offline
Member
V

Joined: Apr 2006
Posts: 265
"still colliding from time to time". So sometimes your shotgun shoots 8 bullets, sometimes 5? Not a good idea in my opinion. I had this problem a while ago, I tried making a while loop to distribute different push values to the bullets but this didn't work as smaller push values still collided with larger push values. Therefore, I recommend giving bullets a skill value of 1, with other objects being 0, and on collision check if the skill value of the thing it collided with is 1 or 0. If it is 0, remove it and do damage, smoke etc. If it is 1, do nothing; the bullets will then pass each other . Works fine for me. c_trace also works, but then you can't do tracers and stuff like that, and also the bullet will always reach the target immediately.

Re: bullets should not collide [Re: vartan_s] #127907
05/07/07 21:31
05/07/07 21:31
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
use a regulated c_trace()...

Same as above, but do'nt do the full trace, just from units of distance at a time...


xXxGuitar511
- Programmer
Re: bullets should not collide [Re: xXxGuitar511] #127908
05/08/07 09:37
05/08/07 09:37
Joined: Nov 2005
Posts: 112
M
miez Offline
Member
miez  Offline
Member
M

Joined: Nov 2005
Posts: 112
If the bullets have to be entitys and NO trace (for slow bullets in bullettime and such stuff...)
Make the bullets sprites and use C_move with ignore sprites.
Works fine in most situations, because everything I shoot at in my game are modelentities, even Windowglass (some people use sprites).

Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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