playMaker

Author Topic: How to convert GameObjecto to String???  (Read 4802 times)

PolyMad

  • Hero Member
  • *****
  • Posts: 553
How to convert GameObjecto to String???
« on: May 09, 2013, 12:57:19 PM »
There's no action for this???  :o

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How to convert GameObjecto to String???
« Reply #1 on: May 09, 2013, 01:11:04 PM »
Get Name

I don't see how a gameobject could be a string other than its name, so this serves that purpose.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

PolyMad

  • Hero Member
  • *****
  • Posts: 553
Re: How to convert GameObjecto to String???
« Reply #2 on: May 09, 2013, 01:36:06 PM »
Thank you!

I wonder why they didn't do call it like all the other conversion actions: CONVERT GAMEOBJECT TO STRING  ::)

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How to convert GameObjecto to String???
« Reply #3 on: May 09, 2013, 01:46:35 PM »
Because a game object cannot be a string. It can only contain a name, which coincidentally is a string.

So you can't technically convert it to a string like you could a float, or int, or bool as those are already text based.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

PolyMad

  • Hero Member
  • *****
  • Posts: 553
Re: How to convert GameObjecto to String???
« Reply #4 on: May 09, 2013, 01:54:54 PM »
Mhhh I see what you mean.
The gameobject name is the container of the data, and its data can't be converted to a string, differently from all other variable types  ;D

But on another point of view, if I have a variable named HIT OBJ and this variable contains gameobject BUILDING_01, I have 2 types of data identified by that object: the object data itself, which is complex, and its name.
So it wouldn't be so wrong to call it conversion as well, I think.
Like CONVERT GAMEOBJECT NAME TO STRING in example.
« Last Edit: May 09, 2013, 02:00:57 PM by megmaltese »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: How to convert GameObjecto to String???
« Reply #5 on: May 13, 2013, 05:41:01 AM »
Hi,

 but the gameObject name IS a string already. Simply use the action "GetName"

https://hutonggames.fogbugz.com/default.asp?W444

bye,

 Jean