Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: mrbdrm on June 27, 2012, 09:51:09 AM

Title: cant access the variable with Set Property
Post by: mrbdrm 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);
   }
}
Title: Re: cant access the variable with Set Property
Post by: Alex Chouls 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.
Title: Re: cant access the variable with Set Property
Post by: jeanfabre on June 27, 2012, 11:13:05 AM
Hi,

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

 bye,

 Jean