Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Variable Issue

Basically I would like the player to move certain objects to a location once they have moved a certain object into this location a switch will slowly become activated.

http://img.photobucket.com/albums/v468/ ... ocator.jpg[/img]

http://img.photobucket.com/albums/v468/ ... rcheck.jpg[/img]

http://img.photobucket.com/albums/v468/ ... edzone.jpg[/img]

http://img.photobucket.com/albums/v468/ ... redorb.jpg[/img]

I personally do not see the problem with this but hopefully you can help me out.

All help is greatly appreciated.
 

khmp

Sponsor

I don't think its the problem but could result in odd behavior. Inside your Locater Checker event. You have the result in the wrong place. Like If I had a conditional statement like this:
Code:
if true
  if true
  end
  # You are doing working here.
end
You should have it inside the inside conditional's true.
Code:
if true
  if true
    # You should be doing working here.
  end
end

And then you are doing the same thing in the Red Zone event. Also it might be a problem but you are saving to the (X Green O/Y Green O) variables twice in the Locater Variables event.

Good luck with it Opportunity! :thumb:
 
So the problem is that the +/v 1 to the switch activates when I the orb is at either the Y or the X location?

Cheers for pointing out the double Green /v problem.

Thanks for your reply I shall test it one of them out on my test map, I think putting them all together at the same time has confused me.
 

khmp

Sponsor

To further clarify my first point. In your Locater Checker as well as your Red Zone event. Let's just use the first two conditional branches you have in the Locater Checker for an example.

Code:
Conditional Branch: Variable [0001: X Red] == Variable [0001: X Red O]
  Conditional Branch: Variable [0001: Y Red] == Variable [0001: Y Red O]
    # You want whatever happens when the two events meet, to happen here.
  Else
    
  Branch End
  # Currently you have that code here. Move it to the true portion of both branches.
Else

Branch End

I hope that helps explain it better.

Good luck with it Opportunity! :thumb:
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top