playMaker

Author Topic: Projecting behaviour (AI) of minions [SOLVED]  (Read 2557 times)

fokuspace

  • Playmaker Newbie
  • *
  • Posts: 4
Projecting behaviour (AI) of minions [SOLVED]
« on: March 06, 2016, 07:04:33 AM »
Hi!
I wan't to program behaviour of minions/workers. They have 2 (in future 3 or more) behaviours: Idle/wandering (when they going around in random positions, simply creating Empty, move towards, and then delete Empty), and Collecting, when on trigger event they go for pickup and temporary just by now, destroing that pickup.

When they collect pickup, and no other pickup is near, they go again in wandering state.

I have 3 FSMs on worker/minion: Behaviour, Wander and Collect. They talk to each other by global events.

After few days (!) I can't figure it out, how to do it. I think, I must missing something obvious, because FSMs standalone works well. Ok, 2 of them: Wander and Collect. I can't make Behaviour FSM to do his job.

I was trying and test almost everything what I can imagine. Fliping every "Every frame" in every configurations, trying debug, looking for clues in Variables in inspector and so on. I try to put every trigger actions on separate states, and today I end up with big (to big for this kind of simple logic switch) mess. :'(

Please, give me some advice, tutorial link or just draw the graph. Thank You!
/sorry for bad english
« Last Edit: March 08, 2016, 07:16:50 AM by fokuspace »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Projecting behaviour (AI) of minions
« Reply #1 on: March 06, 2016, 12:58:13 PM »
Hi,
Can you make a video of what you have so far?
When you make a video also show the fsm's and actions.
Also show what is working and what is not working.

fokuspace

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Projecting behaviour (AI) of minions
« Reply #2 on: March 06, 2016, 02:24:29 PM »
Hello! I will try to do it later. For simplicity all I need is a kind of switch with collider trigger. If minion have something inside collider - just start first set of actions. If he does not - just start another set of actions. If "set of actions" ends, all procedure starts again.

I dont know how to properly set Trigger Events and Object Is Null, because it must be done somehow whith that actions.

I will try at least make some screenshots today.
Thank You.

fokuspace

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Projecting behaviour (AI) of minions
« Reply #3 on: March 07, 2016, 09:23:58 AM »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Projecting behaviour (AI) of minions [update: video]
« Reply #4 on: March 07, 2016, 02:30:57 PM »
Hi,
You should try to do as much as possible in one fsm because later on you might get Latency issues when you use many little fsm's (i learned that the hard way :) )

is this the behavior you are looking for?


fokuspace

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Projecting behaviour (AI) of minions [update: video]
« Reply #5 on: March 08, 2016, 07:16:24 AM »
Wow! Works like charm! Thank You!