playMaker

Author Topic: Basic AI [SOLVED]  (Read 4083 times)

MeachWare

  • Playmaker Newbie
  • *
  • Posts: 43
Basic AI [SOLVED]
« on: February 07, 2014, 06:56:11 PM »
Starting to work on my basic AI I will (hopefully) use. This is just the beginning and I have a lot more planned but I'm already hitting a stumbling block :-(

Info:
Planets are tagged "Planet"
Fighters are tagged "Fighter1", "Fighter2" and "Fighter3"

My basic goal is after the trigger (enter/exit) is fired I save the Collider and then in the next state I check its tag. If it matches the tag set for each planet (e.g. Planet 1 uses Fighter1, etc) then it should SKIP the "Add Target" (or "Remove Target"), if no match then it processes either the "Add" or "Remove".

As it is now ALL targets go through the "Add" or "Remove". What I would expect is that on Planet 2 when I move "Fighter2" into the trigger it should not add it but it does.

I have also noticed:
1. DebugLogs set to Info don't display <- is this expected? I have to set them to Warning to have the show
2. When I DebugLog.Warning on my saved game object.tag is does not display which I fear is the root cause of the problem.

I'm going to take a break for a bit but hopefully someone has some insight as to my blunder  ;)
Here's a screenshot which hopefully helps:
got it...
« Last Edit: February 08, 2014, 07:50:24 AM by MeachWare »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Basic AI
« Reply #1 on: February 07, 2014, 07:28:11 PM »
If its always firing to Add Target then I would first confirm that the tag on the fighters are correct and the string for the MyFactionTag is correctly assigned.

Otherwise, can you attach that scene and the appropriate files so we could look at it?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

MeachWare

  • Playmaker Newbie
  • *
  • Posts: 43
Re: Basic AI
« Reply #2 on: February 07, 2014, 07:38:08 PM »
Thanks Lane - here's my first try at an export...


Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Basic AI
« Reply #3 on: February 07, 2014, 08:02:03 PM »
It seems to work, I can drag the enemy targets around and the target count updates correctly on the planets.

Seems like this is the intended behavior?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

MeachWare

  • Playmaker Newbie
  • *
  • Posts: 43
Re: Basic AI
« Reply #4 on: February 07, 2014, 08:09:02 PM »
Thanks for taking the time...

If you move the green fighter (Fighter3) into the green planet (Planet3) trigger it should not count it as such it should not go the "Add Target" path. Planet3 sets "MyFactionTag" to "Fighter3" and if my FSM worked as I intended it would hit the compare tag and be TRUE thus going to "Set Active" event.

My goal is to automate the launch of fighters from each planet based on the number of "targets" (enemies).

My next FSM will be for the fighters as they will have their own "trigger" functions to allow attacking and a few other behaviors I've sketched out. With the eventual goal to switch over to a Faction-based AI so instead of "Fighter3" it could be "Human" or "Vulcan", etc
« Last Edit: February 07, 2014, 08:17:00 PM by MeachWare »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Basic AI
« Reply #5 on: February 07, 2014, 08:26:18 PM »
The GO is not being set by Store Collider.

Add a Get Trigger Info and store them that way after the enter state.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

MeachWare

  • Playmaker Newbie
  • *
  • Posts: 43
Re: Basic AI
« Reply #6 on: February 07, 2014, 10:16:13 PM »
Thank you Lane, I'll give that a try tomorrow.  :)

UPDATE: Works..... awesome! Thank you again Lane. I looked at the Oomph kit and well let's just say I decided to start with something simple to get my bearings with PM.
« Last Edit: February 08, 2014, 06:03:08 AM by MeachWare »

MeachWare

  • Playmaker Newbie
  • *
  • Posts: 43
Re: Basic AI
« Reply #7 on: February 08, 2014, 06:06:49 AM »
Here's the updated working package for anyone following along.

One question: Should I consider the "Store Collider" function broken and report a bug or was I misusing it?

Thanks again

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Basic AI [SOLVED]
« Reply #8 on: February 08, 2014, 09:29:30 AM »
Ha, sorry yes Oomph is a little more advanced. Even when I go back to use it I have to step my way through the states and figure out why I did some things. ;)

I'm not sure why it didn't work, it appears to simply not be storing the collider so you could submit it as a bug. I would do some simpler tests to confirm before submitting though - just a scene that is as simple as possible with the minimum content required to reproduce the problem.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

MeachWare

  • Playmaker Newbie
  • *
  • Posts: 43
Re: Basic AI [SOLVED]
« Reply #9 on: February 08, 2014, 02:12:15 PM »
Okay cool - thanks and will do on the bug report.

Cheers!
 8)

Okay spent a bit more time on the Fighter AI... it's looking very interesting.... don't like the flicker when picking a new rotation but hey... it's not even a letter (e.g. alpha)  ;)
 :)
« Last Edit: February 08, 2014, 07:11:07 PM by MeachWare »