Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: t4d on April 20, 2016, 01:11:40 AM
-
basicly I want a falling object (player) that i can control by adding force to it as it falls is there a better way to do this ?
if i create the object at run time as a prefab and uses add Force action or Set Velocity the action gives me a message wanting to added a Rigidbody to a prefeab that already has a Rigidbody ?
if i do this all without Prefab and just add the actions at runtime i get these error messages
any help would be very much appeciated. :)
------------------------------------------------------------------------------------------
Can't add script behaviour PlayMakerFixedUpdate. The script needs to derive from MonoBehaviour!
UnityEngine.GameObject:AddComponent()
PlayMakerFSM:AddEventHandlerComponent(HideFlags)
PlayMakerFSM:AddEventHandlerComponents()
PlayMakerFSM:Init()
PlayMakerFSM:Awake()
---------------------------------------------------------------------
NullReferenceException: Object reference not set to an instance of an object
PlayMakerFSM.AddEventHandlerComponent[PlayMakerFixedUpdate] (HideFlags hide)
PlayMakerFSM.AddEventHandlerComponents ()
PlayMakerFSM.Init ()
PlayMakerFSM.Awake ()
-
Hi,
It's likely due to the fact that the variable "lander Object" is not null at the time you create this action.
make sure it's null.
tip: turn "debug" on at the very bottom of the State stack, you'll see the current value of variables. if it's not null, then what is the GAmeobject references, and you'll find that it's likely missing a Rigidbody.
Let me know if that was the problem, else we'll investigate further.
What version fo Unity and PlayMaker?
Bye,
Jean
-
Thanks Jean
sorry for the muilt posts
I didn't have the Globals Object as a null and didn't have my FSM off the main object
Thanks Your a Legend Jean 8)