Gamestudio Links
Zorro Links
Newest Posts
SGT_FW
by Aku_Aku. 11/30/26 08:19
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (BrainSailor, Quad), 9,800 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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 | 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