playMaker

Author Topic: [SOLVED] How to pass variable to newly created object.  (Read 2185 times)

ryf9059

  • Full Member
  • ***
  • Posts: 100
[SOLVED] How to pass variable to newly created object.
« on: June 10, 2013, 08:04:34 AM »
If I use createObject in FSM, the game will create a clone of that object when event triggered. Is there a way to set behavior of that particular created object like passing variables and so on? It's making a constructor with variables inside.
« Last Edit: June 11, 2013, 11:16:15 AM by ryf9059 »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How to pass variable to newly created object.
« Reply #1 on: June 10, 2013, 08:39:05 AM »
I generally store the created gameObject into a variable. You can then send it events and variables easily.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

ryf9059

  • Full Member
  • ***
  • Posts: 100
Re: How to pass variable to newly created object.
« Reply #2 on: June 10, 2013, 10:05:34 AM »
I generally store the created gameObject into a variable. You can then send it events and variables easily.

Can I use a little advance structure like array or list to store them? So I can manage then all.
« Last Edit: June 10, 2013, 12:21:10 PM by ryf9059 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to pass variable to newly created object.
« Reply #3 on: June 11, 2013, 01:29:25 AM »
Hi,

 Yes, you can use ArrayMaker to store many references in one place,

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

bye,

 Jean