Tappy Chicken Control Help

hi, I want to reprogram tappy chickens controls but not being a programmer I need some help.

so as it is right now when you start the game the chicken comes in fro the left (witch I want to keep but will be lower) and when you start playing you click the mouse/screen and the chicken moves up a certain amount and rotates a bit.

what I want it to do is when you start playing to stay at a certain height playing a sound (sound A) and then move up and play a different sound (sound B)when you click the mouse/screen and display frame 3 of the material/texture, then when you release the mouse/screen it returns to the original height, starts playing the first sound again (sound A) and the material/texture starts animating as usual.

to sum up, basically I want it to run along the ground and jump when pressed, pressing it longer makes the jump higher.

any help appreciated, thanks:)

ok so I still cant work this out, I figured the best thing to do is take it one task at a time, I decided to first try and make to chicken run on the ground, I found that if I drag a box brush under the player in the level the chicken does stay on it but while the chicken is on the ground it wont collide with the obstacles (passes straight through them), I tried converting the brush to a static mesh but then when I add a collision to the mesh as soon as the chicken touches the mesh it dies, I tried importing a static mesh to use but the same thing happened, i have also tried adding meshes to the BP components but then it didn’t do anything.

does anyone know how I can make a floor the chicken can run on without dying and that still allows the chicken to die if it hits an obstacle?

From memory the chicken dies on any type of collision. You would need to change it’s death condition (in the chicken pawn’s blueprint) so that the collision that kills it only casts to the pipes/obstacle blueprint type.

There’s also logic that kicks in when the chicken is below a certain height which probably makes him die. You would have to simply delete those nodes. They should be commented clearly.

true but I found that if you put a box brush in the level under the player but slightly above the ground the chicken would land on it without dying however if you were on the ground hitting an obstacle wouldn’t kill the chicken, I don’t know why the chicken didn’t die when it hit the brush.

yeah, this bit.

I did delete them but then the chicken wouldn’t collide with anything, in the end instead of trying to make something for the chicken to collide with I changed the end of that part of the BP like this.

the chicken now sits on the ground and dies when it hits an obstacle so that’s the first task done, I wouldn’t have been able to work it out without the suggestions, thanks for the help:)

now I need to try and work out how to make the flap higher the longer you press it and drop when released, wish me luck, I have a feeling this bits going to be a pain;)

if anyone has an idea of how to do that please let me know, I have no clue how to do it right now because its part of a custom event with a timeline:p

I’ll give you some hints to get you started:
-you can apply a force every tick to the chicken until a maximum number of ticks is reached (remember that any variable you use to tune the ‘feel’ of the game should probably have a default value set so it’s exposed in the blueprint defaults section and easy to access).
-you may also have to apply a reverse force on flap release depending on if you just want to depend on gravity to pull him down - this is just a one time force application so pretty simple

I tried applying force but it didn’t work, I don’t know if the chickens affected by gravity.

Hi Smokey13, the chicken does not use physics at all, it is all just adding or subtracting from the location with the value coming from a Timeline. You could add relative translation upward when your finger is pressed, and just use the timeline that pushes him down when you release. You would need to tweak the cure in the Timeline, right now it adds and then subtracts, you would just want it to subtract. valise above 0 add, and below 0 subtract.

hi Shane, I didn’t think it was using physics but wasn’t sure, thanks for clarifying.

I tried doing what you said and adding relative translation but I couldn’t get it working, so instead I made the flap timeline make the chicken (I should really stop calling it that:p) go up and then I made a second event and timeline to make the chicken go down (although for some reason the values in the timelines had to be inverted to get the right direction), after that I added a couple of “set can input” nodes so it cant jump when moving down until it hits the ground and now it works just about perfectly, if you hadn’t mentioned the timeline I wouldn’t have worked it out so thanks:)

now I just need to work out how to make the “chicken” material display frame 1 when in the air without stopping the layers panning and the controls are finished.