Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About newton0922

  • Rank

Profile Information

  • Gender
  • Location:
  1. and try but the animation is what makes me automatically reproduced single boolean always try like you said
  2. hi guys someone people can explain me how can play one animation only once? i search in the net but no found how play une animation only once please someone can explain me with a javascript?
  3. say : Failed to call function OnMouseDown of class Shoot
  4. hi guys I need your help with a script I'm trying to create I'm making a game like that for my moba player shoot have to click the enemy (minion) but when clicking, I get error function to call, I'm working with javascript here is my script: #pragma strict var Minion : GameObject; var projectile : Rigidbody; var speed = 20; function Start () { } function Update () { } function OnMouseDown (Minion : GameObject){ if( Input.GetButtonDown( "Fire1" ) ) { var instantiatedProjectile : Rigidbody = Instantiate( projectile, transform.position, transform.rotation ); instantiatedProjectile.velocity = transform.TransformDirection( Vector3( 0, 0, speed ) ); Physics.IgnoreCollision( instantiatedProjectile. collider, transform.root.collider ); } }
  5. someone will have a script for the enemy patrol and if you see me (player) attack me and been trying to make one but nothing gives me many errors and I searched the net but have had no luck. support for the enemy ai I've been learning some java script, leave my script for you to see and if they find several erroes please let me know my script: # pragma strict var targetCollider: GameObject; var targetBoolean: boolean = false; var enemy: GameObject; var Attack: AnimationClip; // Deve equal the name of the animation var Idle: AnimationClip; // Idle animation var Run: AnimationClip; // animation run var speed: float = 5f; var wp1: GameObject; var wp2: GameObject; var wp3: GameObject; var WP4: GameObject; function Start () { } Update function () { if (targetBoolean == true) { Debug.log ("I see"); animation.Play ("Attack"); // remember the name of the animation as animation clip arrives } else { Debug.log ("pa where you left"); animation.Play ("Idle"); // idle animation } if (targetBoolean == false) { Enemigo.transform.position = Vector3.Lerp (Enemigo.transform.position, wp1.transform.position, Time.deltaTime * speed); } } OnTriggerEnter function (targetCollider: Collider) { targetBoolean = true; } OnTriggerExit function (targetCollider: Collider) { targetBoolean = false; }
  6. hello introduced me, I am newton rep.dom but live in usa, I come to this forum with the intention to help as you can and be helping.
  7. ok tank, and if I want it moved per second at a speed * time I put? and I make a var of type float time?
  8. yes, or whatever it is I want to see how it's done I'm learning to use java script unity
  9. I want to move a gameobject to the position of an object
  10. Hi guys !!!! Step over here to help me because in unity forum leave me not to publish my question could someone tell me how to do that or gameobject moves to another object (the coordinates of the other object)? someone could make me an example using java script?
  • Create New...