Help with an Issue

I wasn’t sure how to classify this one.   What I want to do is to use an object that when displayed allows the player to select a single object from a marked group of objects to be removed from the game.

For example, if they accomplish a particular goal, an object (eliminator object) will appear on the screen.  Then, when the player touches the eliminator object, the game play should be suspended and they will be given the option to remove an object (from a selected population of objects) from game play.  The population of objects available to be removed would be automatically displayed.   I was thinking they could drag the eliminator object to the object to be removed but they would have to drag it across other objects that could possibly be eliminated so that won’t work. 

Then I thought they could touch the eliminator object to suspend game play and then touch the object to be eliminated.  I thought about putting an X over the objects eligible for removal.  I’m really struggling trying to figure this one out. 

I also thought about an overlay screen to select the object to be removed but then I couldn’t figure out how to close the overlay and remove the object from the appropriate level.

I appreciate any and alll HELP!

Thanks,

Lori

Hi Lori,

If you like the UI of dragging the “eliminator” over the object to be removed, how about just detecting the location of the eliminator after the user lifts the touch off? So during the drag, it wouldn’t detect anything that it overlaps, but only when the user un-touches… so then, it indicates that they’re done selecting.

Of course, from a basic user standpoint, it’s probably easier if you just let them touch the object. It’s faster and easier for the player than dragging around some object and releasing. I vote for placing an X or some animated sprite over each object that can be removed.

Brent

I like your idea.  Do I need to suspend the game for this to occurr?   I wasn’t sure how to temporarily suspend.  

I did set up an X over the objects on an overlay screen but then I ran into the trouble of how to remove the object on the previous screen.

I can just move the code from the overlay screen to the main screen.

Thanks!

Hi Lori,

I wouldn’t suggest using an overlay scene (it’s not necessary). Just use a display group that’s located in front of the display group where other objects are, and put all of the X things in there.

As for suspending the game, is this physics-based? You could pause the physics engine if so. Otherwise, if you need to prevent user action on other objects while the X things are in place, you could set focus on the display group with the X objects, so that nothing else detects touch or tap. You’ll probably want to do that regardless, so the user can’t tamper with anything else while they’re expected to choose an object to remove from the game.

http://docs.coronalabs.com/api/type/StageObject/setFocus.html

Brent

Yes it is physics based.  I can suspend the physics - I just beth that will work.  I’ll give that a try.   If not, I’ll try setting the focus.

Thanks for the information

Lori

Hi Lori,

If you like the UI of dragging the “eliminator” over the object to be removed, how about just detecting the location of the eliminator after the user lifts the touch off? So during the drag, it wouldn’t detect anything that it overlaps, but only when the user un-touches… so then, it indicates that they’re done selecting.

Of course, from a basic user standpoint, it’s probably easier if you just let them touch the object. It’s faster and easier for the player than dragging around some object and releasing. I vote for placing an X or some animated sprite over each object that can be removed.

Brent

I like your idea.  Do I need to suspend the game for this to occurr?   I wasn’t sure how to temporarily suspend.  

I did set up an X over the objects on an overlay screen but then I ran into the trouble of how to remove the object on the previous screen.

I can just move the code from the overlay screen to the main screen.

Thanks!

Hi Lori,

I wouldn’t suggest using an overlay scene (it’s not necessary). Just use a display group that’s located in front of the display group where other objects are, and put all of the X things in there.

As for suspending the game, is this physics-based? You could pause the physics engine if so. Otherwise, if you need to prevent user action on other objects while the X things are in place, you could set focus on the display group with the X objects, so that nothing else detects touch or tap. You’ll probably want to do that regardless, so the user can’t tamper with anything else while they’re expected to choose an object to remove from the game.

http://docs.coronalabs.com/api/type/StageObject/setFocus.html

Brent

Yes it is physics based.  I can suspend the physics - I just beth that will work.  I’ll give that a try.   If not, I’ll try setting the focus.

Thanks for the information

Lori