Spawn a label with a specific Value

  • How do I spawn a label and send it a value to be set at?

    And then spawn another, and give it a different value?

  • @Deeeds I’d just broadcast a message immediately after spawning the object. The message would contain the text for the label. When the label receives the message, set to the text given or do whatever else you want with the broadcast information, thne use behaviour off to disable the broadcast message so that it won’t change every time a new object spawns.

  • @Aidan-Oxley Here's the problem.

    To a spawned object... sending a broadcast message, is pointless because the labels don't have a sense of self, so they can't set themselves with that value they receive.

  • @Deeeds Yeah they can. If you add a set label into an object you intend to spawn multiple of, and have it select itself (it will by default), all the spawned ones should select themselves, not the paren/original.

  • @Aidan-Oxley I've tried this. In the parent, it selects itself, and then I'd hoped spawned versions would cop to the fact that it's SELF, but they seem to retain reference to the parent. So can't set themselves.

  • @Deeeds I’m gonna take a look at this. If I can get it to work, I’ll give to a link to a mini test project.

  • @Aidan-Oxley cool, this can’t be the right way to solve this...


  • @Deeeds Lol I have no idea what’s going on there. Here’s the link though:
    You can’t have broadcast message and spawn object in the same line because the spawned object doesn’t seem to pick it up, so I added a short delay, which could probably actually be heaps smaller than what it already is.

  • @Aidan-Oxley what do I do with this link?

  • @Deeeds Copy it and paste it into your web browser (usually safari). Then open the file that comes up in hyperPad.

  • @Aidan-Oxley THANK YOU!!

    It worked. Time to experiment with this delay...

    THANK YOU!!!

  • @Deeeds NP :)

Log in to reply

Looks like your connection to hyperPad Forum was lost, please wait while we try to reconnect.