From NPC combat to path following and all AI related tasks.

Characters and AI

Characters and AI

Postby TattieBoJangle » 26 Jan 2015, 05:04

Hi Guys i am looking for some info i am having trouble getting my AI to walk on the ground and act like AI and anytime i try and add the controller when i move the character moves this is great if i want to use him as the player but i want him to be the AI and walk around and stuff all the collision is correct and what not.
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: Characters and AI

Postby SolarPortal » 26 Jan 2015, 14:15

Character Offset
On the action properties for SCC and PhysX Player Controller, there is a property called offset.
This takes 3 values for "x y z". On the Y value, set the value to say, -1.0 and see if this moves your character closer to the ground.
Leave the X and Z values as 0 for this instance.

Here is an image to help.

Image

This can also be applied to the Simple Character controller action aswell.
If you spawn a character, then there is a command to set the offset there.

AI
Another one of our users had problems with there AI aswell.
A character that is scaled down from a large size using the gizmo or translation panel can make the AI do weird things, instead you need to use the mesh editor and import your character into there and rescale the base meshdata.

Quick Tutorial:
> Open the Mesh Editor from toolbar or menu
> Open or Import the character into the mesh editor using the toolbar buttons.
> Open the Mesh File Editing property header and change the Scale Offset into “0.01 0.01 0.01” (or whatever valid value scales your character into range) and hit return.
> Now press the save button to save back to the mesh and skeleton file. (Skylines unique feature of being able to scale skeletons while keeping animations intact :D ).
> Press the reload sceneEntity button in the editor
> Reset scale property or translation Panel uniform scale to 1
> Your AI should be good to go now.

This really should be made into a tutorial on the wiki, as it seems to affect alot of users.

Hope this helps :D
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Characters and AI

Postby StarFire » 26 Jan 2015, 14:19

The FPS Template has AI Orks you could use as an example if this is a script related issue.
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Characters and AI

Postby TattieBoJangle » 26 Jan 2015, 22:25

Hi guys this is more the problem i am having the AI is becoming the player and when i take the controler out he dosent move i need him to be AI and not the player do you have any ideas :)

User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: Characters and AI

Postby StarFire » 26 Jan 2015, 22:32

To help better we need to know:

Which action's do you have on the AI Npc?

What is the micro script?

even better If you could post your scene to us and we can take a look at it for you. ;)
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Characters and AI

Postby TattieBoJangle » 26 Jan 2015, 22:42

"Idle" "Walk" "Run" "Jump" "Attack1"

The micro script is just the AI script to see if the characters work :)

https://www.dropbox.com/s/u1azx3xi6v5fs8z/Test.xSkyScene?dl=0
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: Characters and AI

Postby StarFire » 26 Jan 2015, 22:48

Ok thank will respond very soon just checking it out. Looks close for reading no documentation ;)
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Characters and AI

Postby StarFire » 26 Jan 2015, 22:50

mini tutorial on its way ;)
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Characters and AI

Postby TattieBoJangle » 26 Jan 2015, 22:51

Many thanks :)
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: Characters and AI

Postby StarFire » 26 Jan 2015, 22:54

for now try removing the player controller action and enable the micro script. Tutorial nearly ready :)
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Characters and AI

Postby SolarPortal » 26 Jan 2015, 23:04

looks like you need to remove the "physx player controller" from the orc.

Fix on current character:
Step 01) To fix this, select the character in the scene; right click and choose "Action - Editor".
Image

Step 02) When opened, select the Physx Player Controller from the Right list and press the arrow pointing left(left button).
Image

This will remove the action.

Step 04) Next enable the microscript

Image

and then edit it

Image

Step 05) Change the animations to match your characters. Since the AI is programmed in lua, the animations need specified in lua.
Image


If you want to start from scratch.

Step 01) RMB+Click in the scene and go to "Dynamic Objects->FPS Kit: NPC", perhaps you added the player version.
Image

