QUOTE (Rusky @ Dec 20 2007, 06:25 AM)
Could you tell us how you're doing the normal notes? Otherwise we'll probably give you a solution that doesn't work with your game.
CODE
Information about object: Green_Fret_norm
Sprite: Gaudy_Green
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent: <no parent>
Mask: act_fretmask
Create Event:
execute code:
depth=800
image_speed=0.30
if number of objects Activater_Green is Larger than 0
move to position (Activater_Green.x,y)
if global.isrealgame is equal to 0
set Alarm 0 to 100
with a chance of 1 out of global.starpowerchangefacter do perform the next action
if draw_hub.star_power_on is equal to 0
set the sprite to Fret_Power with subimage -1 and speed 0.30
Destroy Event:
execute code:
if (draw_hub.star_power_on=true)
{
health+=10
}
else
{
health+=3
}
if global.effects is equal to 1
create a small effect of type flare at (x,y) of color 4227072 above objects
Alarm Event for alarm 0:
destroy the instance
Step Event:
if expression sprite_index=Fret_Power is not true
execute code:
if keyboard_check(global.fretbutton1)
{
if keyboard_check_pressed(global.strumup) || keyboard_check_pressed(global.strumdown)
{
if (point_distance(x,y,Activater_Green.x,Activater_Green.y)<10)
{
draw_hub.alarm[0]=30
global.status="Rockin'"
health+=20
SS_SetSoundVol(global.Guitar,10000)
score+=100
instance_destroy()
exit
}
}
}
if keyboard_check(global.fretbutton1)
{
if keyboard_check_pressed(global.strumup) || keyboard_check_pressed(global.strumdown)
{
if (point_distance(x,y,Activater_Green.x,Activater_Green.y)<15)
{
draw_hub.alarm[0]=30
global.status="Good"
SS_SetSoundVol(global.Guitar,10000)
score+=50
health+=10
instance_destroy()
exit
}
}
}
if keyboard_check(global.fretbutton1)
{
if keyboard_check_pressed(global.strumup) || keyboard_check_pressed(global.strumdown)
{
if (point_distance(x,y,Activater_Green.x,Activater_Green.y)<23)
{
draw_hub.alarm[0]=30
global.status="OK"
SS_SetSoundVol(global.Guitar,10000)
score+=40
health+=5
instance_destroy()
exit
}
}
}
if keyboard_check(global.fretbutton1)
{
if keyboard_check_pressed(global.strumup) || keyboard_check_pressed(global.strumdown)
{
if (point_distance(x,y,Activater_Green.x,Activater_Green.y)>-5) && (point_distance(x,y,Activater_Green.x,Activater_Green.y)<5)
{
draw_hub.alarm[0]=30
global.status="Barely"
SS_SetSoundVol(global.Guitar,10000)
score+=10
instance_destroy()
exit
}
}
}
else
execute code:
if keyboard_check(global.fretbutton1)
{
if keyboard_check_pressed(global.strumup) || keyboard_check_pressed(global.strumdown)
{
if (point_distance(x,y,Activater_Green.x,Activater_Green.y)<10)
{
draw_hub.alarm[0]=30
global.status="Rockin'"
health+=30
SS_SetSoundVol(global.Guitar,10000)
score+=200
instance_destroy()
global.starpower+=global.increaseratio
exit
}
}
}
if keyboard_check(global.fretbutton1)
{
if keyboard_check_pressed(global.strumup) || keyboard_check_pressed(global.strumdown)
{
if (point_distance(x,y,Activater_Green.x,Activater_Green.y)<15)
{
draw_hub.alarm[0]=30
global.status="Good"
SS_SetSoundVol(global.Guitar,10000)
score+=100
health+=15
instance_destroy()
global.starpower+=global.increaseratio
exit
}
}
}
if keyboard_check(global.fretbutton1)
{
if keyboard_check_pressed(global.strumup) || keyboard_check_pressed(global.strumdown)
{
if (point_distance(x,y,Activater_Green.x,Activater_Green.y)<23)
{
draw_hub.alarm[0]=30
global.status="OK"
SS_SetSoundVol(global.Guitar,10000)
score+=50
health+=10
instance_destroy()
global.starpower+=global.increaseratio
exit
}
}
}
if keyboard_check(global.fretbutton1)
{
if keyboard_check_pressed(global.strumup) || keyboard_check_pressed(global.strumdown)
{
if (point_distance(x,y,Activater_Green.x,Activater_Green.y)>-5) && (point_distance(x,y,Activater_Green.x,Activater_Green.y)<5)
{
draw_hub.alarm[0]=30
global.status="Barely"
SS_SetSoundVol(global.Guitar,10000)
score+=10
health+=5
instance_destroy()
exit
}
}
}
if global.ghostfretsmode is equal to 1
execute code:
image_alpha=0.70;
Other Event: User Defined 0:
execute script play_random_screwup with arguments (0,0,0,0,0)
execute code:
health=-global.lostratio
SS_SetSoundVol(global.Guitar,0)