Change Firing Modes Global Variable Trouble

Get help using Construct 2

Post » Fri Jan 24, 2014 1:25 am

I've implemented a mechanic where the player can change the firing mode of the machine gun from semi-automatic to automatic. If you press Z, it changes to automatic, and if you press X, it changes back to semi-automatic. I can't figure out how to get that same function with just the Z key (press once for auto, press again for semi).

Simply run into the gun to pick it up, the .capx is commented.

Thanks!

https://www.dropbox.com/s/xeivbcsmgzytrfr/zombie.capx
B
22
S
4
G
1
Posts: 153
Reputation: 1,938

Post » Fri Jan 24, 2014 1:39 am

Its very simple, but first I see that it changes the variable FireMode, but no where in your event sheet can I see the firemode variable doing any thing, how is it changing between auto and semi?
B
8
S
1
Posts: 62
Reputation: 627

Post » Fri Jan 24, 2014 1:40 am

Nevermind I found it, I will now organize your event sheet and add what you wanted.
B
8
S
1
Posts: 62
Reputation: 627

Post » Fri Jan 24, 2014 2:11 am

Sorry I was unable to create the effect you wish
But I felt bad saying that without a result
So I had some things to your game

1) It now costs 150 to spawn in a block
2) You can rotate the block by Pressing R well placing it
3) There is no cash variable
4) When killing a zombie it will say +1 in orange to represent adding to the score.

Sorry that I wasn't able to fix your main problem!
New Version: https://www.dropbox.com/s/eg8axvuqvt4z51e/zombie.capx

If you want any other minor changes, just let me know! (I have to get offline now but send me a message)

[email protected]
B
8
S
1
Posts: 62
Reputation: 627

Post » Fri Jan 24, 2014 2:12 am

There is now a cash variable* not no variable
B
8
S
1
Posts: 62
Reputation: 627

Post » Fri Jan 24, 2014 2:12 am

The +1 effect is created by bullet, rotating the bullets angle to 0 so zombie doesnt effect it, then setting angle of motion to -90 without setting angle. Speed 10, after 2 seconds of being alive it dissapears.
B
8
S
1
Posts: 62
Reputation: 627

Post » Fri Jan 24, 2014 6:05 am

@dilk
Wow thank you so much, I was trying to figure out how to rotate the blocks! The floating numbers from the zombies are really awesome as well! The mechanic I have will work fine, thanks for trying. If I figure it out I'll be sure to tell you.
B
22
S
4
G
1
Posts: 153
Reputation: 1,938

Post » Fri Jan 24, 2014 6:10 am

Fixed!

https://copy.com/RadDJ2Rr2yw2

Instead of SETTING the value FireMode to 1 on Z being pressed I changed it to ADD 1. And added a new event that once Firemod is grater than 1, sets it to 0. So now you can change firing modes with the same key.
B
10
S
4
Posts: 133
Reputation: 1,543

Post » Fri Jan 24, 2014 5:01 pm

@awmace5

Any chance we could work together on this project? I have some great ideas for a wave system & More!
B
8
S
1
Posts: 62
Reputation: 627

Post » Fri Jan 24, 2014 5:43 pm

You can also toggle by using this:

Set firemode -> 1-Firemode
B
34
S
9
G
3
Posts: 517
Reputation: 5,246

Next

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 9 guests