Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
I need help in the following condition.

carlosm
Registered User
Quote
2019-11-20 01:19:16

Hello everyone,

I need help in the following condition.
my character has several animations say 5! I call animations after clicking the button like this;
example:


sw_anim = function() {

var sw_1 = ccbGetCopperCubeVariable('sw_skill');
var player_1 = ccbGetSceneNodeFromName("player_one");

switch (sw_1) {

case 1:
ccbSetSceneNodeProperty(player_1, "Animation", 'skill_1');
break;

case 2:
ccbSetSceneNodeProperty(player_1, "Animation", 'skill_2');

break;

case3:
ccbSetSceneNodeProperty(player_1, "Animation", 'skill_3');

break;
}

}

ccbRegisterOnFrameEvent(sw_anim);





the problem is that it starts the animation but after it runs it is looping i know how to remove the looping what i want and what
When executing the animation of a certain attack he goes back to the last animation he was in. Any idea?


Robo
Guest
Quote
2019-11-30 01:39:55

Isn't that as simple as creating a new variable to record current animation then can later be called when done with others to play that ?


carlosm
Registered User
Quote
2019-11-30 06:51:06

sorry but i don't understand what you said.
but I found a solution to that.

need to know how mark how solved


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internati?nal" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact