Animation Specificiation Issue

Battlemapsta

I am the Conduit of Change
Reaction score
101
Hey all, I've been messing around with the editor and I'm come up with a little problem. I'm trying to make a unit I specify play an animation in specific as in I want it to play animation attack-3.

I've already read up on the custom script and everything but my guy apparently doesn't perform an animation at all.

To recap the situation I have one trigger that sets a unit variable like so.

Trigger:
  • Set Bob = Bob

Bob the variable = Bob the guy on the map.

Now for the trigger that makes it work looks like this.

Trigger:
  • Animation
    • Events
    • Conditions
    • Actions
      • Wait 0.10 game-time seconds
      • Custom script: call SetUnitAnimationByIndex(udg_Bob,5)
      • Wait 1.00 game-time seconds
      • Unit - Pause Bob 0000 <gen>


Firstly, this trigger is run through another trigger that simply has a run action.
I have a second wait and then a pause because I'm attempting to pause the animation at a point to make it pose. I got the integer for the animation using the viewer and the model has over 9 animations so the integer can't be an issue.

Other than that, I have no more critical information to give unless someone uncovers my issue.

Thank you in advance.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Delete the custom script the use animation - play bob attack 3 animation
 

Battlemapsta

I am the Conduit of Change
Reaction score
101
Won't even work because it selects a random attack animation. The model has about 4 attack animations so by using attack 3, it chooses one of them which is why I'm using the custom script suggested by others in other threads.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Well then im not sure the animation index number but are you sure that that is the right number
 

Battlemapsta

I am the Conduit of Change
Reaction score
101
Using the viewer I see the animations of the model. There are 5 animations above it in the list so it's the 6st and because you count the first as 0 then it's 5 just like I coded.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Quikly try it without pausing the unit. I think that stops animations playing
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Wel this wont fix the problem but pausing a unit wont stop him from finishing his animation
 

Battlemapsta

I am the Conduit of Change
Reaction score
101
I already stated that this was intentionally done because I am attempting to pose the unit at certain point while they perform the specified animation.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Yes that why i say that because he wont pose he will finish his animation and i cant see any problems with what is here could you maby post all 3 triggers fully
 

Battlemapsta

I am the Conduit of Change
Reaction score
101
The third trigger isn't a concern because I tested it originally with the animation command and it worked. There is only an issue within these 2 triggers that apparently result in Bob not doing any action.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
K insert this custom script in the animation triger. local unit u = udg_Bob. Then change to SetUnitAnimationByIndex((u),5)
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
What error and did you put the new custom script above every thing in the actions it must be first
 

Battlemapsta

I am the Conduit of Change
Reaction score
101
This is basically how it looks like.

Trigger:
  • Animation
    • Events
    • Conditions
    • Actions
      • Custom script: local unit u = udg_Bob
      • Wait 0.10 game-time seconds
      • Custom script: SetUnitAnimationByIndex(udg_Bob,5)


The first custom script needs a code statement and the second needs a name so the original for the second was fine before.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
The reason for the new custom script was to replace the udg_Bob part. Is bob preplaced. What varaible are you seting bob to.
 

Battlemapsta

I am the Conduit of Change
Reaction score
101
I tried it both ways with and without the udg with errors, Bob is preplaced and I already said I set bob to a unit variable under a map initilization trigger.
 

Battlemapsta

I am the Conduit of Change
Reaction score
101
Sorry to double post but I fixed the issue myself. Thank you though for your effort in helping me.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top