playMaker

Author Topic: Target pro+Touch Object Event [SOLVED]  (Read 4618 times)

HaraldsVeiss

  • Junior Playmaker
  • **
  • Posts: 68
Target pro+Touch Object Event [SOLVED]
« on: October 24, 2013, 07:16:20 AM »
Hello!

I have this problem, when target pro is activated on my turret, target pro's range isn't allowing me to use touch object event on turret. When I take target pro target trackers range off, than touch object event works when I touch the turret.

Any ideas how to work around this, so that range stay up and running and touch object event works as well.

Best,
Haralds
« Last Edit: October 31, 2013, 08:14:07 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Target pro+Touch Object Event
« Reply #1 on: October 26, 2013, 02:17:16 AM »
Hi,

 Sorry, I can't really make sense of this, what do you mean exactly by "Touch Object Event"? Do you mean PlayMaker System Events? or a PlayMaker action?

bye,

 Jean

HaraldsVeiss

  • Junior Playmaker
  • **
  • Posts: 68
Re: Target pro+Touch Object Event
« Reply #2 on: October 28, 2013, 11:09:42 AM »
Hi,

Oh, sorry. I meant Playmaker action. Tell me if I need to explain it more.

Best,
Haralds

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Target pro+Touch Object Event
« Reply #3 on: October 29, 2013, 02:38:03 AM »
Hi,

 Yes, if you can, cause I am lost at understand where the problem could be.

bye,

 Jean

HaraldsVeiss

  • Junior Playmaker
  • **
  • Posts: 68
Re: Target pro+Touch Object Event
« Reply #4 on: October 29, 2013, 04:57:52 AM »
Hi,

Ok, I will try to make better sense of it.

1. I'm making a tower defense game. When player wants to upgrade tower he needs to touch the tower and then menu will pop out with possible options. For this I set up touch object logic from Playmaker actions on the turrets.

2. I am using target pro on my turrets. I did set the range up in target racker script.

3. The problem is, when target tracker script's range is active within this range I can't touch the turret, the menu wont pop out. When I create 2 turrets, 1st with target tracker range on, 2nd turret with range off, when 2nd turret is in range of 1st turret touch won't work, when I move 2nd turret out of range it works.

4. The same problem is with placing turrets. If platform, where I want to place the turret, is in range of an existing turret with target trackers range on I will not be able to place it. And again, when I move the platform out of range I am able to place turrets.

If I wasn't able to make sense of it then tell me, I will try to explain it better.

Best,
Haralds

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Target pro+Touch Object Event
« Reply #5 on: October 29, 2013, 05:19:01 AM »
Hi,

I think you may have a conflict with your colliders, I think you should use the raycast action and properly filter by layer ( put your turret collider component on a specific layer, that you create for the occasion), then the raycast action will only scan the world for this layer, and you will hit for sure even if other colliders are in the way.

You could also study this examples:

http://hutonggames.com/playmakerforum/index.php?topic=4590.msg25421#msg25421

 ignore the Input.touches framework if you don't have it, simply study how the touch pick was performed using screenpick.

So try screenpick too to see if that works.


bye,

 Jean

HaraldsVeiss

  • Junior Playmaker
  • **
  • Posts: 68
Re: Target pro+Touch Object Event
« Reply #6 on: October 29, 2013, 05:21:49 AM »
Hi,

Ok I will try that out and let you know how it worked out.

Thank you for helping!

Best,
Haralds

HaraldsVeiss

  • Junior Playmaker
  • **
  • Posts: 68
Re: Target pro+Touch Object Event
« Reply #7 on: October 31, 2013, 07:19:55 AM »
Hi,

Thank you jeanfabre. Your suggestion worked, now everything works perfect! It took me a while to get a hang on it, but now this system is much better than my previous one!

Best,

Haralds

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Target pro+Touch Object Event
« Reply #8 on: October 31, 2013, 08:13:57 AM »
Hi,

 Very good! I am glad it was helpful,

bye,

 Jean