|
Re: noob lite-c question
[Re: Albedo]
#254872
03/06/09 02:44
03/06/09 02:44
|
Joined: Aug 2008
Posts: 218 U.S.
GamerX
Member
|
Member
Joined: Aug 2008
Posts: 218
U.S.
|
why do you have 99 at the end it should be 0 or ANM_CYCLE.
"You may never know what results come of your action, but if you do nothing there will be no result." -Mahatma Gandhi
|
|
|
Re: noob lite-c question
[Re: Albedo]
#255043
03/07/09 08:45
03/07/09 08:45
|
Joined: Sep 2003
Posts: 5,900 Bielefeld, Germany
Pappenheimer
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
|
There's nothing wrong in the code except the thing the GamerX mentioned, but you have to make sure that your model actually has frames with the name "move" when you use this name in your code to address them, try to leave just the mere "" instead of a name, this should play all of the frames of the model.
ent_animate(my,"",move_percentage, ANM_CYCLE);
|
|
|
Re: noob lite-c question
[Re: George]
#255104
03/07/09 16:24
03/07/09 16:24
|
Joined: Sep 2003
Posts: 5,900 Bielefeld, Germany
Pappenheimer
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
|
Did you attach the action to the model in Wed? Uuh! Good question! That's right. Never forget to mention the easiest part, because in 60 % of all situations it might be the problem. You can 'connect' the action to the model with an ent_create as well. /////////////////////////////// #include <acknex.h> #include <default.c> /////////////////////////////// var move_percentage; action move_entity() { while (1) {ent_animate(my,"move",move_percentage, 99); move_percentage += 5 * time_step; wait (1); } } function main() { level_load ("testlevel.wmb"); wait (2); camera.z = 120; camera.tilt = -15; ent_create("place_your_models_name_here", vector(200,0,0), move_entity); }
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|