How do I set the bullet speed correctly

Get help using Construct 2

Post » Mon Mar 21, 2016 5:26 pm

Hi there

I`m working on a Platformer-Game and have a Problem with the Bullets. When i shoot at Idle the Bullet spawns with the Bullet Speed, works fine. But when i shoot and walk the Bullet spawns as well in the Bullet Speed. I think its wrong. When i walk the Bullet Speed have to be: BulletSpeed+PlayerSpeed. So how can i realize it? I have try it to make a Event that ask how is the Player Speed an than i set the Bullet Speed to BulletSpeed+PlayerSpeedVariable. The Problem is i dont know how to ask the correctly Player Speed. I have tryed to set the PlayerSpeedVariable to PlatformBehavierSpeed. But it sets the Speed when i stand still to nothing. When i walk it works. But when i Jump Forward it set to nothing and when im falling forwart it sets to nothing. As well he set the Speed when i stand and jump to jumping strength. Its always static and not dynamic to the real Player Speed. Also i have to separate the X Speed and Y Speed? Or only take the X Speed. its enough.

Anyone can help me? Or do i think wrong?


*excuse my bad english*

-----------------
Edit:
If it helps there is a capx: https://www.dropbox.com/s/i9ymvuce9b3if ... .capx?dl=0
But i have deleted the variable bacause it dosent works.
You can find the Position on Layer Game->Chars->Krigel->Player1->Shotgun->shoot_Krigel->Shooting
It only can be played with a XBox Controller at time. Move =D-Pad, Jump= A, shoot= X

Its my fist time i use construct 2 so dont be to hard if it is not programmed so smart ;)
B
9
S
1
Posts: 22
Reputation: 473

Post » Tue Mar 22, 2016 7:09 am

Here's an alternative approach. Create instance an instanc variable called Action for the player and make it text

When the players movement state changes, set the "Action" like; "Stop", "Walk","Run","Jump" etc..
Then use subevents with compare instance varible.

Bullet 》On Created
》Player 》"Walk" 》Set Bullet.Speed 》 Bullet.Speed +30
》Player 》"Run" 》Set Bullet.Speed 》 Bullet.Speed +60
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Tue Mar 22, 2016 8:15 pm

@TheDom
Thanks for answering.
I have make it like this but set not a fixed number like +30 or+60. I have used the Platform Vectory X or Y. Now it works fine. Thank you.
-------------------------
Edit:

[s] Ok it dosnt works so fine. The Problem is when i shoot again with an other BulletSpeed, the Bullets who Spawn earlyear Change the Speed to the new BulletSpeed. How can i fix that? [/s]
Ok, i fix it with settig the command to the bottum, dont know why it works but it works :? :D
B
9
S
1
Posts: 22
Reputation: 473


Return to How do I....?

Who is online

Users browsing this forum: unicornspitfire and 65 guests