is it possible to check if an actor is already playing an animation, because i dont want the animation to be overwritten (for example the animation takes 2 seconds, but the trigger fires 10 times a second it looks a bit strange, so i need to block the new animation until the old one has finished). or is it possible to enable some option in the "play animation" action that provides the animation to be overwritten? (i didnt find a option that could fit and didnt find a condition that could fit =/)
at last, is it possible to create missles and fire them in a specific direction from a specific point (3 dimensional) to create an efficent shooter engine?
Think I can help with the first part at least. These animations appear to be "full body" - and since units aren't shooting and walking at the same time (usually), there was no need to add different ones. So I guess you're stuck with either the running or the shooting animation, depends on what you want.
ok i see i need to be a bit more specific to avoid misunderstandings :D
the problem is, that i want a unit to walk backwards and strafe left and right.
a unit can only move where its looking at, so i used the "move instantly" function and enabled blending, so the unit is "sliding" to the new position.
im very happy with that, the only problem is that the unit doesnt play any animation during that and thats a bit strange to watch :D
so, everytime the unit slides left/right or moves backwards i order the actor of the unit to play the walk animation.
but the trigger that checks if the A, S or D key is pressed fires very often, so the animation is played about 20 times a second if i move left or right or backwards. this is what i dont want. so the actor should only play the "walk" animation again if it isnt playing it yet.
i just dont know how to prevent the actor of overwriting the last animation with the new one. it should wait until the first animation is finished.
it seems not to be possible to check if an actor is playing a specific animation (or i just missed it) and the options also seem to have no effect.
so i created an own function that solves the problem
What I use to do is to set the animation on Looping Forever when I start it.
Then I'd only change the animation again when my unit did something different.
E.g.
Event: Player presses movement key
Action: Loop walking animation forever
Event: Player depresses movement key
Action: Reset unit animation
You need to add some more code to make it look smooth when turning, but that's a nice way to do it in general.
im working on an entire project so videos will come to a later stage. progress is very good.
btw: does anyone know if parameters will reset or not after a wait? do i need to write it in a local variable or is it ok like it is now? (in my tests it worked but i donno if it could be overwritten in mp games)
hello everyone!
is it possible to check if an actor is already playing an animation, because i dont want the animation to be overwritten (for example the animation takes 2 seconds, but the trigger fires 10 times a second it looks a bit strange, so i need to block the new animation until the old one has finished). or is it possible to enable some option in the "play animation" action that provides the animation to be overwritten? (i didnt find a option that could fit and didnt find a condition that could fit =/)
at last, is it possible to create missles and fire them in a specific direction from a specific point (3 dimensional) to create an efficent shooter engine?
greez
@Mille25: Go
Think I can help with the first part at least. These animations appear to be "full body" - and since units aren't shooting and walking at the same time (usually), there was no need to add different ones. So I guess you're stuck with either the running or the shooting animation, depends on what you want.
ok i see i need to be a bit more specific to avoid misunderstandings :D
the problem is, that i want a unit to walk backwards and strafe left and right. a unit can only move where its looking at, so i used the "move instantly" function and enabled blending, so the unit is "sliding" to the new position. im very happy with that, the only problem is that the unit doesnt play any animation during that and thats a bit strange to watch :D
so, everytime the unit slides left/right or moves backwards i order the actor of the unit to play the walk animation. but the trigger that checks if the A, S or D key is pressed fires very often, so the animation is played about 20 times a second if i move left or right or backwards. this is what i dont want. so the actor should only play the "walk" animation again if it isnt playing it yet.
i just dont know how to prevent the actor of overwriting the last animation with the new one. it should wait until the first animation is finished.
greez
noone? =/
I am sure its possible, but you would need to track it with triggers, what animations is played, you have to know how long it lasts.
@tigerija: Go
i just have solved it.
it seems not to be possible to check if an actor is playing a specific animation (or i just missed it) and the options also seem to have no effect. so i created an own function that solves the problem
the wait time must fit the walk animation time. it looks perfect now. :) for sure this only works if every player only has one hero/unit.
@tigerija: Go
What I use to do is to set the animation on Looping Forever when I start it.
Then I'd only change the animation again when my unit did something different.
E.g.
Event: Player presses movement key
Action: Loop walking animation forever
Event: Player depresses movement key
Action: Reset unit animation
You need to add some more code to make it look smooth when turning, but that's a nice way to do it in general.
Can we see video how this works in action ?
im working on an entire project so videos will come to a later stage. progress is very good.
btw: does anyone know if parameters will reset or not after a wait? do i need to write it in a local variable or is it ok like it is now? (in my tests it worked but i donno if it could be overwritten in mp games)
@tigerija: Go
My suggestion looks like that:
@Mille25: Go
Parameters don't reset. They're like local variables.
ok thanks guys, im very happy with the movement right now.
has anyone an idea for the missles? is it possible to create missles at a specific point and fire them in a x/y(Z?) direction?
addicionally, is there an ability that could fit to simulate a jump?
greez