[Script] [ACE] xin script về quản lý foder ảnh

luonyeu357luonyeu357 Posts: 84Registered
thường thì mình show ảnh trực tiếp từ thư mục picture của game vd:picture\1.jpg
bây giờ em muốn gọi ảnh 1 thư mục trong picture vd:picture\thu muc 1\1.jpg

Comments

  • slucis7593slucis7593 Posts: 544Registered
    Bạn có thể gọi dòng script:
    screen.pictures[id].show(name, origin, x, y, zoom_x, zoom_y, opacity, blend_type)

    Trong đó (tương ứng như ở trên cửa sổ editor):
    +) id - là id của ảnh
    +) name - là tên ảnh, nếu ở trong subfolder thì thêm subfolder ở trước. Vd: "my-pictures/picture" (chú ý ko ghi đuôi file ảnh)
    +) origin - Nếu muốn Upper Left thì 0, Center là 1
    +) x, y - Vị trí x, y
    +) zoom_x, zoom_y - độ zoom
    +) opacity - độ trong suốt
    +) blend_type - 0 - Normal, 1 - Add, 2 - Sub

    Ví dụ:
    screen.pictures[1].show('my-pictures/picture', 0, 0, 0, 100, 100, 255, 0)
  • luonyeu357luonyeu357 Posts: 84Registered
    slucis7593 wrote:
    Bạn có thể gọi dòng script:
    screen.pictures[id].show(name, origin, x, y, zoom_x, zoom_y, opacity, blend_type)

    Trong đó (tương ứng như ở trên cửa sổ editor):
    +) id - là id của ảnh
    +) name - là tên ảnh, nếu ở trong subfolder thì thêm subfolder ở trước. Vd: "my-pictures/picture" (chú ý ko ghi đuôi file ảnh)
    +) origin - Nếu muốn Upper Left thì 0, Center là 1
    +) x, y - Vị trí x, y
    +) zoom_x, zoom_y - độ zoom
    +) opacity - độ trong suốt
    +) blend_type - 0 - Normal, 1 - Add, 2 - Sub

    Ví dụ:
    screen.pictures[1].show('my-pictures/picture', 0, 0, 0, 100, 100, 255, 0)

    tuyệt vời luôn ;))
Sign In or Register to comment.