Value spawning question

0 favourites
  • 13 posts
  • How do you do so a value changes how a sprite spawns objects?

    If you do this it doesn,t work: Compare instance variable-Value-Spawn another object

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do your have any instance of that object in your layout? You must have an instance in any layout to spawn object.

    And where did you spawn it? Maybe it was spawned outside.

  • Do your have any instance of that object in your layout? You must have an instance in any layout to spawn object.

    And where did you spawn it? Maybe it was spawned outside.

    I have a instance of that object in a layout. I created the spawning so the object spawns of the sprite. I can do so other things making the sprite spawn objects but when i use values to do so the sprite spawns objects it spawns nothing. How do you so it works?

  • I want someone to answer this question. How do you use compare instance variable to change how a sprite spawn objects?

  • See tips for this forum. It's not clear what you mean by "change how a sprite spawn objects".

  • See tips for this forum. It's not clear what you mean by "change how a sprite spawn objects".

    What i want to do is to do so a sprite spawns different sprites depending on if another sprite is positioned at the left or rigth of the sprite. One way is to do this is to use Compare instance variable but when i do that, the sprite spawns nothing. How do i use Compare instance variable to do this? Is it another way to do this?

  • My other posts as clear but my previous posts is clearer so you should be able to answer this.

  • There are lots of ways to do it, depends on what is best for your game. If you are detecting whether object A is on the left or right of object B you can say if the x of object A is greater or less than object B, then based on that outcome, spawn object type C.

  • There are lots of ways to do it, depends on what is best for your game. If you are detecting whether object A is on the left or right of object B you can say if the x of object A is greater or less than object B, then based on that outcome, spawn object type C.

    That does work but i would want to you to tell me how to do it whit values so i can use the choose expression to do so a sprite spawns another sprite.

  • My question haven,t been answered. I don,t want to create a another thread to get my question answered.

  • My question haven,t been answered. I don,t want to create a another thread to get my question answered.

    Can you post a file of your game so we can help you better?

  • Did you try using a global number variable? just set the global number variable, let's call it blah, to __ number based on the aforementioned conditions. so if ___ is whatever direction from ___ then set blah = 0 but if ___ is whatever direction from ___ then set blah = 1.

    Then furthermore, you would then set it so if blah = 0 spawn ___ but if blah = 1 spawn ___

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