Opening Animations

Kelewan

Villager
Member
Joined
Nov 17, 2016
Messages
7
Reaction score
1
First Language
English
Primarily Uses
Hi All,


First time poster. I'm currently working on a little project for my children. I'm slowly working through SumRndmDde's tutorials and writing notes for myself to refer back to when I plan to implement that aspect of the tool-set into my game.


I've got some (limited) professional experience with scripting/coding so the explanation doesn't need to be too basic but: I have a question about the opening animations for chests.


Can someone please explain to me the logic behind the below instructions displaying the opening animations of a chest? I would expect to have to apply the partially opened chest images at specific points of the code. (The below was created from Quick Event Creation: Treasure)


1. Direction Fix Off 2. Turn Left 3. Wait: 3 frame(s) 4. Turn Right 5. Wait: 3 frame(s) 6. Turn Up 7. Wait: 3 frame(s) 


Appreciate whatever help anyone can give.


Cheers


Kelewan
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,673
First Language
German
Primarily Uses
RMMV
The reason is the way the sprites are structured - look at the sprite of an NPC, that has four directions and the person is looking into that direction depending on the row.


Now if you look at the chest - the engine doesn't know that it is a chest, for it all sprites have the same four rows standing for the same four directions.


So if you want the picture of a certain row displayed, you tell the engine to "turn in that direction" and the engine translates that internally to "use pictures of row number n" depending on the direction.


But for the human developer it is easier to read that as a direction instead of a number, because most sprites are persons or animals that go in the four directions.


And you might also follow the link "starting point" in my signature to get to the basic tutorials and the most important tips of using the RM's.
 
Last edited by a moderator:

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,643
Reaction score
420
First Language
Portuguese
Primarily Uses
RMMV
Explaining bit by bit:


Direction Fix Off -> If the event has direction fix on, it will not turn. Most events are set like npcs, so they turn when you activate them from the side... which for some events with different graphics for each side that you don't want to change means it does changes. So you set a checkbox to fix the direction so it doesn't change no matter the side interacted with.


The downside is that, when you want them to change direction, you have to turn the direction fix off.



Turn Left/Right/Up -> a chest, unlike an npc, had a different position for the opening depending on its side. usually down is fully closed, left is a bit open, right is more open, and up is fully open. This makes the chest turn left.



Wait: 3 frame(s) -> this makes the event wait three frames before continuing, in this case to change directions. The game usually runs at 60 frames per second, so without this human eyes would not even notice the change if the wait wasn't there. For a slower opening, increase the wait.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,859
Messages
1,017,030
Members
137,566
Latest member
Fl0shVS
Top