How do I pickup gun and use it...

Get help using Construct 2

Post » Mon May 09, 2016 2:26 am

hey guys does anyone of you here knows how to pickup and use guns?
the thing is that when i pickup guns and and fired it up it does fine but, the problem is even if i didn't pick up the gun and click fire button it still firing even without the picking up the gun another problem is when i click G button it drop the gun that it picked up recently and even i don't have the gun and click G it spawns/drop the gun....
can someone help me?

here's an screenshot from my event sheet...

http://imgur.com/OjaktF1
B
6
S
1
G
1
Posts: 2
Reputation: 852

Post » Mon May 09, 2016 4:08 am

Hey Edison, your screenshot isn't enough to help out unfortunately. Upload an example cap.x and it will be an easy correction.

From your screen shot every time you press G you will spawn the weapon because their is no other check in place (like checking if you even have a gun to drop).
ImageImage
B
130
S
23
G
7
Posts: 1,078
Reputation: 13,280

Post » Tue May 10, 2016 1:39 pm

have you tried using a boolean variable true/false

If picked up gun - boolean set to true

If dropped gun - boolean false

If pressed fire
Boolean =true -fire

This should do it beacuse if it false it wont do anything
B
52
S
24
G
6
Posts: 391
Reputation: 7,845

Post » Wed May 11, 2016 12:50 pm

thanks guys...im just new in construct 2 and a bit noobish..i'll try your suggestions.thanks
B
6
S
1
G
1
Posts: 2
Reputation: 852

Post » Wed May 11, 2016 1:53 pm

try Noob if Global variable=1 set gun to hero position Imagepoint.x(1,2 or 3)
Imagepoint.Y(1,2 or 3)
B
11
S
1
Posts: 28
Reputation: 1,963


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 20 guests