Set sprites Bullet speed permanent Forum Home > Construct 2 General > How do I....? |
Post Reply
|
| Author | |
Post Options
Quote Reply
Topic: Set sprites Bullet speed permanentPosted: 16 Mar 2012 at 1:44am |
|
|
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?
Edited by klaypigeon - 16 Mar 2012 at 5:27am |
|
![]() |
|
Post Options
Quote Reply
Posted: 16 Mar 2012 at 1:47am |
|
|
Try creating a variable and setting the speed to that variable :)
|
|
![]() |
|
Post Options
Quote Reply
Posted: 16 Mar 2012 at 1:50am |
|
|
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! Edited by klaypigeon - 16 Mar 2012 at 5:28am |
|
![]() |
|
Post Options
Quote Reply
Posted: 16 Mar 2012 at 1:53am |
|
|
@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.
|
|
![]() |
|
Post Options
Quote Reply
Posted: 16 Mar 2012 at 2:16am |
|
|
Think I've got it: http://dl.dropbox.com/u/28504422/see.capx
|
|
![]() |
|
Post Options
Quote Reply
Posted: 16 Mar 2012 at 2:20am |
|
|
Nope it doesn't, never mind, i got lost too :P
|
|
![]() |
|
Post Options
Quote Reply
Posted: 16 Mar 2012 at 2:35am |
|
|
@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 :) |
|
|
Try HEX'N AROUND in the C2 Arcade!
|
|
![]() |
|
Post Options
Quote Reply
Posted: 16 Mar 2012 at 2:40am |
|
|
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.
|
|
![]() |
|
Post Options
Quote Reply
Posted: 16 Mar 2012 at 3:13am |
|
|
LOL - NP
|
|
|
Try HEX'N AROUND in the C2 Arcade!
|
|
![]() |
|
Post Options
Quote Reply
Posted: 16 Mar 2012 at 10:21am |
|
|
@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. |
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |