change animation

Non-platform specific questions.

change animation

Postby j2graves » Mon Apr 27, 2009 12:03 am

ok, there's this situation where I want a certain actor to change to a certain animation when another actor (called crosshairs) has a value X greater than the main actor. but I also want it to change to a different animation when crosshairs has a value X lower than the main actor. I want it to understand that it has to keep track of the X value of crosshairs, but when I use DrawActor, it kept starting the animation over and over and it got to where it went between only two frames, and very rapidly.

I hope this makes sense.
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: change animation

Postby jimmynewguy » Mon Apr 27, 2009 12:08 am

try setting the animation direction to stopped
ChangeAnimationDirection(STOPPED); (i think) but it's a funtion so you can just click, if that didn't work can we see a .ged?
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: change animation

Postby skydereign » Mon Apr 27, 2009 2:27 am

Okay, this problem occurs as you using the draw actor. That script runs every frame, hence the repeat. If you set the ending to NO_CHANGE, it should work. If not, then maybe you are talking about x discrepancy do to animations, but I am pretty sure it is the previous.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: change animation

Postby BlarghNRawr » Tue Apr 28, 2009 4:01 am

i just make sure to never use animations in draw actor
Download Game Music
current projects:
Bold! ?% Started mechanics
Unnamed puzzle game 60% --i need a name!--
User avatar
BlarghNRawr
 
Posts: 767
Joined: Wed Jun 25, 2008 12:36 am
Location: Not using G-E anymore. Now using Source SDK.
Score: 27 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron