playMaker

Author Topic: [Done]Playmaker UFPS  (Read 6330 times)

bloodymin

  • Playmaker Newbie
  • *
  • Posts: 31
[Done]Playmaker UFPS
« on: August 19, 2013, 01:35:54 AM »
Can anyone help me to have fire event in playmaker.

I just want simple fire action

Something like onEnter and onUpdate fire action. 

Fire action come from vp_shooter.cs with "tryfire"function

I am not good at coding so I stuck on almost five they or anyone tell me to what is wrong with my code
Code: [Select]
using UnityEngine;
using System.Collections;
using HutongGames.PlayMaker;



[ActionCategory("UFPS")]


public class Shoot_target : FsmStateAction
{

[RequireComponent(typeof(vp_Shooter))]

protected vp_Shooter M_Shooter = null;


void Start()
{
m_Shooter = GetComponent<vp_Shooter>();
}

public override void OnEnter()
{
m_Shooter.TryFire();

Finish();
}


}
« Last Edit: August 19, 2013, 02:51:47 AM by bloodymin »

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Playmaker UFPS
« Reply #1 on: August 19, 2013, 01:53:44 AM »
Why not use the invoke Method action?
Script control tutorial -

bloodymin

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Playmaker UFPS
« Reply #2 on: August 19, 2013, 02:51:27 AM »
Thx done!
T.T
I'm so stupid not to come up with your suggestion
I used it my previous project how come i completely forgot it :(

Anyway Thankyou !!