Set sprites Bullet speed permanent

Get help using Construct 2

Post » Fri Mar 16, 2012 1:44 am

Nub here. Working on a first game to learn this program. Latest snag is that I want to change the bullet speed of my (enemy) sprites. This seems to work fine, but it does not affect newly spawning sprites, just those already in the game. What do I need to do to make this permanent?klaypigeon2012-03-16 05:27:29
B
8
S
4
G
1
Posts: 7
Reputation: 1,423

Post » Fri Mar 16, 2012 1:47 am

Try creating a variable and setting the speed to that variable :)
B
7
S
1
G
1
Posts: 37
Reputation: 1,159

Post » Fri Mar 16, 2012 1:50 am

I am trying to do this from work and cannot seem to get google+ to give up a url to 1 photo. Will try again.
Code Here!klaypigeon2012-03-16 05:28:03
B
8
S
4
G
1
Posts: 7
Reputation: 1,423

Post » Fri Mar 16, 2012 1:53 am

@dengue That's what I did (see link above). I am confused why it is only affecting in play instances though rather than adjusting the values of the "master" object.
B
8
S
4
G
1
Posts: 7
Reputation: 1,423

Post » Fri Mar 16, 2012 2:16 am

Think I've got it: http://dl.dropbox.com/u/28504422/see.capx
B
7
S
1
G
1
Posts: 37
Reputation: 1,159

Post » Fri Mar 16, 2012 2:20 am

Nope it doesn't, never mind, i got lost too :P
B
7
S
1
G
1
Posts: 37
Reputation: 1,159

Post » Fri Mar 16, 2012 2:35 am

@klaypigeon, is there any way you can post your Capx?   

Essentially, when you spawn a sprite with bullet behavior, it will automatically set at the "default" speed the bullet behavior is set at. So you need to make sure the speed is set for Every spawned bullet if it varies from the default.

Example: So right after you have Gun spawn bullet, set speed of bullet behavior on bullet sprite to variable that changes on a different event.

May not be what your looking for, so a capx might help :)
B
192
S
6
G
7
Posts: 213
Reputation: 10,178

Post » Fri Mar 16, 2012 2:40 am

Thanks. I can do that. From what your saying, It doesn't sound like the parent object can be modified, only instances. at this point I would be embarrassed to post a capx! This is just an exercise.
B
8
S
4
G
1
Posts: 7
Reputation: 1,423

Post » Fri Mar 16, 2012 3:13 am

LOL - NP
B
192
S
6
G
7
Posts: 213
Reputation: 10,178

Post » Fri Mar 16, 2012 10:21 am

@klaypigeon >
When you create a sprite, and you put the bullet behavior on it, in the property panel you have some properties for the behavior, one is "speed".
If you have only one instance and you set a speed it will be kept as a template for runtime created bullets.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Next

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, jul, nicklowkcmagic, randomly and 17 guests