Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, The_Judge, Grant), 898 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Bullet Collision = c_scan? #314512
03/08/10 23:51
03/08/10 23:51
Joined: Mar 2009
Posts: 186
V
Valdsator Offline OP
Member
Valdsator  Offline OP
Member
V

Joined: Mar 2009
Posts: 186
I've been having lots of trouble with collision lately, and after I get something fixed, something else comes up right when I progress in making more of my game.

The player can now shoot a bullet, and depending on if he's facing left or right, that's where the bullet points and goes. Now I've begun working on making the bullet disappear, and so I decided to use c_trace. But, like people have said, c_trace is extremely slow, and sometimes if I get too close to a wall, or just am a certain distance away from the wall, the bullet goes through. I tried using c_scan before this, which seems like the best solution, but I'm a bit confused on how it works.

After you have a c_scan command, is there a "scan_hit" type of thing, just like trace_hit? If not, how would you go about asking the program if anything (including walls that are not entities) is in the scanning area?

Also, if there's a better way to detect when a bullet hits an object or block (and isn't too complicated for a nub like me :P), please suggest. Thanks in advance.

Re: Bullet Collision = c_scan? [Re: Valdsator] #314597
03/09/10 15:45
03/09/10 15:45
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Use the "event" instead of c_scan for this and move the bullet with c_move.

Re: Bullet Collision = c_scan? [Re: Widi] #314662
03/09/10 22:37
03/09/10 22:37
Joined: Mar 2009
Posts: 186
V
Valdsator Offline OP
Member
Valdsator  Offline OP
Member
V

Joined: Mar 2009
Posts: 186
Heh, wow, can't believe I forgot about that. Thanks.


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