Animationen für verschiedene Outfits

  • #1, by OgniSunday, 22. September 2013, 15:19 11 years ago
    Hallo zusammen,

    ich hab folgende Situation:

    - Ich habe einen Charakter der verschiedene Outfits hat und so braucht natürlich jedes Outfit auch die entsprechenden Animationen (nehmen, öffnen, benutzen).

    - Um den Aufwand zu minimieren habe ich vorgefertigte Aktionen für die verschiedenen Animationen erstellt, z.B. "nehmen-start" und "nehmen-ende" für jedes Outfit. So muss ich beim scripten nur noch die einzelnen Aktionen über eine "Wenn Funktion" für das jeweilige Outfit starten.

    PROBLEM:

    - Wenn ich nun die Aktion "nehmen-start" starte, als nächstes das Item ins Inventar platziere und nun "nehmen-ende" auslöse werden die Animationen nicht richtig abgespielt. So wird meistens die "nehmen-ende" Animation übersprungen. Nicht immer, aber meistens. Ich habe versuch über gesetzte Pausen das ganze zu beheben, bringt aber nix.

    Kann ich es beinflussen dass Visionaire die Aktionen schön hintereinander abarbeitet?

    Newbie

    11 Posts


  • #2, by CrossSunday, 22. September 2013, 19:46 11 years ago
    Teil deiner Aktionen muss ja das Abspielen einer Animation sein. Dort "Warte bis Animation beendet ist" anklicken, dann sollte auch nichts mehr übersprungen werden.

    Newbie

    92 Posts

  • #3, by OgniSunday, 22. September 2013, 23:09 11 years ago
    Der Haken ist natürlich schon längst gesetzt. :-(

    Wenn normal als ein großer Block gescriptet dann würde das ganze funktionieren, nur wenn mehrere Aktionen hintereinander geschaltet werden funktioniert das Ganze nicht.

    Newbie

    11 Posts

  • #4, by CrossSunday, 22. September 2013, 23:14 11 years ago
    Poste doch mal eine der Aktionsfolgen, vielleicht fällt dann noch jemandem was auf.

    Newbie

    92 Posts

  • #5, by OgniMonday, 23. September 2013, 21:01 11 years ago
    Die Aktion für den eigentlichen Befehl des Spielers und eine der darin verwendeten Aktionen.

    Newbie

    11 Posts

  • #6, by afrlmeMonday, 23. September 2013, 21:43 11 years ago
    you should be making use of the "else" action part in your if queries!

    for example: in the first attachment: all of the actions underneath the "end if" will always be executed regardless of the if condition query above. I do not know if you intend for it to do this or not; but if not then you should add an "else" action part before the "end if" & then move up all of the action parts below the "end if" in between the "else" & "end if" action parts. finally: you do not need to use the "quit current action" action part; it is mostly for if you are looping an action or something & need it to break/stop before the end of the query or listed actions.

    in the second attachment you should use a single if query along with the else action parts... VS reads through the listed actions/lines in order & thus if you have multiple if queries inside of a single action & the conditions change while the actions are still being read (so to speak) then the actions inside of the if queries may be triggered regardless of whether or not you want them to be....

    if condition "outfit_1" is true
     play animation "a" and wait
    else
     if condition "outfit_2" is true
      play animation "b" and wait
     else
      if condition "outfit_3" is true
       play animation "c" and wait
      else
       if condition "outfit_4" is true
        play animation "d" and wait
       end if
      end if
     end if
    end if
    

    Imperator

    7278 Posts

  • #7, by OgniTuesday, 24. September 2013, 06:34 11 years ago
    Thank you for your input. I am well aware of what you pointed out. Only one condition of these will be true at any given time so I was thinking of making it simpler for me to code with ignoring the "else" condition.
    I don't know if you could read my first post, but my main problem here is that VS does not trigger these animations in a timely manner. I have several outfits and want to simplify scripting by having pre-made actions for each animation so I can just trigger this action an VS plays the correct animation.

    Problem is that VS somehow messes up the timing of the animations when doing so. It will trigger the first animation but usually (on first exectuion anyway) it will not play the second animation correctly and just skip over it. If I repeat the action it usually works for the second time (but not always). So my initial question was if there is a way to make sure each animation is played properly when using pre-made actions for this. Currently VS is messing this up. It seems to me this has to do with these pre-made actions and the way VS triggers these.

    Newbie

    11 Posts

  • #8, by afrlmeTuesday, 24. September 2013, 07:16 11 years ago
    hmm...
    yeah I could read the first post to a degree but bing didn't translate it, all that well.

    if you really wanted to simplify it, then create a "called by other action" for each animation & skip the if queries entirely.

    what exactly is it doing when you call the actions after an animation has finished playing?

    Imperator

    7278 Posts

  • #9, by OgniTuesday, 24. September 2013, 10:43 11 years ago
    I honestly don't get how that should make things easier. Let me explain exactly what I'm trying to do:

    - I have a character that can have 4 different outfits.
    - I have animations for each outfit.
    - I want to avoid having to script 4 different if conditions everytime a character animation is played, therefore I came up with these pre-made actions that automatically plays the needed animation for each outfit.

    At the moment the actions do work BUT there are problems with the correct display for the second part of the animation. VS plays the first triggered animation correctly (i.e. pick up start), then I trigger the item to be put into the inventory and make it disappear on screen. Next I trigger the action for the pick up end animation, but this is not displayed correctly. On the first go it will always skip the second animation but when triggered again it works 80% of the time.

    To me this seems like a problem with the way VS treats the different actions that are started and somehow messes up the line of execution. I don't think there is actually anything wrong with the action parts since the script is working if put in there as one solid scripted block.

    If you have any other way of how to deal with different character animations for different outfits please let me know. I know I could script it for each action but I would really love a way to do this "automatically".

    Newbie

    11 Posts

  • #10, by afrlmeTuesday, 24. September 2013, 11:39 11 years ago
    I know 3.7.1 has quite a few bugs & is somewhat unstable... I wonder if this issue would present it self in the dev or beta builds for the upcoming release.

    do you mind using Lua Script? you could use it to perform if queries & also for starting/stopping animations & actions. I'm sure there's probably a way to make a global script to do what you need; usually is - need some time to think sbout it first mind.

    Imperator

    7278 Posts

  • #11, by OgniTuesday, 24. September 2013, 16:21 11 years ago
    I have no experience with LUA but am willing to learn (after all that's why I'm doing this little project of mine). I would like for Alex to maybe comment on this too, just so I know if this is something they plan to adress in a future update.

    Newbie

    11 Posts