playMaker

Author Topic: how to make a advanced Playmaker script to meet a specific need?  (Read 507 times)

DJ7705

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Hi I'm a Newbie to Playmaker but I know my way around Unity pretty well.
I'm trying to make a Playmaker script that causes a specific Turret in my scene to follow & track the mouse within a certain radius and to fire. But I'm having nothing but issues! I've tried looking online for a tutorial that could explain well and/or show how to accomplish that but haven't found any relevant tutorials towards this end. Can someone please either provide some sage-like advice or some links where I can find the info I need to accomplish this? Thank you in advance

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 731
    • View Profile
Re: how to make a advanced Playmaker script to meet a specific need?
« Reply #1 on: May 17, 2018, 10:54:09 PM »
Its hard to suggest without knowing exactly where you are.

However, I would start with using the "Smooth Look At Direction" action, as this will allow you to look at a vector or game object. I think it accepts a min/max value. So if over a value, you can stop moving it.

The vector you want to use is your mouse position. You may need to learn how to get screen to world space for this. (Mouse lives in screen space, but your gameobject lives in world space). Tutorial here:

DJ7705

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Re: how to make a advanced Playmaker script to meet a specific need?
« Reply #2 on: May 18, 2018, 02:36:57 PM »
Thank you so much tcmeric, I'll check that tutorial out hopefully it will help me Accomplish my goals!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14564
  • Official Playmaker Support
    • View Profile
Re: how to make a advanced Playmaker script to meet a specific need?
« Reply #3 on: May 22, 2018, 02:09:38 AM »
Hi,

 yes, try to study existing actions and work from there.

 then make sure you tackle one issue at a time and post here or new threads ( better)

Bye,

 Jean