Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //bronze
- if (place_meeting(x,y,objItemPlacement)) {
- coinbronze = instance_nearest(x,y,objItemPlacement);
- with(coinbronze){
- if sprite_index = sprCoinBronze{
- instance_destroy();
- }
- if (global.mute_sounds == 1) audio_play_sound(global.soundbronze,5,0);
- global.l_coins += choose(1,2,3,4,5)
- }}
- //silver
- if (place_meeting(x,y,objItemPlacement)) {
- coinsilver = instance_nearest(x,y,objItemPlacement);
- with(coinsilver){
- if sprite_index = sprCoinSilver{
- instance_destroy();
- }
- if (global.mute_sounds == 1) audio_play_sound(global.soundsilver,5,0);
- global.l_coins += choose(5,6,7,8,9,10)
- }}
- //gold
- if (place_meeting(x,y,objItemPlacement)) {
- coingold = instance_nearest(x,y,objItemPlacement);
- with(coingold){
- if sprite_index = sprCoinGold{
- instance_destroy();
- }
- if (global.mute_sounds == 1) audio_play_sound(global.soundgold,5,0);
- global.l_coins += choose(11,12,13,14,15)
- }}
- #endregion
- #region Other code
- ///Star
- if (place_meeting(x,y,objItemPlacement)) {
- goldstar = instance_nearest(x,y,objItemPlacement);
- with(goldstar){
- if sprite_index = sprStar{
- instance_destroy();
- }
- if (global.mute_sounds == 1) audio_play_sound(sndGainLifeSound,5,0);
- if (global.l_star < 3) global.l_star +=1;
- }
- }
- ///Health
- if (place_meeting(x,y,objItemPlacement)) {
- playerheart = instance_nearest(x,y,objItemPlacement);
- with(playerheart){
- if sprite_index = sprHealth{
- instance_destroy();
- }
- if (global.mute_sounds == 1) audio_play_sound(sndGainLifeSound,5,0);
- if (global.l_health < global.l_healthmax) global.l_health +=25;
- }}
- ///Lives
- if (place_meeting(x,y,objItemPlacement)) {
- playerlife = instance_nearest(x,y,objItemPlacement);
- with(playerlife){
- if sprite_index = sprLife{
- instance_destroy();
- }
- if (global.mute_sounds == 1) audio_play_sound(sndGainLifeSound,5,0);
- if (global.l_lives < 3) global.l_lives +=1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement