Hello friends, i have recently tried to make an escape room game following a tutorial. I am almost finished however there is one thing that has stopped me from finishing it. This game is just a basic test as its my first game of any type. So to win the game you supposedly have to collect three items, which are two key pieces and a ring. You can combine the key pieces to make a key. However at the end, when you put the key to the door it ends the game. I dont know how to make it end only if both statements are true, which is you have the key AND the ring. This is my actionscript code.
onClipEvent(enterFrame)
{
if(_root.inv1_mc.inv_key3.hitTest(this._parent.door_trigger))
gotoAndPlay ("door_open");
}
After the if_root.blablabla i aslo want to add another code which says AND if ringlocated=“true”
So i actually want my code to be
onClipEvent(enterFrame)
{
if(_root.inv1_mc.inv_key3.hitTest(this._parent.door_trigger)) AND if(ringlocated=true)
gotoAndPlay ("door_open");
}
So how do i connect these statements ?