playMaker

Author Topic: Material name?[SOLVED]  (Read 4057 times)

cursed1

  • Playmaker Newbie
  • *
  • Posts: 8
Material name?[SOLVED]
« on: December 03, 2013, 04:04:26 AM »
i have four numbers textures/material and four cube
 set random material cube fsm
but i don't know  how to get  number when click the any cube 
pls help
« Last Edit: December 09, 2013, 01:32:18 PM by jeanfabre »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Material name?
« Reply #1 on: December 03, 2013, 07:36:45 AM »
After you use Mouse Pick and store the game object, use the Get Material action to get the material on that object.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

cursed1

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Material name?
« Reply #2 on: December 03, 2013, 08:20:27 AM »
ok i use  get material but variable is material
i need  convert material to int  :D
because random number on random cube
i want
result = clicked cube texture number + clicked cube texture number
 
how to make it
sorry my english
thanks for help

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Material name?
« Reply #3 on: December 03, 2013, 08:40:58 AM »
Hmm... Maybe someone else knows how but as far as I know you can't do that - at least not that way.

Perhaps you could store the materials as variables before you use them in the random set, name the variable the number you want and then getting the material would return their name as the numerical position.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Material name?
« Reply #4 on: December 04, 2013, 05:11:16 AM »
Hi,

 use a hahstable or an arraylist to maintain a list of your materials, then you can reference a particular material by its index in the the list or by its key ( string)

Use ArrayMaker for this.

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

bye,

 Jean

cursed1

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Material name?
« Reply #5 on: December 05, 2013, 03:29:06 PM »
thank you
« Last Edit: December 06, 2013, 09:56:54 AM by cursed1 »