playMaker

Author Topic: Why there is no Type "Transform" in State Machine Variables ?  (Read 5385 times)

yuewah

  • Playmaker Newbie
  • *
  • Posts: 2
Why there is no Type "Transform" in State Machine Variables ?
« on: August 01, 2012, 10:29:50 AM »
Why there is no Type "Transform" in State Machine Variables ?

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Why there is no Type "Transform" in State Machine Variables ?
« Reply #1 on: August 01, 2012, 03:43:24 PM »
not sure i fully understand what you're aiming for... do you mean the vector3 variable (which will store x, y and z coordinates) which can be used to transform an object's position or more a thing to handle rotation (using a vector3 variable for the rotational offsets?)

or both?

yuewah

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Why there is no Type "Transform" in State Machine Variables ?
« Reply #2 on: August 01, 2012, 10:25:46 PM »
No, the unity class called Transform that contains both position, rotation and scale.

PIXELCRY

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Why there is no Type "Transform" in State Machine Variables ?
« Reply #3 on: January 02, 2013, 10:34:51 AM »
Hi sorry for upping this topic, i actually have same problem:

my script have this variable "   public Transform target;" from the inspector i can assign directly a gameobject
but when i try to use action "set property" on "target" i cant find a matching variable that can be used :(

kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: Why there is no Type "Transform" in State Machine Variables ?
« Reply #4 on: January 02, 2013, 11:35:07 AM »
when scripting you're always using the namespace UnityEngine. Go figure in which category the Transform is :P
(Tipp: in the object type selection first go to unityEngine and then select Transform from the long list that should appear.)
Best,
Sven

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Why there is no Type "Transform" in State Machine Variables ?
« Reply #5 on: January 02, 2013, 02:46:13 PM »
Hi,

 Yes FsmTransform is very much missing for me too, as well as FsmEnum to reference existing enums from various scripts and apis...

and FsmAudio while I am at it :)

bye,

 Jean

PIXELCRY

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Why there is no Type "Transform" in State Machine Variables ?
« Reply #6 on: January 03, 2013, 09:23:18 AM »
when scripting you're always using the namespace UnityEngine. Go figure in which category the Transform is :P
(Tipp: in the object type selection first go to unityEngine and then select Transform from the long list that should appear.)

I dont get your meaning, im using a NGUI script and i tried to change the variable from transform to gameobject, but i cant get it work.

kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: Why there is no Type "Transform" in State Machine Variables ?
« Reply #7 on: January 03, 2013, 09:35:11 AM »
I explained it on the mesh variable here:
http://hutonggames.com/playmakerforum/index.php?topic=2396.0

or alternatively I've got a one minute silent tut here :

It's the same principle for the transform. You can either use GetComponent and use an object variable of the type UnityEngine/Transform or you can use get Property on the gameObject with the transforms you want and save it to said UnityEngine/Transform variable.

This object variable will then be useable for the set Property action.
« Last Edit: January 03, 2013, 09:52:07 AM by kiriri »
Best,
Sven

PIXELCRY

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Why there is no Type "Transform" in State Machine Variables ?
« Reply #8 on: January 03, 2013, 10:26:34 AM »
oh awesome i didnt know it was possible! thank you

anyway i found an other way just create a new public game object variable and put it value in my transform variable

target = targetGO.transform;