Problem in using replicate function

Hi,

I am a newbie. I would like the actor disappear when the copy in replicate is 0. Other than destroying the actor, is there any proper way doing it?

Thanks.

KC

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Not sure what you mean. The replicate behavior can diminish its value if you plug in an attribute. See the attached project.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    If you use an attribute for the number of copies in your replicate behavior then you would just have a separate rule that says When attribute = 0 --> change attribute self.color.alpha to 0. Alpha is a measure of opacity with 1 being 100% opaque and 0 being 0% opaque (aka transparent/invisible.) Or if your attribute can go negative, then When attribute ≤ 0 --> change attribute self.color.alpha to 0.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Its been fixed in the nightly build, so replicate 0 will hide the actor in the next public release. Until then, you can use tatiang's workaround.
  • spidey906spidey906 Member Posts: 52
    Thank you so much for your replies. ^^
Sign In or Register to comment.