Increasing speed ingame with pickup

Hi!
I hope there isn’t allready a similar post on this topic - however since I am quite new to blender its not easy for me to always find the appropriate keywords to search for. So pls be considerate :slight_smile:

My proplem:
Actually I am trying to do what is sayed in the title. I have some kind of vehicle which I steer with a servo controll. This allows the vehicle to get a certain speed (when I press the upcursor). However I build a pickup ( a sphere) and I want my vehicle to get much faster immediatly when it collided with the sphere.
I already build the sensors and everything but if I just use another motion actuator for my vehicle that should add additional speed (linv in the appropriate direction) nothing happens.

Thank you for your help!

Regards

Hmmm… does the second actuator have a higher value than the 1st one? If so, and nothing is still happening my guess would be that if you have a collide sensor it is only adding the actuator for those few amount of frames. Try making it change a property to a different value. Then if it is that value have it add the second sensor.

This is just guess work though, without a .blend that is all I can do.

Hope that helps!

Another way might be to use states… I love states. :smiley:

You have forward movement created by one servo actuator in one state, but if you get the sphere, it switches states to the second state which has another servo control that moves you forward at a faster speed.

Hey thx for your comments!

I tried implementing the property version since I am not that familiar to states yet :). (but no worries still used them in here a little :wink:
Ok back to topic: I introduced a turboOn property which should be switched to true after the collision. And then if the property is true the forwards key allows more speed than if its false.
However it seems that the vehicle does not even notice the collision since the property is never changed.

I put my file in as an attatchment. I would really be glad if you could take a look at it.

Attachments

Increase_velocity.blend (336 KB)

Ah, ok the .blend helps very much. One little thing though for your “Player Vehicle” on what object are the logic bricks for the arrow keys on?

Hey!
the logic bricks for the arrow keys are in state 2, of the “PlayerVehicle” object I know - thats a little hidden :slight_smile:

I assume that the turboOn is not changed to true because maybe the collsion “Ends” the pickup object before the collision sensor of the PlayerVehicle recognizes the collision. Is that a possible reason? And if do you know any workarround?

Ok I solved that problem! Seems like that was a problem with the different states I already had.
And the collision was not detected because the pickup (sphere) i added was an static object to which the collision sensor does not respond.

However now I do have a new problem. My vehicle starts to move forward without me pressing anything.
Any good ideas how I can stop this? File is attatched!

Edit:
problem solved

Attachments

vehicleDoesNotStop.blend (348 KB)