Button condition suggestion

0 favourites
  • 6 posts
From the Asset Store
J-BoB Game Button Sound Pack comes with 300 high-quality sound effects
  • It would be nice if the Button object had a "Compare Text" condition when creating events. I've found a work-around involving instance variables, but being able to directly say "If button text =X, then Y" would be very handy and significantly easier.

  • Ashley always asks for examples as to why any requested feature might be useful or required. I wondered why you might need this ?

  • I guess the context is that it's being used in front-end logic ; if that's the case, 'just use the UIDs to know which element (button, sprite, etc.) is being pressed.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I currently have it setup so that the button's text is equal to a list's text from a different layout. I would like to have it so that I can have a simple condition set to something like 'When Button text = "One", on being clicked, spawn Monster_One' and 'When Button text ="Two", on being clicked, spawn Monster_Two". Monsters being sprites, in this instance.

    I understand there are alternate way to do this, but they seem roundabout when having this option could streamline the process. I can provide a sample layout if needed, but I am not sure what degree of clarity it would provide.

  • You can give the button an instance variable (that can always be checked via condition) and always give it the same text as the button has. It's just one more action, problem solved

    Just sayin'

  • That's exactly what I'm doing, actually. And making an A=B, B=C, so A=C scenario isn't horrible, by any means, but it just feels a little too round-about when there is an easier solution. Since the work around is pretty simple, I doubt anything will be done to remediate this very slight shortcoming, but I figured I'd point it out and hopefully better this already pretty great program.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)