playMaker

Author Topic: iTween value to  (Read 3119 times)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
iTween value to
« on: October 19, 2014, 07:09:30 PM »
hi,
i would like to have an action for a line in this script i made :

Code: [Select]
using UnityEngine;
using System.Collections;

public class ValueTo : MonoBehaviour {
public int int1 = 0;
public int int2 = 100;
public GUIText scoreDisplay;

void OnMouseDown(){
//go from value 1 to value 2:
//this next line i would like to have a playmaker action for
iTween.ValueTo(gameObject, iTween.Hash("from",int1,"to",int2,"time",6,"onUpdate","UpdateScoreDisplay","easetype","easeOutBounce"));

}

void OnMouseUp(){
}

void UpdateScoreDisplay(int newScore){
scoreDisplay.text = "Score: " + newScore.ToString();
}
}

i tried to make it myself but i'm getting an error you can check it in this topic

this would be very useful for me can can be usefull in many ways :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: iTween value to
« Reply #1 on: October 20, 2014, 07:22:32 AM »
Hi,

 Replied on your thread, basically use the action "HOTween int" to get the job done.
 
Bye,

 Jean

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: iTween value to
« Reply #2 on: October 20, 2014, 09:23:11 AM »
i don't have HOTween...
do you have an idea whats wrong in my script?

my project is almost done and would like to use that action.

pls check other thread

thx in advace