ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Help with CopperCube
forum topic indicator 2d overlay with transparent area is clickable
person icon
lazlo
Guest
Quote
2024-09-15 19:27:49

Hi,
I'm trying to do a 2D game where an object is clickable (click on it for something to happen) and the transparent area in the area is still clickable? (it's a png-file).
The png-picture is attached to an 2D Overlay which has the behavior that something should happen when I click on it.

Is there anyway to work around this?

person icon
guest_Guest
Guest
Quote
2024-09-21 03:00:53

Don't use CC for a 2D game, lazlo. 2D games don't need engines. If you must use an engine, then use GDevelop or GB Studio. emoji icon_devil

person icon
guest_guest
Registered User
Quote
2024-09-21 06:24:45

There is no way to detect click based on alpha using engine's built-in functionality.

You can though workaround by defining a polygon shape that more or less corresponds to your picture, and then detecting if mouse cursor is currently inside that shape. This requires coding obviously. The idea is to get something likehttps://www.youtube.com/watch?v=.... You can get mouse position using corresponding function from ccb api refs sheet.

Another way would be to use 3d meshes instead of 3d, which might work or not for you based on your scene setup.

@guest_Guest
You're not answering the question OP asked. Why post if you don't know the answer.

2D games don't need engines.

Your today's comments are pure gold.

person icon
guest_Guest
Guest
Quote
2024-09-21 16:35:07

Use a framework, not an engine... doofus.

person icon
guest_Guest
Guest
Quote
2024-09-21 16:38:55

Pygame, Love2D, Raylib... you comprende now? I did answer OP's question... Don't make 2D games in CC. Duh.

person icon
guest_guest
Registered User
Quote
2024-09-21 17:17:01

- is there a way to work around my issue?
- don't use coppercube

Perfect answer, as always.
Whoa, you also speak Spanish besides Portuguese, lol.

So why not use an engine that has 2d support, or primary target 2d: godot, unity, defold? Why these even exist if they are useless?

Why do you even mention those frameworks, if you can't code anyway? I saw an extension you made for VP. The one there you copied one line 150 times instead of utilizing a loop. You could even add a loop break or return statement, in case condition is not specified by the end user, which is a huge optimization. I've wrote a lot of crappy code, but I would be ashamed to publish something like that.

person icon
guest_guest
Registered User
Quote
2024-09-21 17:18:05

Also stop using my nickname.

person icon
guest_guest
Guest
Quote
2024-09-21 19:00:39

Or what? :) This is someone else this time - not whoever used it last time.

We all know it's you, Zoo, you complete failure. I was hoping what happened would've scared you away from ever coming back here, but I guess that wasn't enough. Maybe have to do other stuff to really put you in your place...

person icon
guest_guest
Registered User
Quote
2024-09-21 19:45:52

Lol, it's me okeoke.

This is my new account here from now.

So, taking about failures, how's your mario/jam game? Have you produced something besides salt and suggestions to use another engines recently?

person icon
guest_guest
Guest
Quote
2024-09-21 20:13:58

Oh boy, haha, no, wasn't referring to you, okeoke, promise. I was referring to the other guest. The one who loves to keep calling JIC derogatory names (and has a real vendetta against him - there's only one member of this community who has a real hatred for him, and you know who he is, surely).

Oh, speaking of which, you'd asked me to add you on discord again. I sent a request to okeoke and it was someone else. For a bit of a refresher / hint as to who this is, without saying a precise name... I was a bit of an S2Engine fanatic :) was downright obsessed with version 1.4.5 and was dead-set on making something with that crusty old version, and didn't quite get anywhere.

person icon
okeoke
Registered User
Quote
2024-09-21 20:30:16

Oh wow, I remember a guy who fits this description:)

Please add me again, it's okeoke1234. I tried to add your old account multiple times, but it seems like it's either deleted or friends requests are restricted.


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |