witam mam pytanie gdzie w tym kodzie może być niepotrzebny znak ja jakoś nie mogę znaleźć
GML
aa=instance_nearest(x,y,major)
{
if aa.wsiadanie=1 and keyboard_check(vk_control)
{
aa.wsiadanie=0
}
}
with (aa)
{
if wsiadanie=0
{
image_angle=direction
direction = point_direction( x , y , mouse_x , mouse_y ) //
// poruszanie
if ( point_distance( x , y , mouse_x , mouse_y ) > 5 )
{
s = 5 // prędkość poruszania na boki
if( keyboard_check( ord('A'))or keyboard_check( vk_left ))
{
x += lengthdir_x( s, direction + 90 );
y += lengthdir_y( s, direction + 90 );
}
else
if( keyboard_check( ord('D'))or keyboard_check( vk_right ))
{
x += lengthdir_x( s, direction - 90 );
y += lengthdir_y( s, direction - 90 );
}
if ( keyboard_check( ord('W') )or keyboard_check( vk_up ))
speed = 5
else
if ( keyboard_check( ord( 'S' ) )or keyboard_check( vk_down ))
speed = -3
else
speed = 0
}
else
speed = 0
}
// ***.
aa=instance_nearest(x,y,auto)
if distance_to_object(aa) <20
{
if keyboard_check(vk_control)
{
aa.wsiadanie=1
}
}
with (aa)
{
if wsiadanie=1
{
if keyboard_check(vk_left) and (speed != 0 and speed>=1){
direction+=3
image_angle+=3
}
if keyboard_check(vk_right) and (speed != 0 and speed>=1){
direction-=3
image_angle-=3
}
if keyboard_check(vk_up){
friction=0;
direction=auto.direction;
speed+=0.3;
}
if(speed>=60)
{
speed=60;
}
}
if keyboard_check(vk_down){
friction=0;
direction=auto.direction;
speed-=0.1;}
image_angle=direction
}
if aa.wsiadanie=1
{
visible=0
}