playMaker

Author Topic: cant access the variable with Set Property  (Read 2453 times)

mrbdrm

  • Playmaker Newbie
  • *
  • Posts: 39
cant access the variable with Set Property
« on: June 27, 2012, 09:51:09 AM »
Hi
i have this script that i cant get to the footsteps var with set property

using UnityEngine;
using System.Collections;

public class SoundEffectController : MonoBehaviour {
   
   
   public AudioSource footAudioSource;
   public AudioClip[] footsteps;
   
   
   void OnFootStrike () {
      CharacterController cc = GetComponent<CharacterController>();
      float volume = Mathf.Clamp01(0.1f + cc.velocity.magnitude);
      footAudioSource.PlayOneShot(footsteps[Random.Range(0, footsteps.Length)], volume);
   }
}

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: cant access the variable with Set Property
« Reply #1 on: June 27, 2012, 09:57:54 AM »
Get/Set Property doesn't support arrays yet...  :(

This will come when Playmaker has native array support.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: cant access the variable with Set Property
« Reply #2 on: June 27, 2012, 11:13:05 AM »
Hi,

 Have you checked arrayMaker?
https://hutonggames.fogbugz.com/default.asp?W715

 bye,

 Jean