Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink

You are not connected. Please login or register

Unity Ninja Unity 3D Forum » FREE Project Downloads & Recources » Scripts » player plays animation on trigger enter

player plays animation on trigger enter

View previous topic View next topic Go down  Message [Page 1 of 1]

1 player plays animation on trigger enter on Wed Feb 19, 2014 8:36 am

NXTGenerationsTv


Member [Lv. 3]
Member [Lv. 3]
Code:
var Player : GameObject ;
var slideaudio : AudioClip;
function OnTriggerStay (other : Collider) {
if (other.CompareTag ("Player")){
Player.animation.Play("hint").speed = 0.1;

}
}
this could be helpful for cutscenes and also for simple parkour movement .... but u its really simple it just should give an idea on how it could be done

View user profile

aj2001jkj


Member [Lv. 2]
Member [Lv. 2]
Skype?
I need help With animations for an fps

View user profile http://youtube.com/user/AttackableGamingHD

3 Re: player plays animation on trigger enter on Sun Mar 23, 2014 12:02 pm

NXTGenerationsTv


Member [Lv. 3]
Member [Lv. 3]
aj2001jkj wrote:Skype?
I need help With animations for an fps
what kind of help ... maybe i can give u some

View user profile

aj2001jkj


Member [Lv. 2]
Member [Lv. 2]
NXTGenerationsTv wrote:
aj2001jkj wrote:Skype?
I need help With animations for an fps
what kind of help ... maybe i can give u some

Hard to explain... Please skype me so i can try to explain

View user profile http://youtube.com/user/AttackableGamingHD

NXTGenerationsTv


Member [Lv. 3]
Member [Lv. 3]
aj2001jkj wrote:
NXTGenerationsTv wrote:
aj2001jkj wrote:Skype?
I need help With animations for an fps
what kind of help ... maybe i can give u some

Hard to explain... Please skype me so i can try to explain
added you

View user profile

aj2001jkj


Member [Lv. 2]
Member [Lv. 2]
ok. i couldnt find your request on skype. Nevermind i solved it. The new unity animation system isnt as good as i wexpected it to be.

View user profile http://youtube.com/user/AttackableGamingHD

BryceCain25


SUPER MODERATOR
SUPER MODERATOR
NXTGenerationsTv wrote:
Code:
var Player : GameObject ;
var slideaudio : AudioClip;
function OnTriggerStay (other : Collider) {
if (other.CompareTag ("Player")){
Player.animation.Play("hint").speed = 0.1;

}
}
this could be helpful for cutscenes and also for simple parkour movement .... but u its really simple it just should give an idea on how it could be done
wow wow wow hold it now..this should be playing some crossfade animations so that you don't leave any unspecified crashing involved in unity3d's editor

Code:
#pragma strict
var Parkouranimation : Animation;
function OnTriggerEnter () {
//this is attached to the gameobject your are referencing to the parkour animation
Parkouranimation.CrossFade("Walk"), 0.1));
}
that should work, just let me know

View user profile

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum