Skip to content
  • Protopie and Figma
  • Protopie Tips
  • Experience Prototyping
  • Protopie and Figma
  • Protopie Tips
  • Experience Prototyping

PROTOPIE

Playing with time

How to know whether something occurred

The message sending protocols between a scene and a component, or between pies (through Connect) are extremely powerful, but not entirely consistent. A message sent from a component to the current scene is received by itself, but one sent to Connect is not received by itself. How can you trigger a response if no-one has responded?

There are a variety of ways:-

  1. send a message to your self with a delay of 2-3 seconds after you sent to message to Connect. If you get a response from Connect then set a. flag variable, and when you receive the message from yourself, consult (and reset) that variable.
  2. Use a variable in a similar way – assign it a value with some delay (2-3 seconds) and then have a detect trigger  on it, which checks the flag variable in the same way as the message sending (above).

In general, set an event to happen at some delay after sending your message to Connect and then use that event to see if a response has come in from Connect.

Potentially related posts ...

Working with Components
more ...
Moving between Figma and Protopie
more ...
Rough, Rapid, Right
more ...
Arrays and multiple parameters
Protopie seems limited since a message can be sent using only one value as a parameter. However, arrays (written as text strings and manipulated by parseJson) can be used for contexts where multiple parameters need to be passed.
more ...

© 2023: David J Gilmore