Raised This Month: $ Target: $400
 0% 

Entity chase player without stuck


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 06-04-2020 , 09:49   Re: Entity chase player without stuck
Reply With Quote #1

Quote:
Originally Posted by Natsheh View Post
Yes celena it does consume alot of CPU but just for a while on the start of the map
Quote:
Originally Posted by CrazY. View Post
The only way I can think of is waypoints.


The logic is quite simple, but will take some work.
1. You need to set the waypoints for each map and save the data, similar to map spawns editor.
2. In the zombie "walk function", check if there is any obstacle. If false, keep moving, if true, look for the waypoint closest to the zombie towards of its target and move it towards that point.
3. When there's no more obstacle or case the zombie has already walked to the waypoint, repeat from step 2
4. When the zombie reach its target, attack!

You can try to take a look at the artificial intelligence codes to see how it works like Podbots, HL1 source code or an open source game engine like Godot, and try to implement with amxx.

It's not impossible, it will just take some work. Good luck!
Thank you. I will try and see if it work.
It is gonna be long
__________________
My plugin:
Celena Luna is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode