Re: Falling Rocks like in Ohshit?

Hey.
So, falling rocks come first, as I have experience with those (Mailman did this).
Believe it or not, few things change:
1. The z coordinate gets added.
2. When a rock falls, you subtract the z instead of the y.
3 (Optional). You subtract 1 from the rock's pitch, that is, if you want it to decrease like in Oh shit. The way to accomplish this would be something like the following:

p.update_sound_start_values(rocks[i].sound, rocks[i].sound.start_pan, rocks[i].sound.start_volume, rocks[i].sound.start_pitch - 1)

You may want to double check if any other parameters need to be given for the update_sound_start_values method in BGT, but I doubt it. My port is pretty fateful to the original version.
Next, the rotation. From this point onwards, it's all just a theory.
I will assume that you have the rotation package from Sam's website or it's fixed version.
First, the cannonballs. In addition to the usual (coordinates and the timer), you must also have the facing. This determines how the cannonball will move. After that, it's just as simple as calling the move_3d and passing in the required parameters whenever you wish the cannonball to move. If you really want to be mean, you could also add an upper facing, but I'll leave it up to you with a quick tip: 0 doesn't do anything, -90 moves the object strait down, and 90 does likewise upwards.
Now, calculating the facing between the cannon and the player. This can be achieved by calling the "calculate_x_y_angle" and using the result from the function as the facing for the cannonball. I do believe that the degrees you pass into the function must be the facing of the player, but you may want to experiment with it.
Hope this helps



-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : redfox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector

Reply via email to