If you liked the tutorial and you are interested to do some exercise you will find some homework here :yes:.
The attached files are start files without the solution ;).
How to run the exercise:
Pick one of the exercises
Read what to do in the post.
Download and open the blend file.
Add objects and logic to create your solution.
You are done when the game does what the exercise requested
Post some feedback
Hints:
Have the guide open for reference
The blend file contains a short note on the exercise too
Have a look at the objects in the blend file
Do not worry the exercises are not difficult.
If you have questions or concerns or you want to present your solution just post here. You can also send me a private message if you do not want to ask in public.
It would be nice if you let me know what you think about this thread (good/bad/boring/to hard).
Any feedback is welcome.
When you are happy with your solution you can post it here. You can ask for a review too.
I’m looking forward to see what solutions you can think of :eyebrowlift:.
Monster
You can find the exercises at the following posts:
The duty is to add another Value Provider.
Add a red ball with a different elasticity placed at another high.
It should provides its bounces too.
Modify the Text Display to display the bounces of the red ball rather than of the yellow ball.
The Graphical Display keeps showing the bounces of the yellow ball.
Cool stuff Monster! Unfortunately my two baby girls do not give me much time with Blender these days- can we describe how we would do an exercise? I don’t want to ruin this for anyone else.
solution:
make a mesh with form of arrow, put the head in the minimum value with rotation default
get the range max from the rotation of arrow(90° degrees about)
from arrow get the value of ball
suppose which the max numb of bounce is 20
90/20 =4.5 (degrees)
so the orientation of arrow is:
value = ball.value
value = min(value,20)
factor = 90 / 20
ori = own.orientation.to_euler()
ori[1] = math.radians(value * factor)
own.orientation = ori
The dial can be animated, so you could then hook up an f curve/ipo/ action logic block. You can then get the bounce property to drive the animation via a message.
This approach could be used for the second test too, so a ball can be small and green at frame 1, and at frame 100 be large and red (assuming this is the way to keyframe colours). So with each bounce, the animation for the green ball advances by a set amount (say, each bounce = 5 frames).
I’m a little inexperienced with the new action logic block, but in older versions f curves could be set to run from properties.
Rubbernuke, that is indeed the solution I prefer. The animation system works like before except you just use the action actuator rather than the IPO/F-Curve actuator which is gone since 2.62.
As MarcoIT shows there are multiple solutions.
I’ve tried to recreate what you’ve done here. Basically opened one of your homework blends and copied it point for point to create a counter. I’m looking for it to count on the press of the space bar. If I change collision to keyboard (space) in your file it works perfectly. In my blend file it won’t work. Could you take a look at the blend and see if there is something I’m missing.
Most of the property names and such match yours exactly for ease of following.