dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [Point n Click] Combining items from my inventory

  1. #1
    Junior Member
    Join Date
    Mar 2018
    Posts
    2

    [Point n Click] Combining items from my inventory

    Hey guys

    I'm creating my own escape game using AS2, but unfortunately i'm having a hard time. I need to combine 2 itens from my inventory but thre's something wrong with my code and I dont really know what.


    During the game the player will find a control remote and batteries. What i would like to do is when the player clicks on the batteries (on the inventory) and then on the control remote, the batteris should disappear from the inventory and then the remote should be able to control the tv.

    Here are the codes i'm trying to use. All of the 3 itens are movieclips.

    Batteries code:

    on(release){
    _root.select="pilhas"
    }


    This is for the remote control:

    on(release){
    if(select=="pilhas"){
    _root.pilhainv.gotoAndStop(1)
    _root.controle="funcionando"
    }
    }


    beyond that i'd like it to execute (the remote):

    on(release){
    if(controle=="funcionando"){
    _root.select="controleok"
    }
    }



    and finally the tv:


    on(release){
    if(select=="controleok"){
    gotoAndStop(2)
    }
    }


    What happens is that when i click on the batteries and then on the romete nothing happens

    Can someone help me with that?

    Sorry for the bad english

  2. #2
    Senior Member Alloy Bacon's Avatar
    Join Date
    Apr 2011
    Posts
    954
    can you show .fla

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center