getting a spear to change the animation frame depending on

Game Editor comments and discussion.

getting a spear to change the animation frame depending on

Postby Sgt. Sparky » Wed Jan 10, 2007 9:24 pm

direction, could you please Help? here is the code i have an the create actor event
Code: Select all
angle = direction(xscreen, yscreen, Coca.xscreen, Coca.xscreen);
directional_velocity = 25;
and on the draw actor event I have this
Code: Select all
animindex = direction(xscreen, yscreen, Coca.xscreen, Coca.xscreen)*360;
what is the error on the draw actor Event?
Edit: I changed it to nframes but it still will not work, there are 360 frames in the animation.
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby makslane » Wed Jan 10, 2007 9:46 pm

To change the animation frame you must use the animpos variable.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Sgt. Sparky » Wed Jan 10, 2007 9:47 pm

okay! :D
edit :THANK YOU!
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Game A Gogo » Wed Jan 10, 2007 10:20 pm

the animindex var is read only, so you cant change it.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron