Hey there guys I'm having a bit of an issue with my game currently. If you take a look at the below picture you will see that my team choice buttons (The square boxes) are sitting on top of the player or AI slabs which when pressed change between player controlled character or CPU. My issue is that when I press the team choice button it also presses the player or AI button. They are on different layers but this doesn't seem to make a difference.
I know there are ways around this by cutting around the shape on photoshop so it isn't sitting on top of the slab it's more sitting inside a little hole cut into it but I would much rather not do that.
Thanks for reading. I love this community.
Create a dual or 2 conditions together for the AI slab and squares as follows:
On touched object > AI Slab > What ever your event
On touched object (X) > square >
the (X) being inverted
this will keep the AI slab from activating an event meant only for the square and probably you need to do the reverse for the square.
On touched object > square > What ever your event
On touched object (X) > AI Slab >
You might need to make the inverted condition in each scenario "is in touch" because C2 might not let you couple the identical conditions. But you should get the general idea.
Develop games in your browser. Powerful, performant & highly capable.
Thanks for your speedy reply dude the only issue is that touch and click events are triggers which means I am not able to have more than one in any one event.
Here is a picture of my event sheet. I hope I'm not just being an idiot but feel free to point it out if I am.
Edit: Ignore me. Your advice was perfect man I was just being stupid. Thanks for your help again. Have a great day.
Get rid of mouse object. The touch object has "use mouse input" by default in the properties dialog when selected.
If you have to have both,(mouse & touch objects) put all mouse object conditions and events into a group (Mouse Group) and all touch object conditions and events into another group (Touch Group).
Then use System > On start of Layout (create sub events)
------------Is on mobile device > System>Mouse Group "Disable"
----------- Is on mobile device (X) > System>Touch Group "Disable"
(X) being inverted
Also code your mouse group like the first example I gave above.
I've fixed it now dude thanks a lot.
Have a great day!
Just to anyone wondering the same thing the picture below shows TheDom's event sheet in practice