Assignment 6: Trying to Get Gold
- by Michael Ger
- October 23
- in
For this assignment I did the usual treasure box animation that we did in previous exercises. This time I added in the potion and gold ingots into my scene in the desert. So for this assignment I managed to create a scene where the player had to touch the potion in order to open the treasure chests. If the player leaves the vicinity of the potion the chest would automatically close preventing the player from getting their prize ingots.
The story goes that after the player escapes into the desert he finds a hidden temple with two treasure chest and a potion on a pedestal. He was able to open the treasure chest but as soon as he leaves the pedestal the chest closed in front of him. He tries it again this time with the other treasure chest but fails to get what he wanted. After the third unsuccessful attempt, in frustration, the player leaves the area. Only to find out that he's trapped.
It was hard at first trying to get the right FSM to do what I want the object to do. Instead of using trigger enter I used mouse down to create the sense of engagement between the player and the objects. I used the potion as a switch to open the chests, in addition I'd also added a trigger exit so that when the player leaves the collision boundaries the boxes would close. There is a problem with the mouse cursor especially when there an object has playmaker, the cursor would spas out.
As you can see I'm still in the process of creating an interaction that would allow the player to pick up the potion (the potion disappears) which would trigger the chest open animation.
COMMENTS