Bullet speed not changing via event

Just started using Construct 2? Post your questions here

Post » Fri Apr 18, 2014 4:30 am

A bit about my game: It's a competitive shoot-em-up (shmup) where the goal is to either shoot each other or shoot crystals that will shoot your opponent when shot and claimed. The basic game is done (and on the web! http://games.virtuallycompetent.com/crystalcontrol/ ), and right now I'm working on a patch to allow players to pick different styles for each character that change things like their movement speed, charge times, bullet speeds, etc.

The problem is that I can't seem to change bullet speeds with any sort of consistency. My ideal situation would be to set a variable to a certain number based on what the user picks (i.e. if they pick "Balanced" it sets global variable "L1BulletSpeed" to 300, whereas if they pick "Speed" it sets that same variable to 500) and then that variable gets plugged into the Bullet Speed part of the Bullet behavior for object "L1Bullet" at the start of the next layout. If there's a way to do this, I'm all ears.

As of right now, putting a "change bullet speed" event right after the spawning of a bullet isn't doing any good, even though I have success with changing the angle of bullets when needed. Please help, and thank you.
B
3
G
1
Posts: 6
Reputation: 337

Post » Fri Apr 18, 2014 4:38 am

Ummm...it look interesting but I can't get the game to start. I am suppose to hold WS for 1st player?? Why not have each player hit a certain key to activate their player then click to start?? Cause I held WS for nothing to happen. I am not patient person and have a short attention span and starting up should be simple.
B
23
S
4
G
2
Posts: 364
Reputation: 2,392

Post » Fri Apr 18, 2014 4:41 am

I'll probably change that eventually, but the "hold W+S and up+down to start" thing is more of a benchmark to make sure your keyboard can handle holding 4 keys at once. Some can't. I put in an alternate mode for that using Ctrl+Shift instead of W+S, gets around the key limit on a lot of keyboards.

(Edit - Both players need to be holding both keys to start. Also, it's local 1v1 only. No AI.)
B
3
G
1
Posts: 6
Reputation: 337

Post » Fri Apr 18, 2014 4:45 am

Ok got in very tricky please list the controls cause nothing tell me what to do. I can go up and down but how do I fire.
B
23
S
4
G
2
Posts: 364
Reputation: 2,392

Post » Fri Apr 18, 2014 10:42 am

You can set all variables on every tick

For example I don't that when you are applying bullet speed change but you can also do this way

set every tick bullet speed to [global variable Speed] and change the global variable as per your selection, now it has to change the speed!

Let me know if it works!
Every Game is a Good Game it's just few people like and few does not! Keep coding people some day you will be a "NOTCH".
B
21
S
6
G
3
Posts: 85
Reputation: 4,607

Post » Fri Apr 18, 2014 11:49 am

Every tick will take to much CPU time: but what you can do is set global variables as Bulletspeed = 250. then when you want to increase speed just add Bulletspeed + 200 or whatever you want. There are many ways you can do for example certain time after you can increase bulletspeed to whatever you like like this
Timer > 5 bulletspeed + bulletspeed + 1200 or increase the Acceleration to Bulletrspeed + 1200 or whatever
B
245
S
37
G
15
Posts: 1,940
Reputation: 40,094

Post » Fri Apr 18, 2014 2:41 pm

PhoenixNightly wrote:Ok got in very tricky please list the controls cause nothing tell me what to do. I can go up and down but how do I fire.

If you let the title screen sit still for 15 seconds, a tutorial pops up. :P You hit both buttons at the same time to fire.

Not having much luck with it still. I'll try some more today and see if I can't find something by searching again. Thanks for the help anyway, hope something works soon.
B
3
G
1
Posts: 6
Reputation: 337


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests