Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / [Dark AI] Melee creature attacking starts too early

Author
Message
Natflash Games
18
Years of Service
User Offline
Joined: 7th Feb 2006
Location:
Posted: 10th Sep 2006 13:38 Edited at: 10th Sep 2006 13:38
Hi guys, I have a melee creature in my game, but it seems to start attacking too early, its attacking before it gets close to the player, Ive used AI set entity attack distance but no change, and I'm using AI get entity can fire to determin when the entity can attack so Im asking is, isnt there a way to close the range the entity can fire, kinda like AI set entity can fire range (which obviously dosen't exist)
Thanks for any help


Check out my site for the latest on my games.
pdq
17
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 10th Sep 2006 22:50
You may have to set the AI Set Radius as low as possible and AI Set Entity Avoid Distance to probably zero.

The other thing you can do is make a separate sub that looks like the following pseudocode:

_CHECK_ATTACK_DISTANCE:
if AI GET ENTITY CAN FIRE()

distance# = 'Insert code to find distance between AI and TargetAI using AI GET ENTITY TARGET() and AI GET ENTITY TARGET()

if distance# =< AI SET ENTITY ATTACK DISTANCE
Attack_State() `Set the entity's attack state
endif
endif
return

Login to post a reply

Server time is: 2024-03-29 13:19:37
Your offset time is: 2024-03-29 13:19:37