Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Aku_Aku, 7th_zorro, Ayumi), 1,050 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to detect if 1 entity has hitted another... #137307
06/20/07 19:47
06/20/07 19:47
Joined: Mar 2007
Posts: 27
P
PeterM Offline OP
Newbie
PeterM  Offline OP
Newbie
P

Joined: Mar 2007
Posts: 27
Hey I am wondering how would i detect when one entity hits another with a sword?
I have no idea how to do that...

tnx for your help.

Re: How to detect if 1 entity has hitted another.. [Re: PeterM] #137308
06/20/07 20:34
06/20/07 20:34
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
I think that it is usually done by a c_trace.
If it hitted an other entity, the you pointer is set to that entity and you can do what ever you want with it. c_scan should work, too.

Just look it both up in the manual.

Re: How to detect if 1 entity has hitted another... [Re: PeterM] #137309
06/20/07 20:35
06/20/07 20:35
Joined: Aug 2003
Posts: 902
Van Buren, Ar
Gordon Offline
User
Gordon  Offline
User

Joined: Aug 2003
Posts: 902
Van Buren, Ar
event_impact is all that you need there is no need to check before with c_trace or c_scan.



Our new web site:Westmarch Studios
Re: How to detect if 1 entity has hitted another.. [Re: Gordon] #137310
06/20/07 20:38
06/20/07 20:38
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
Quote:

event_impact




But this could make some troubles with collision detection.
And the sword has to be turned and moved through c_move and c_rotate.

But for a lot of other things this would be the way to go

Re: How to detect if 1 entity has hitted another.. [Re: Slin] #137311
06/20/07 21:17
06/20/07 21:17
Joined: Mar 2007
Posts: 27
P
PeterM Offline OP
Newbie
PeterM  Offline OP
Newbie
P

Joined: Mar 2007
Posts: 27
wouldnt event_impact be a problem if i hit my entity in another withouth swinging a sword wouldnt that count as a hit?

Oh and could someone tell me where can i find good literature or tutorials for simple AI?

Last edited by PeterM; 06/20/07 21:23.
Re: How to detect if 1 entity has hitted another.. [Re: PeterM] #137312
06/21/07 11:38
06/21/07 11:38
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Set the sword to 'passable' and do a trace every frame (while you swing it) from the bottom of the blade to the tip of it.
Set the trace_mode 'activate_shoot' to have an indicator for the other entity if it was hit by a sword trace or just another trace


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