Is there a way to send a messages

Get help using Construct 3!

Post » Thu Jun 08, 2017 3:26 am

is there an action that lets you say something like post message("do something") and have an event somewhere react when message "do something" is posted, and have that only execute once on the tick it was posted.

i have been using a work around using global variable and trigger once while true but i feel like there is a better way i just have not come across it yet? does some one have some insight?
B
50
S
26
G
2
Posts: 31
Reputation: 5,012

Post » Thu Jun 08, 2017 7:08 am

@piranha305

You mean like calling a Function?
Vote for all the Construct 2 games on Steam Greenlight - Find them here
B
33
S
9
G
7
Posts: 450
Reputation: 6,778

Post » Thu Jun 08, 2017 12:15 pm

so yeah kinda like a function, the thing is function are not associated with an object.

im think more like a pub/sub type of thing so for example i have a few different sprites in the layout but they are not related and not in a family i want all these sprite to listen for an message that gets broadcast to all object and then each item behaves different when they receive the same message ,

the thing i'm trying to accomplish is basically like polymorphism
B
50
S
26
G
2
Posts: 31
Reputation: 5,012


Return to How do I...?

Who is online

Users browsing this forum: mekonbekon, NetOne and 0 guests