Step 02) Then change the mesh to the new character.
Image

Step 03) Apply physics offset etc...
Image

Step 04) Open and enable Microscript, and change the names of the animations inside the script.
(this is the same as the script image above).

Hopefully this will fix your problem. :D

Remember, this is an FPS AI, so for a melee AI. It will need programmed further.
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Characters and AI

Postby SolarPortal » 26 Jan 2015, 23:07

moving this topic to "Skyline User Support > AI", for better organising :)
[MOVED]
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Characters and AI

Postby TattieBoJangle » 26 Jan 2015, 23:27

Works great :) will just need to work out how to get him to attack with his axe but i don't see anything in the LUA about attacking.

Many thanks for the TuT :)
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: Characters and AI

Postby StarFire » 26 Jan 2015, 23:31

Cool :D

To attack you will need to modify the script, there is an event function called shoot() that gets called when the npc shoots.
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Characters and AI

Postby TattieBoJangle » 11 Mar 2015, 00:15

In the character settings i see there is a setting for the camera to orbit the player if untouched for so long great feature btw but does it work just now or will it be added later.
Case: CM Storm Trooper CPU: I7 5930k X99 Cooler: Noctua NH-D15 Graphics: Asus GTX 1080 Motherboard: Rampage Extreme V x99 Ram: RipJaws DDR4 3000mhz Storage: x2 SSD Crucial 500GB + x5 2TB Hdd PSU: Evga 1500w OS: Windows 10
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: Characters and AI

Postby SolarPortal » 11 Mar 2015, 10:26

it is not added yet, but the camera system is now more advanced and we could build this feature into the camera entity instead to keep the system more modular and therefore more expandable. :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Characters and AI

Postby TattieBoJangle » 23 Aug 2015, 21:47

Hi guys any idea what the issue is with the new scripts its as if when i get close i am tangled in its web so to speak haha as i walk backwards i drag it with me. Also not sure whats wrong with the run animation as the character does not have a run animation only walk so i set it to walk it also does it if i say do not use.




***EDIT***

Also the this one not sure why its crashing skyline :cry: it also doesn't go back to the proper animation like say he runs up to me i hit the zombie and run away he should go back to run/walk animation well he just hovers toward you with no animation :o hope this helps you catch the little bugs other that that the scripts are great :D



***EDIT***

It must have something to do with the hitbox or damage as it wont crash it i just let the zombie kill me over and over but when i try and kill him that's when it crashes.

***EDIT***

When using the FPS with the script it doesn't work properly also you get a crash as soon as you try and shoot the zombie.

Case: CM Storm Trooper CPU: I7 5930k X99 Cooler: Noctua NH-D15 Graphics: Asus GTX 1080 Motherboard: Rampage Extreme V x99 Ram: RipJaws DDR4 3000mhz Storage: x2 SSD Crucial 500GB + x5 2TB Hdd PSU: Evga 1500w OS: Windows 10
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: Characters and AI

Postby StarFire » 24 Aug 2015, 12:40

Ok a few things to check, make sure the detection flags are correctly.
The fps player is set to 2 so zombie prey flag should be set to 2 also use the zombie fps script.

btw you have got the new skyline exe and fps player preset, released yesterday?

Check your capsule by using the scene setting physic debug flag, as the spiders capsule may be incorrect. Also play with the turning speed property and detection ranges as the spider should be fine.

Probs best to sling me the presets and other files so I can have a look for you and see what wrong for you. ;)
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Characters and AI

Postby StarFire » 24 Aug 2015, 15:07

We have tried on another pc and setting you should need:

FPS - set the zombie's: ( set these to default in an updated script )
turning_speed to 400
attack_range to 200 or more this will make the zombie damage the fps player
Prey_flag to 2
Updated fps player preset.

the only problem we encountered was that once the player was KO and then respawned the zombies would not re-attack. will fix this.
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Characters and AI

