Giving random features to an object called by a variable?

0 favourites
  • 3 posts
From the Asset Store
112 High-Quality destruction sounds for videogames
  • Hi C2 community! ^^

    During an event triggered by a boolean or number variable (which is active when called), how do I give random features (such as opacity, angle and scale) to a newly created object?

    I know the functions RANDOM and CHOOSE combined with integer fucntions, but both only work properly when set at the beginning of the layout.

    I'm also trying to randomly choose an animation of an object in the same case and I'm not getting. Example: "animation"&int(choose(1,2,3))

    I think that is a computational logic problem I don't understand...

    I thank you in advance your attention and collaboration.

  • After the condition triggers that creates the object, use "On Object Created"

    On Object Created>Player>Set Opacity>random(100)

    On Object Created>Player>Set Animation>choose(Animation_1,Animation_2,Animation_3)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for the help, TheDom, but I tried this function before and don't worked here.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)