playMaker

Author Topic: Help with game mechanic  (Read 1372 times)

khrius86

  • Playmaker Newbie
  • *
  • Posts: 7
Help with game mechanic
« on: March 23, 2014, 01:08:51 PM »
Hi all, I am very new to playmaker and would appreciate it if you would be willing to help me get my head around a certain gameplay feature I wish to create for my game, I’m a total noob at playmaker and state machines, so the more information the better!

A quick breakdown of my gameplay feature.

* There are multiple enemies, we shall call them Yellow, Green and Blue.

* You can only kill enemies that are close to its own kind, for example.



If two yellow soldiers are near each other, but then a green soldier moves in between then, you can no longer kill the two yellow soldiers, so the system must be dynamic.

The enemies will appear randomly and in no particular order, how do I tell playmaker to notice when two or more of the same types of enemies are next to each other so that the player may kill them?

Thanks for any help, im truly at a loss here.

Flying Robot

  • Sr. Member
  • ****
  • Posts: 293
  • Od ton yebo redro
    • Flying Robot Studios
Re: Help with game mechanic
« Reply #1 on: March 24, 2014, 06:31:07 AM »
Hi,

The best bet is to put the soldiers in an ArrayList (ArrayMaker?) as they spawn and compare the neighbors from their index value.