playMaker

Author Topic: How to assign Custom action script  (Read 1257 times)

TifaOng

  • Playmaker Newbie
  • *
  • Posts: 10
How to assign Custom action script
« on: January 08, 2014, 03:04:41 AM »
I want to write a custom action script, example kick the ball in a direction. How to assign the custom script? For example,

void KickBall()
{
    ball.rigidbody.velocity = moveDirection.normalized * speed;
}

What is needed to be done in the PlayMaker UI? For example, drag and drop what to public variable, etc.

Thanks!
« Last Edit: January 08, 2014, 04:05:30 AM by TifaOng »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to assign Custom action script
« Reply #1 on: January 24, 2014, 07:24:21 AM »
Hi,

 You should inspire from existing actions to create this one, this is always how I write custom actions, I never starts from scratch.

also, in your case, I don't see the need for a custom action, as everything can be done just fine with existing actions.

 Are you struggling to do this in PlayMaker?

bye,

 Jean