playMaker

Author Topic: TargetPro and Arraymaker  (Read 4224 times)

spiral

  • Playmaker Newbie
  • *
  • Posts: 18
TargetPro and Arraymaker
« on: September 03, 2012, 01:36:49 PM »
Hi guys, this is my first post! my name is Juan and I'm from Argentina, so sorry if my english is not very good, my native language is spanish :)

I'm very happy with playmaker, and now I'm working with TargetPro and Arraymaker.

The problem I'm having right now, is that i couldn't find a way to access to the TargetPro's targetlist (the list generated with all the targets detected) in order to store all the targets in Arraymaker.

I tried using Get Event info and the TargetPro's integration from jeanfabre, but only stores one value (one gameobject) per action, and i need the complete targetlist (all the gameobjects detected)

PD: I sent a PM to Jeanfabre and he told me to create a new thread, so here it is :).

If someone know how to resolve this it would be great!

thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: TargetPro and Arraymaker
« Reply #1 on: September 04, 2012, 04:04:44 AM »
Hi,

 Yes, ArrayMaker integration within TargetPro is on my list of things to do, but wanted to get some user feedback before getting into this. Now that you are asking :)

First thing, are you aware that there is a "TARGETPRO / TARGETABLE / DETECTED" event fired every time an object is targeted? Check "PlayMaker Enemy" prefab and its fsm "Enemy", you'll see it, I use it to set the color and scale it up everytime it's targeted.

 I am saying that because I am no sure that having the list of gameObject is actually that useful. Could you explain the use case and scenario you are after once you get that target list in an array. I personnaly would simply act on this event.

bye,

 Jean

spiral

  • Playmaker Newbie
  • *
  • Posts: 18
Re: TargetPro and Arraymaker
« Reply #2 on: September 04, 2012, 03:35:56 PM »
Hi,

 Yes, ArrayMaker integration within TargetPro is on my list of things to do, but wanted to get some user feedback before getting into this. Now that you are asking :)

First thing, are you aware that there is a "TARGETPRO / TARGETABLE / DETECTED" event fired every time an object is targeted? Check "PlayMaker Enemy" prefab and its fsm "Enemy", you'll see it, I use it to set the color and scale it up everytime it's targeted.

 I am saying that because I am no sure that having the list of gameObject is actually that useful. Could you explain the use case and scenario you are after once you get that target list in an array. I personnaly would simply act on this event.

bye,

 Jean


Hi,

Yes i tried using "TARGETPRO / TARGETABLE / DETECTED" but only gives you one gameobject, so if you have two gameobjects tracking targets, the targetable gameobject will only detect one gameobject (with get event info).

The scenario is the next:

I want that every gameoject will be capable of tracking and been tracked. And every one have the capacity of store in arraymaker all the targets detected, so then i can work the targets with playmaker's actions.

Im using targetpro only for tracking, I would like that every gameobject could be capable of detect wich gameobjects have around it, and then interact with them randomly or intentionally.

Right now the targetpro's sorting method is very limited. I would like the gameobject could choose the targets more randomly, that´s why I use targetpro only for tracking and do the rest in playmaker.


Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: TargetPro and Arraymaker
« Reply #3 on: September 05, 2012, 04:07:13 AM »
Hi,

 I think it's because you only allow one target at a time, there is a setting that let you fire at several target at a time, then you will be able to achieve what you want basically, at least closer.

 I tried in my sample and it works, I have created lots of ennemies and increased the Target tracker "number of Targets" to a hight number and all targets did received the event all at the same time

 not trying to get away from making it into arrays :) but I think you should get in touch with the guys from target pro, I am positive they will give you the right advices and insight of how you can fine tune to achieve what you want and make the most out of target pro.

as for having each target know about each other, I think this is potentially a problem. Why would you want that? I am genuinely interested in this actually, because I pretty sure that the actual feature you wan to implement can actually be achieved without everyone knowing about everyone. If you want every object to be able to track AND be track, then each gameObject should have both a TargetTracker AND a TArgetable component. This is the usual set up for any ennemy for example, they fire at you or opposite teams AND can be hit of course.


as for other ways of target sorting, You should definitely submit that "random" sorting to the guys, it make sense. currently, to achieve this, I would do the following:

-- set the sorting style to "most powerful"
-- each target would have a script that random set the life

 You then end up with one way of sorting randomly.

bye,

 Jean

spiral

  • Playmaker Newbie
  • *
  • Posts: 18
Re: TargetPro and Arraymaker
« Reply #4 on: September 05, 2012, 02:21:53 PM »
Hi,

Thank you for your idea Jean, I will try it. I like the idea to search the "most powerful" with random life value.

I´m not doing a tower defense game, it´s more an interactive game.

Imagine a room with monsters that interact with each according to their preferences, for example, a tall monster will be more disposed to talk with another one of the same characteristics, but at the same time it have other characteristics like curiosity, jealousy, empathy, etc. Also it can change the mood of other monsters (to one or more targets). So its a complex sorting method.

This is the main reason why I want to integrate the targets to playmaker. I think if i don't do that, i will be always asking for sorting methods to you, to the forum or to the guys of TargetPro. :)


And I also think that make your own sorting method will be great for others guys that want to use TargetPro.


Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: TargetPro and Arraymaker
« Reply #5 on: September 05, 2012, 04:16:05 PM »
Hi,

 I think you should definitly talk about your idea to path-o-logical team because I am sure they will be interested to make the most out of targetPro.

 I am going to study the best way to implement this arrayMaker targetList, because it has to be efficient, I think I will have to create a proxy for the TargetTracker and not just the fireController ( so you can simply have a target tracker and no fire controller if you want to)

also, quick note: numberOfTargets should be set to -1 if you want to target them all ( within the perimeter settings of course)

bye,

 Jean

spiral

  • Playmaker Newbie
  • *
  • Posts: 18
Re: TargetPro and Arraymaker
« Reply #6 on: September 05, 2012, 04:57:09 PM »
Thank you Jean, yes i need to talk to targetpro's team, i think that a more flexible sorting method or "easy to make your own method" will be great for Targetpro.

I'm not a programmer, so for me the best solution was to ask for more integration of targetpro to playmaker, but in the end I think it could be useful for anyone and maybe for arraymaker too (think a proxy for accessing script's lists and automatic store it in arraymaker, would be great!)

And yes i think its better to do a proxy that don't involve "Firecontroller", because then you can choose when you want to fire (a determinate state for example) or simple store targets.

Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: TargetPro and Arraymaker
« Reply #7 on: September 05, 2012, 05:05:04 PM »
Hi,

 ok, I made an action ( attached to this post) so that you can get the list of gameObject targeted into an arrayList

 It's quite simple, you reference the TargetTracker, the arrayList and I made it so that you can store the actual Target class, but that means some extra actions that for now are not available (will be eventually) so I made an option to store the gameObjects ( it's true by default) so you get a convenient list of gameObject currently targeted ( remember set to -1 the "numberOfTargets" to get them all)

Tell me if that's suitable. You can then use the ArrayGetNext Action to then access all items and simply do things with them.

http://hutonggames.com/playmakerforum/index.php?topic=835.msg6941#msg6941

bye,

 Jean

spiral

  • Playmaker Newbie
  • *
  • Posts: 18
Re: TargetPro and Arraymaker
« Reply #8 on: September 05, 2012, 05:38:28 PM »
Wow, It just works beautiful!

Thank you Jean, fantastic job!