[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 379: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/feed.php on line 173: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3906)
[phpBB Debug] PHP Warning: in file [ROOT]/feed.php on line 174: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3906)
Skyline Forums Skyline Game Engine Community Forums 2015-03-23T14:32:56+01:00 https://forum.aurasoft-skyline.co.uk/feed.php?f=52&t=918 2015-03-23T14:32:56+01:00 2015-03-23T14:32:56+01:00 https://forum.aurasoft-skyline.co.uk/viewtopic.php?t=918&p=4469#p4469 <![CDATA[Re: Steering Behaviours in Lua]]>
Possibly just make a baseclass and instantiate at the top of your script or inside the lua to do the same sort of thing :)

Statistics: Posted by SolarPortal — 23 Mar 2015, 14:32


]]>
2015-03-23T14:19:54+01:00 2015-03-23T14:19:54+01:00 https://forum.aurasoft-skyline.co.uk/viewtopic.php?t=918&p=4467#p4467 <![CDATA[Re: Steering Behaviours in Lua]]> Statistics: Posted by Shando — 23 Mar 2015, 14:19


]]>
2015-03-23T10:17:44+01:00 2015-03-23T10:17:44+01:00 https://forum.aurasoft-skyline.co.uk/viewtopic.php?t=918&p=4459#p4459 <![CDATA[Re: Steering Behaviours in Lua]]> Statistics: Posted by SolarPortal — 23 Mar 2015, 10:17


]]>
2015-03-23T04:33:32+01:00 2015-03-23T04:33:32+01:00 https://forum.aurasoft-skyline.co.uk/viewtopic.php?t=918&p=4456#p4456 <![CDATA[Re: Steering Behaviours in Lua]]> Statistics: Posted by Shando — 23 Mar 2015, 04:33


]]>
2015-03-19T14:32:26+01:00 2015-03-19T14:32:26+01:00 https://forum.aurasoft-skyline.co.uk/viewtopic.php?t=918&p=4388#p4388 <![CDATA[Re: Steering Behaviours in Lua]]> Statistics: Posted by StarFire — 19 Mar 2015, 14:32


]]>
2015-03-19T13:23:37+01:00 2015-03-19T13:23:37+01:00 https://forum.aurasoft-skyline.co.uk/viewtopic.php?t=918&p=4387#p4387 <![CDATA[Re: Steering Behaviours in Lua]]> Statistics: Posted by SolarPortal — 19 Mar 2015, 13:23


]]>
2015-03-19T12:45:46+01:00 2015-03-19T12:45:46+01:00 https://forum.aurasoft-skyline.co.uk/viewtopic.php?t=918&p=4386#p4386 <![CDATA[Re: Steering Behaviours in Lua]]> Statistics: Posted by Shando — 19 Mar 2015, 12:45


]]>
2015-03-19T12:36:11+01:00 2015-03-19T12:36:11+01:00 https://forum.aurasoft-skyline.co.uk/viewtopic.php?t=918&p=4385#p4385 <![CDATA[Re: Steering Behaviours in Lua]]> Statistics: Posted by SolarPortal — 19 Mar 2015, 12:36


]]>
2015-03-19T06:03:19+01:00 2015-03-19T06:03:19+01:00 https://forum.aurasoft-skyline.co.uk/viewtopic.php?t=918&p=4378#p4378 <![CDATA[Re: Steering Behaviours in Lua]]>
Well, I think that my code is now in a state where it can be donated to the Skyline Community 8-)

I have made a (very) quick video that demonstrates "Seek", "Follow" and "Obstacle Avoidance":



There are 3 files that I have put together (the links are to my own OneDrive account):

1) the main code (AI Steering Code.lua)
2) comments on how to use the main code (AI Steering Code - Comments on Usage.txt)
3) some example onInit functions (AI Steering Code - example init functions.txt)

At the moment, the full AI code needs to be added to every entity that needs to use it, but this will change with the next update, when we will be able to "include" a lua file in a script.

The AI uses some of Skyline's physics functions, so all entities will need to have Rigid-Body Physics or the AI code will not work.

If you have any questions, or problems with implementing, let me know and I'll try to help.

Shando

PS: to turn on the "feeler" rays as shown in the video, just uncomment "physics.rayDebugLines" in the "aiObstacleAvoid" function.
PPS: the code is not commented, but hopefully should be relatively easy to follow.

Statistics: Posted by Shando — 19 Mar 2015, 06:03


]]>
2015-03-14T14:48:45+01:00 2015-03-14T14:48:45+01:00 https://forum.aurasoft-skyline.co.uk/viewtopic.php?t=918&p=4267#p4267 <![CDATA[Re: Steering Behaviours in Lua]]>

Statistics: Posted by StarFire — 14 Mar 2015, 14:48


]]>
2015-03-14T12:06:22+01:00 2015-03-14T12:06:22+01:00 https://forum.aurasoft-skyline.co.uk/viewtopic.php?t=918&p=4255#p4255 <![CDATA[Re: Steering Behaviours in Lua]]>

Note: On Steering behaviors. Have a look at the "entity.inverseTransform()" to get the amount of steer you need to point at another object.

Statistics: Posted by SolarPortal — 14 Mar 2015, 12:06


]]>
2015-03-14T05:30:24+01:00 2015-03-14T05:30:24+01:00 https://forum.aurasoft-skyline.co.uk/viewtopic.php?t=918&p=4247#p4247 <![CDATA[Re: Steering Behaviours in Lua]]>

Statistics: Posted by ant0N — 14 Mar 2015, 05:30


]]>
2015-03-14T02:48:28+01:00 2015-03-14T02:48:28+01:00 https://forum.aurasoft-skyline.co.uk/viewtopic.php?t=918&p=4246#p4246 <![CDATA[Steering Behaviours in Lua]]> Statistics: Posted by Shando — 14 Mar 2015, 02:48


]]>