Postby TattieBoJangle » 24 Aug 2015, 21:37

Had some time to play around with the zombie and I still get the crash the zombie wont see the player well he does as he triggers but then wont go after him, I looked at the flags and all seems ok also the crash when I try and shoot the zombie is unusual and also I am using the new exe ;)

Case: CM Storm Trooper CPU: I7 5930k X99 Cooler: Noctua NH-D15 Graphics: Asus GTX 1080 Motherboard: Rampage Extreme V x99 Ram: RipJaws DDR4 3000mhz Storage: x2 SSD Crucial 500GB + x5 2TB Hdd PSU: Evga 1500w OS: Windows 10
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: Characters and AI

Postby SolarPortal » 25 Aug 2015, 09:39

Instead of opening the script to check the properties, have you checked the dynamic properties tab as this can hold different properties as to what is found within the script.

You can find this in the row of 3 icons in the top of the property panel, the middle one holds the dynamic properties.
Please check the settings you looked for in this section as well.

Also there is no need to check the FPS player as this is already set up :D

It is strange why it crashes when shot. Have you tried a different zombie mesh perhaps?
Please could you package your scene and that zombie and send it our way? then we can test to see if the crash exists on our end as all the tests we have tried seem to be working. Perhaps it is something specific.

Thanks again and we will get to the bottom of this :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Characters and AI

Postby lordalmighty1 » 25 Aug 2015, 11:15

ok, I think I will leave all this alone for awhile. I'm crap and don't know what or how I'm ment to do any of this stuff lol..
and as tattie is having issues i think it best i don't mess with it sadly lol.. :(
i know i know I'm to stupid haha if there was voiced tuts from start to finish i would probably still screw it up lol.

when will the patch become an update automatic with skyline?
because i hate adding folders to softwares and alike lol, sorry.
User avatar
lordalmighty1
Skyline Moderator
Skyline Moderator
 
Posts: 442
Joined: 02 Jan 2014, 12:13
Location: uk
Skill: Great creative
Skill: Level Designer

Re: Characters and AI

Postby SolarPortal » 25 Aug 2015, 11:45

there is a bit of work to do for the next auto update and it involves a 4 version number which will help with these patches you are asking for and will stop the add this folder here etc... just getting over an illness at the moment and then i can focus fully on it again :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Characters and AI

Postby StarFire » 25 Aug 2015, 15:47

We will focus on getting the auto update back and put down the object pool feature ( unlimited scene entities - memory efficient) SPs flu has knocked him for 6 but he is back at the workstation. We would have like to get the pool and a few other features released but this was taking a bit more time than we hoped and the temp exe were only to get a few of the user requests out to you.
There came another problem with the update version numbers, we hit a snag with minor/build patches which need to be fixed to give us more numbers for updates otherwise we would hit version 1.0 way tooo sooon :shock:
Please bear with us and we should get the update, updating with a new build number.

@LA I PMed you some fully setup zombies who will still work with the melee player ( exe needed for the fps player ) but this will be in the update asap ;)

@Tatty SP will have a look at the frame thing for you after the update is back online as I make sure he can make it a simpler process. ;)

I will look at getting the Character editor at least to a point where it will just add the required scripts to your character without too many mouse clicks ;)

Sorry guy for any inconvenience :oops:
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Characters and AI

Postby StarFire » 25 Aug 2015, 16:09

Tatty, just had a look at the new video.

Note 1: You will need to use the dynamic properties to change the values on the zombie no need to open the script. The dynamic properties it the little cog icon at the top of the entity property panel. By setting the attack distance to 2 and detection prey flag to 2.

Note 2: I noticed that the player is the old fps preset you will need to use the fps player from the script post and overwrite the one in your current preset folder. ( this new preset has a damage action and some extra script )

This should make it work for you, I hope lol ;)
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Next

Return to AI

Who is online

Users browsing this forum: No registered users and 1 guest