|
A few things actually... 1st: i want obj_106(main enemy) to teleport close to the player but not at. 2nd: on attack. randomly Choose to either kill or teleport away?
(comments are locked)
|
|
Usually I'm not much for answering these loose type of questions, we don't know what your world looks like and what the rules for the game world is. You haven't given us anything to work with actually to help you out. The easiest way to handle AI is to use enums of their behavior. Here's an example that should fit your needs (put this on obj_106): The most important function here is the Reposition() which takes a range and returns a Vector3. This doesn't handle the positioning in Y-axis as you haven't given any information of the rules of your game. If this is a terrain then you could use a raycast in the downward direction from where newPos inside Reposition() is calculated. Good luck! Is it just me who is clumsy or is the new UA having a bit of trouble with the indentation? Either way, sorry about that.
Jul 10 '12 at 09:09 AM
save
thumbup but should clarify : I cannot speculate if ur clumsy (!) but changing to UDN has definitely stuffed up code formatting in answers and comments. I used to happily tab all my code, then paste and bam instant formatting. Now, its wearing out the spacebar on my keyboard ......
Jul 10 '12 at 09:13 AM
alucardj
Erm... sorry... heres a better Discription of what i want 106 to do. and more detial... Ehem. The world is in a forest/hilly environment outside of a the SCP foundation. When you go into 106's cage he uses the player to get out of his cell and transport the player into his pocket dimension... but his powers get messed up by some distress of being locked up for so long (i already got this part down dont worry) after being transported to this new area. not even known by 106, 106 trys to hunt you down and kill you. making fake 538's (shadow spiders got that part down aswell) (now heres the part i dont got) he slowly walks toward you at first entry of the game and teleports away. throughout time of the game he will teleport close to you and either choose to attack you removing half your health, or to scare you making (noise_11) and teleporting away for a bit. here are my animations: walk Attack his hp: Unkillable 2e+07 thank you >.< hope this is better then earlier.
Jul 10 '12 at 09:17 AM
saitoFOX
@alucardj Haha yeah, hopefully it's fixed soon, imagine what all those minutes of spacing could be codewise. :-) @saitoFOX Good thing! You'll get better help in the future if you also paste relevant code how far you've come. You have a good start there with the code given and I can't really develop the game for you. :-) I think you'll do fine coding this on your own!
Jul 10 '12 at 09:28 AM
save
(comments are locked)
|

Downvote: