Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 581 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
behinde entity #304916
01/11/10 20:58
01/11/10 20:58
Joined: Sep 2009
Posts: 12
Y
Yourself Offline OP
Newbie
Yourself  Offline OP
Newbie
Y

Joined: Sep 2009
Posts: 12
hi,

how can I detect if an entity is moving away from me ? inside a 3D space I want my enemies only to attack when they can see you (when they are facing you) . so how can I calcutate something like this ?

cheers

Re: behinde entity [Re: Yourself] #304919
01/11/10 21:15
01/11/10 21:15
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Quote:
how can I detect if an entity is moving away from me ?

Write a state machine for your monsters, such that they have multiple "states": wander, wait, hunt, attack, retreat. If the monster is retreating or something, then we can automatically assume that he's trying to move away laugh

Quote:
inside a 3D space I want my enemies only to attack when they can see you (when they are facing you) . so how can I calcutate something like this ?

Have the enemies perform a c_scan instruction with a wide arc and a long distance. If they detect the player (use event_scan for this), have them perform a c_trace instruction to trace an invisible line from themselves to the player. If the line doesn't hit anything (ie they have a direct line of sight to the player), then they can go to "attack" mode or something.

I hope that helps laugh


Eats commas for breakfast.

Play Barony: Cursed Edition!

Moderated by  HeelX, Spirit 

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