GameMaker Cookbook by Gardiner Brandon

GameMaker Cookbook by Gardiner Brandon

Author:Gardiner, Brandon [Gardiner, Brandon]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2015-12-22T16:00:00+00:00


Add a Step event and place a code block in the Actions box.

Enter the following code:audio_emitter_position(snd_emitCar, x, y, 0); audio_emitter_velocity(snd_emitCar, hspeed, vspeed, 0);

Add an Outside Room event, which is under the Other events.

Place a code block and enter the following code:if global.carSpeed < 50 { global.carSpeed = (global.carSpeed * 1.2); } sound_stop(snd_sfx_car); instance_create(0, room_height/2, obj_car); instance_destroy();

Once these steps are complete, place an instance of obj_car in the room on the left-hand side about half way down. It doesn't have to be exact as it will correct itself on the second pass anyway. You are now ready to test it. Move your player around to see the effects from different positions and try playing with the falloff settings to see further changes.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.