AGS Development > Other Engine & Editor Development

Porting game to MonoAGS

<< < (28/28)

cat:

--- Quote from: tzachs on 21 Jul 2019, 02:57 ---if you set an outfit while the character is walking, won't you expect the new outfit to also change to walking, and not idle, for example?
--- End quote ---
Actually, that's exactly what I'd expect. I'd expect that the character uses the correct animation for the current state, i.e. idle->idle animation, walking->walking animation, climbing->climb animation (how would I go about climb animation anyway?) etc.
Not sure what about states that don't have an animation. AGS would probably pick the first frame of the walking animation and do not animate.

At the moment, when switching outfits, the last outfit remains visible unless an action triggers an animation change. I don't think this is how it should work.


--- Quote ---as you represent 100% of the user-base you get what you want.  (nod)

--- End quote ---
(laugh)

tzachs:

--- Quote from: cat on 21 Jul 2019, 19:41 ---(how would I go about climb animation anyway?)

--- End quote ---

An outfit is just a map from a string key to a directional animation, and you can add any animation you want, so you can do for example:

--- Code: C# ---var clarkKentClimb = _game.Factory.Graphics.GetDirectionalAnimation(_baseFolder, "CK/Climb/Left", "CK/Climb/Right", "CK/Climb/Down", "CK/Climb/Up");clarkKentOutfit["Climb"] = clarkKentClimb; var supermanClimb = _game.Factory.Graphics.GetDirectionalAnimation(_baseFolder, "Superman/Climb/Left"); //no budget to animate all dirs, the left animation will always be usedsupermanOutfit["Climb"] = supermanClimb; //Then, when you want to animate:_character.Outfit = supermanOutfit;_character.StartAnimation(_character.Outfit["Climb"].Down); ..._character.Outfit = clarkKentOutfit; //With the new addition, if superman was still climbing when changing the outfit, clark kent will be climbing now as the climb animation exists for it as well (and I guess if the climb animation doesn't exist, I'll rollback to the idle animation, and if the idle animation doesn't exist, I'll do nothing)
(But an animation doesn't have to be associated with an outfit, you can also start an animation directly).

Navigation

[0] Message Index

[*] Previous page

Go to full version