-
Your shopping cart is empty!
Had some time to settle down and get some of the character scripts developed. Spent some time on the animal evade script, I had made one in the past but some how it wandered out of my library and got lost. But this was for the best as I had the chance to re-write it and made a better version that could easily be changed into a predator chase script.
So the main thing for an evasion script is to be able to first detect the closest predator target and then through some vector magic be able to steer the character controller in the opposite direction to the chasing turning direction. This ensures that the evading animal always moves out of reach of the predator.
Here is the magic formula for the evade turning, the var turnVal is used in an entity.turn(..) command.
Lua:
tx,ty,tz = entity.inverseTransform(obj, entity.getPosition(predatorID));
turnVal = turnBoost*50*tx*chase_evade_Flag;
The chase evade flag sets whether to turn away or turn towards predator. ( this is used in the Zombie see down the page)
To see how this is done in Skyline please have a watch of this video:
As part of the character scripting I have written a special version of a predator script based on a variation of the animal evade script, where the character will turn towards a target character and move into attack. A fun turn of events can be had by setting two characters to different query and sensor flags so that they detect and attack each other. I have made a video showing how to set up the zombie script and how this can be used to make a villager character also attack the zombie.
Have a look at the video and watch these two slug it out.
Both these scripts will be available with a patched skyline.exe so you guys can get playing. Last job on the zombies is to get them to attack the FPS player, I will keep you informed on this progress.
11 Comment(s)
I will right away grab your rss as I can’t to find your email subscription link or newsletter service. Do you have any? Kindly let me understand in order that I may just subscribe. Thanks.
These are genuinely wonderful ideas in concerning blogging. You have touched some pleasant things here. Any way keep up wrinting.
Hello my loved one! I want to say that this article is amazing, nice written and include almost all significant infos. I would like to peer more posts like this .
Thank you for the auspicious writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! By the way, how could we communicate?
I every time emailed this website post page to all my contacts, because if like to read it next my links will too.
Ahaa, its fastidious dialogue concerning this paragraph at this place at this web site, I have read all that, so at this time me also commenting here.
I simply could not depart your site before suggesting that I really loved the standard info a person supply to your visitors? Is gonna be back regularly to investigate cross-check new posts
I visited several websites however the audio feature for audio songs present at this web page is really wonderful.
I will immediately grasp your rss as I can’t to find your email subscription link or newsletter service. Do you’ve any? Please let me know so that I may just subscribe. Thanks.
I truly appreciate this post. I have been looking all over for this! Thank goodness I found it on Bing. You have made my day! Thank you again!
These are truly impressive ideas in concerning blogging. You have touched some good factors here. Any way keep up wrinting.
Leave a Comment