Multiple Weapons example?

Get help using Construct 2

Post » Tue Dec 04, 2012 9:43 pm

I have created 4 weapons, will add more later. The weapon sprites are all in one object in different animations.

I want to create a code that will apply to all of the weapons without duplicating them.

As of now, whenever i pick up any weapons, the other remaining weapons will pin to the Player.

I'm trying to use the instance condition but it doesnt quite work well.

Any examples or help?
B
10
S
4
G
3
Posts: 46
Reputation: 3,036

Post » Tue Dec 04, 2012 11:15 pm

Others will appreciate a capx of your project or at least the relevant parts in an image.

B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Tue Dec 04, 2012 11:19 pm

I will take a screenshot.
B
10
S
4
G
3
Posts: 46
Reputation: 3,036

Post » Tue Dec 04, 2012 11:23 pm

I can create an example with ease if you would like to explain in further detail. I could hook you up with an example in less than 10 minutes.
B
17
S
4
G
5
Posts: 226
Reputation: 4,042

Post » Tue Dec 04, 2012 11:31 pm

I want to be able to choose, between 7-10 weapons.

I also want to be able to update the numbers of weapons i can have.

I want to be able to pick up and drop weapons(one weapon at a time), each weapon can have its own unique characteristics.

I want to be able to use instances/families for the weapons.
B
10
S
4
G
3
Posts: 46
Reputation: 3,036

Post » Tue Dec 04, 2012 11:57 pm

Normally I have a MainGun sprite, with multiple animations. I also have an instance variable called type. Along with another called Power, which lets you ratchet up strength as well and one called Damage to define the dmg.

Then, have a section in the events that does different things depending on the type. Power is usually just a multiplier for DMG.
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Wed Dec 05, 2012 12:03 am

[QUOTE=firebelly] Normally I have a MainGun sprite, with multiple animations. I also have an instance variable called type. Along with another called Power, which lets you ratchet up strength as well and one called Damage to define the dmg.

Then, have a section in the events that does different things depending on the type. Power is usually just a multiplier for DMG.
[/QUOTE]

This is something good you should have a read, good suggestion firebelly! +1
B
17
S
4
G
5
Posts: 226
Reputation: 4,042

Post » Wed Dec 05, 2012 1:25 am

Hey dcrew, im still wondering if you can provide an example for me.
B
10
S
4
G
3
Posts: 46
Reputation: 3,036


Return to How do I....?

Who is online

Users browsing this forum: imothep85 and 27 guests