Bullet range during runtime

For questions about using Classic.

Post » Sun Sep 21, 2008 6:22 am

Is there a way to set bullet range during runtime? for example: player starts with bullet range of 150 pixels. Player grabs a powerup that increases the range to 300 pixels. I cant find it, is there a way?
B
2
S
1
G
4
Posts: 239
Reputation: 1,778

Post » Sun Sep 21, 2008 6:28 am

Probably with some math. If you want to avoid that though, maybe make an invisible ring around the player? Then just resize it if they get a power up.
B
2
S
2
G
5
Posts: 391
Reputation: 2,432

Post » Sun Sep 21, 2008 6:33 am

yeah that would be a good alternative but through the bullet behavior I dont think theres a way :(
B
2
S
1
G
4
Posts: 239
Reputation: 1,778

Post » Sun Sep 21, 2008 6:53 am

You could make two different bullets.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Sep 21, 2008 7:28 am

make your own range variable that can be controlled:

always add 1 to private value of bullet 'bulletvalue'
if 'bulletvalue' = 'customrangevalue', do action

set 'customrangevalue' with the powerup. larger that value is, the longer it will last -- similar to range.

here's an example .cap:

http://upload.dfyb.net/uploaded/bulletrange.cap
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Sun Sep 21, 2008 8:03 am

heh thanks for the help, cant believe I asked about something so trivial as this, staying up late does that to you :roll:
B
2
S
1
G
4
Posts: 239
Reputation: 1,778


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests