Two short questions.

Get help using Construct 2

» Thu Jun 20, 2013 8:33 pm

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?
B
7
S
2
Posts: 51
Reputation: 627

» Thu Jun 20, 2013 8:41 pm

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.

B
101
S
32
G
12
Posts: 1,549
Reputation: 22,103

» Thu Jun 20, 2013 8:50 pm

About 1), there's no real difference, only convenience. The create object allows you to specify exactly where you want it to spawn.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

» Thu Jun 20, 2013 9:02 pm

Great, thanks! Makes perfect sense.

So how about that shotgun blast? Any ideas?
B
7
S
2
Posts: 51
Reputation: 627

» Thu Jun 20, 2013 9:05 pm

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. Paradox2013-06-20 21:08:05
B
255
S
65
G
34
Posts: 907
Reputation: 41,611

» Thu Jun 20, 2013 9:09 pm

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.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,739

» Fri Jan 31, 2014 5:11 am

[QUOTE=sqiddster] 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.[/QUOTE]

This Really helped thanks alot!
B
5
Posts: 1
Reputation: 240