On Mouse Release weld help PleasE

NOTA

  • Posts: 327
If Two actors in region - mouse release on other actor... Is there something wrong in the placing of these blocks?

corbanwolf

  • Posts: 223
This is wrong on so many levels.
Last created actor is unknown and will cause problems. In this instance actor inside a region is actor X. You can make joints only between two different actors. Create attribute actor and then then asign actor inside region that attribute and then make a joint between that attribute and actor inside a region in another instance.
Also, not sure, but I'd swap for each <> if mouse. Seems more logical to be executed when mouse released
♪♪♪♪♪♪

NOTA

  • Posts: 327
ok.
what if I have random actors on the stage, I place two actors in region Zero, and release mouse on actor z to create
weld between the two actors of a specific group that are in the region?

That is what I'm going for.

corbanwolf

  • Posts: 223
You're almost there. For each block is a loop that is executed as many times as the condition is met. If there are 2 actors in a region, this loop will be executed 2 times, and for each instance actor inside a region will be different. That's why you need to create an actor attribute. Then actor attribute = actor inside a region. You can also make a number attribute and increase each time a loop is executed and then make a condition if counter = 2 then you can make a joint between previously stored actor attribute to second actor in a region.
♪♪♪♪♪♪

NOTA

  • Posts: 327
FYI: This works without an attribute

corbanwolf

  • Posts: 223
Yes, but it works only on Actors groups and is not optimised. But if it works and you're happy that's good  :)
♪♪♪♪♪♪