Multiple Weapon System Logic

Get help using Construct 2

Post » Fri Sep 12, 2014 6:29 am

Hey all.

I'm trying to get a character to fire one of a number of weapons depending on the upgrades/selections they have and I'm not sure about how to set up the logic. How can you set it up so that your "fire weapon" command references some other event logic which itself will determine which weapon is selected and is fired? IE if the player has upgrade A then weapon X will fire, but if they have upgrade B then weapon Y will fire.

Thanks!

-Drakkith
B
8
S
2
Posts: 35
Reputation: 572

Post » Fri Sep 12, 2014 8:48 am

Depends how complicated you want to make it.

Array of data would be recommended.
Functions to make it streamlined and mininimal.

But to explain in new user terms.
You will be comparing variables, either data stored in array or via variables

upgradea = 0 or 1
upgradeB = 0 or 1

Set up conditions
upgradeA = 1
upgradeB = 1
then weapon = 1
etc
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Fri Sep 12, 2014 11:42 pm

Thanks, Dutoit. Do you know of any good posts or tutorials on using arrays or functions in this manner?
B
8
S
2
Posts: 35
Reputation: 572

Post » Sat Sep 13, 2014 12:09 am

Update: Found a tutorial on arrays.
B
8
S
2
Posts: 35
Reputation: 572

Post » Sat Sep 13, 2014 8:29 am

I would look at any of the inventory tutorials. There is a great array tut with animals that shows a lot functionality.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests