0 Favourites

Two short questions.

  • Hey all,

    Like many Construct 2 noobs, I am just overflowing with questions! Great to see such a helpful forum-crowd though! Hope you can help me out on these two short questions! Thanks in advanced.

    1)"Create new object VS spawn another object"

    I can't fully grasp the difference between creating (system>create new object) and spawning (object>spawn another object). I'm sure the logic is stupidly simple, but so am I. Any comprehensive ways of breaking it down?

    2)I'll ask this by means of an example.

    Say a fellow felt the desire to create a nice, arcing shot-gun blast in construct 2? What best way to go about making the bullets? Create each individual bullet? Use particles?

  • 1. Spawning another object allows you to spawn the object based on the primary objects origin or image points you create. For example, if you have a gun spawning a bullet, you would create an image point at the end of the barrel of the gun and have gun spawn bullet at that image point.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • About 1), there's no real difference, only convenience. The create object allows you to specify exactly where you want it to spawn.

  • Great, thanks! Makes perfect sense.

    So how about that shotgun blast? Any ideas?

  • You wouldn't be able to tell when a particle hit a target, is that important?

    I would use bullets, and have them rotate toward angle 90 an increasing amount each tick.

    edit: my game Orbital bomb-Bounder is doing a simple gravity like that, the speed of the ball is set by the distance from the center, and it rotates toward the center each tick.

  • Here's how I would do it.

    Repeat 10 Times:

    Gun: Spawn bullet

    Bullet: Rotate random(-15,15) degrees clockwise

    Bullet: Move forward random(0,15) pixels.

    Obviously you'd play with those values to get a shotgun with the spread, number of bullets, etc you'd want. I added the last action so that the bullets look a little more random while they are flying.

  • Here's how I would do it.

    Repeat 10 Times:

    Gun: Spawn bullet

    Bullet: Rotate random(-15,15) degrees clockwise

    Bullet: Move forward random(0,15) pixels.

    Obviously you'd play with those values to get a shotgun with the spread, number of bullets, etc you'd want. I added the last action so that the bullets look a little more random while they are flying.

    This Really helped thanks alot!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
353 32,066
yojona's avatar
yojona
Unread hot topic Locked topic
198 18,653
Tom's avatar
Tom Construct Team Founder
Unread sticky
192 1,337,375
Kyatric's avatar
Kyatric Construct Team Support