![]() |
Baddy Script
I know some members may dislike me, but for those who don't continue reading :)
Anyway I am scripting a Baddy and am wondering how I could make it swing its sword at players when it's movement is done via a timeout. Maybe increase an index variable and if it starts with lets say 2 for instance or an even number it would swing it's sword. Here is what I have so far. PHP Code:
|
I think baddies should have a cone of vision instead of just attacking whoever is near them. Also, you should probably do a raycast check between the baddy and player for a wall. Why go after a player it might not even be able to get to(on the other side of a row of trees, for example)?
|
Yes, I am yet to script wall check's, Mainly I just want to get the attacking bit right, then I'll work on the not walking on walls and not targeting a player if it can't get to them. (No idea how I'll do that yet lol)
|
You also need to familiarize yourself with finding the distance between the player and baddy, and working with deltas.
|
|
Thanks for the links, I will read them and try to understand how I could make a good movement system.
|
All times are GMT +2. The time now is 01:53 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.