Loops

For questions about using Classic.

Post » Fri Jul 29, 2011 4:16 am

Hello,

This is my first project and I am having a bit of trouble (as usual).

I am building a mechanic where pressing space fires a projectile once, but holding space builds-up a private variable "charge", which fires a larger projectile if space is released after "charge" has increased sufficiently.

However, I'd also like to add a rapid fire or multi-bullet firing mode after charging.

Can I somehow use Loops to run my "spawn another object" action several times in quick succession when the space key is released?? Is that a neanderthal method, perhaps someone could recommend something tidier?

here is an address for an example cap (the link function was being wonky for me...)

www.thewizisthe.biz/kruszynski_example1.cap


Any help or reference is great!
Cheers!the_chosen_byte2011-07-29 04:17:34
B
17
S
3
G
4
Posts: 91
Reputation: 3,929

Post » Fri Jul 29, 2011 4:21 am

DERP!
I forgot to include the plug-ins I usedhope this doesn't ruin any ability to check the cap...sorry :/
hope this still werks for some.the_chosen_byte2011-07-29 04:21:50
B
17
S
3
G
4
Posts: 91
Reputation: 3,929

Post » Fri Jul 29, 2011 3:04 pm

404 Error
As for loops - I don't know what exactly you wanna do, but I'd say yes, you could use Repeat and then set how many times to repeat an action.
ImageImage
B
25
S
6
G
8
Posts: 773
Reputation: 6,643

Post » Fri Jul 29, 2011 4:43 pm

bahh, I am the worst haha.

if you care to take another look

www.thewizisthe.biz/example/kruszynski_example1.cap
B
17
S
3
G
4
Posts: 91
Reputation: 3,929

Post » Fri Jul 29, 2011 7:11 pm

Charged shot...Similar post
B
2
S
1
G
1
Posts: 20
Reputation: 640

Post » Fri Jul 29, 2011 7:20 pm

I've changed few things in your cap, but it's all commented. Hope that's how you've wanted.
Download
ImageImage
B
25
S
6
G
8
Posts: 773
Reputation: 6,643

Post » Fri Jul 29, 2011 7:44 pm

Darklander> Thanks I think I was searching for "rapid-fire" or things of this sort

Noga> Yes! That's great and I really see how you did the Loop...also, nice job on the sub eventing and labeling things, Helps keep track of everything
Thanks again!
B
17
S
3
G
4
Posts: 91
Reputation: 3,929


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests