Radar script umschreiben

  • Radar script umschreiben

    Hi
    Kann mir einer das radar script umschreiben es funkzioniert leider nicht mehr in der 6.0 version von gmaker!

    {
    //Set these variables for different radar sizes etc.
    border_color=c_red;
    inner_color=c_black;
    radar_width=100; //The size of the radar is 4:3, just like the room.
    radar_height=100;
    dot_color[0]=c_red;
    dot_color[1]=c_blue;
    dot_color[2]=c_purple;
    viewrect_color=c_red;

    //First, we draw the rectangle of the radar.
    pen_color=border_color;
    brush_color=inner_color;
    brush_style=bs_solid;
    draw_rectangle(view_left[0],view_top[0],view_left[0]+radar_width,view_top[0]+radar_height);

    //Now we will draw the rectangle of the current view.
    draw_rectangle(view_left[0]+view_left[0]/room_width *radar_width,
    view_top[0] +view_top[0] /room_height*radar_height,
    view_left[0]+(view_left[0]+view_width[0])/room_width *radar_width,
    view_top[0] +(view_top[0]+view_height[0])/room_height*radar_height);

    //Now we draw the dots of the objects.
    brush_color=dot_color[0];
    with(objectname) //That is the first object to be shown on radar
    {
    draw_pixel(view_left[0]+x/room_width*mouse.radar_width +1,
    view_top[0]+y/room_height*mouse.radar_height+1);
    }

    brush_color=dot_color[1];
    with(objectname) //That is the second object to be shown on radar
    {
    draw_pixel(view_left[0]+x/room_width*mouse.radar_width +1,
    view_top[0]+y/room_height*mouse.radar_height+1);
    }


    mfg RingDing
  • Quellcode

    1. {
    2. //Set these variables for different radar sizes etc.
    3. border_color=c_red;
    4. inner_color=c_black;
    5. radar_width=100; //The size of the radar is 4:3, just like the room.
    6. radar_height=100;
    7. dot_color[0]=c_red;
    8. dot_color[1]=c_blue;
    9. dot_color[2]=c_purple;
    10. viewrect_color=c_red;
    11. //First, we draw the rectangle of the radar.
    12. draw_set_color(inner_color);
    13. draw_rectangle(view_left[0],view_top[0],view_left[0]+radar_width,view_top[0
    14. ]+radar_height, false);
    15. draw_set_color(border_color);
    16. draw_rectangle(view_left[0],view_top[0],view_left[0]+radar_width,view_top[0
    17. ]+radar_height, true);
    18. //Now we will draw the rectangle of the current view.
    19. draw_rectangle(view_xview[0]+view_x_view[0]/room_width *radar_width,
    20. view_yview[0] +view_yview[0] /room_height*radar_height,
    21. view_xviewt[0]+(view_xview[0]+view_wview[0])/room_width *radar_width,
    22. view_yview[0] +(view_yview[0]+view_hview[0])/room_height*radar_height);
    23. //Now we draw the dots of the objects.
    24. draw_set_color(dot_color[0]);
    25. with(objectname) //That is the first object to be shown on radar
    26. {
    27. draw_point(view_xview[0]+x/room_width*mouse.radar_width +1,
    28. view_yview[0]+y/room_height*mouse.radar_height+1);
    29. }
    30. draw_set_color(dot_color[1]);
    31. with(objectname) //That is the second object to be shown on radar
    32. {
    33. draw_point(view_xview[0]+x/room_width*mouse.radar_width +1,
    34. view_yview[0]+y/room_height*mouse.radar_height+1);
    35. }
    Alles anzeigen


    So dürfte es gehen, habs net probiert.
  • Ich habs grad ausprobiert... klappt aba net!
    Oda ich binnm zu blöd um etwas zu kopieren und anschließend einzufügen^^

    Edit: Wenn ich den script nach syntax errors durchsuche, dann markiert er mir dat da:
    view_yview[0] +(view_yview[0]+view_hview[0])/room_height*radar_height);

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von TrunX ()

  • Benutzer online 1

    1 Besucher