Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
How to make an animation system of different animations with the same purpose? Example a Melee System, when I press the mouse button and perform different punches in sequence (just like GTA's punch) If you want to complement the information and talk about the other melee system (bats, knifes and etc.) I would appreciate it. |
||||
|
You can use action set a random value to create a variable with random value. for example suppose you have 4 diffrent melee attacks which you want to trigger on mouse left keypress... so what you can do is just add behavior when a key pressed left mouse button then add action set random value with variable named "melee _attack" minimum = "1" maximum = "4".... now to the same behavior attache 4 other actions if a variable has a value then do something variable name "melee_attack" value "1" then play animation an animation for one attack... same is with other 3 actions for if a variable has a value do something.. this time check for values '2','3','4' and play different animation accordingly... same can be applied to other melee items, bat,knife etc.. also you can add shoot action along with change animation and can add different value for the damage caused and other stuff. |
||||
|
here is an example (ccb file) of how i have changed animations for fights... under the scene root i use "when key is pressed down do something (left mouse button - right mouse button) |
||||
|
Can you post the example again so i can check it? I would apreciate a lot :D |
|