ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Programming and Scripting
forum topic indicator Creating custom events like Scratch's broadcast system
person icon
mostock
Registered User
Quote
2023-06-15 19:36:40

I want to create something similar to MIT Scratch's broadcast system where you can use "Broadcast(some message)" block to trigger a custom event ... and then we can use "When I receive (some message)" to define what must be done when that event triggered.

person icon
Guest
Guest
Quote
2023-06-16 06:57:08

The functionality you want to do is already available in CC. The "broadcast" is an action that sets a variable to a certain value. The "receiver" is a behavior that waits each frame for the variable to equal the value you set in the "broadcast" before doing an action(s) (which you could call an "event"). The type of variable you use can be an integer, string, true/false, etc. The terms "broadcast" and "receiver" were probably used to be more kid-friendly. I've not used Scratch other than a casual read of the documentation so I could be wrong.


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 |