Skocz do zawartości

Hanjuso

Użytkownicy
  • Postów

    393
  • Dołączył

  • Ostatnia wizyta

Odpowiedzi opublikowane przez Hanjuso

  1. Niedawno odkrylem, ze place_empty nie dziala jak nalezy. Przedstawie to na rysonku:

    placeempty0yh.th.png

    czarne kwadraty to sa zwykle obiekty ktore sa kwadratami :D

    inny obiekt zamalowuje na zielono miejsca gdzie place_empty=1 a na czerwono place_empty=0

    Pytanie: dlaczego czerwone pole wykracza poza kwadrat?

    Po wielu probach doszedlem do wniosku ze place empty bierze pod uwage sprite_index/mask_index tylko ze w powiekszeniu. Ale dlaczego w powiekszeniu?

    Tak samo jest z place_free, place_meeting, instance_place.

  2. to ci sie powinno przydac

    instance_deactivate_all(notme) Deactivates all instances in the room. If notme is true the calling instance is not deactivated (which is normally what you want).

    instance_deactivate_object(obj) Deactivates all instances in the room of the given object. You can also use all to indicate that all instances must be deactivated or the id of an instance to deactivate an individual instance.

    instance_deactivate_region(left,top,width,height,inside,notme) Deactivates all instances in the indicated region (that is, those whose bounding box lies partially inside the region). If inside is false the instances completely outside the region are deactivated. If notme is true the calling instance is not deactivated (which is normally what you want).

    instance_activate_all() Activates all instances in the room.

    instance_activate_object(obj) Activates all instances in the room of the given object. You can also use all to indicate that all instances must be activated or the id of an instance to activate an individual instance.

    instance_activate_region(left,top,width,height,inside) Activates all instances in the indicated region. If inside is false the instances completely outside the region are activated.

     

    a jezeli nie chcesz sie zbytnio trudzic samemu to mozesz skorzystac z tego:

    instance_deactive_region(view_xview[0],view_yview[0],view_width[0],view_height[0],0,0)
    instance_active_region(view_xview[0],view_yview[0],view_width[0],view_height[0],1,0)

    nie wiem czy to jest dobrze, musisz dopasowac to do swoich potrzeb ale to powinno wygladac mniejwiecej tak jak napisalem

  3. 1. daj okragla maske dla ludzika, bo mozna sie zablokowac w scianie

    2. krew pojawia sie trohe nie tam gdzie powinna

    3. przydaly by sie lezace ciala zabitych.... hmmm..... 'potworow'

    4. mgla, tak zeby nie widziec wszystkiego

    5. wpomniane juz wczesniej naboje

     

    nie jest zle

  4. Zrób tak:

    obj_cr_enemy

    create

    alarm[0]=room_speed*20

    alarm 0

    alarm[0]=room_speed*20
    instance_create(random(room_width),random(room_height),obj_helikopter)

    room_width to szerokosc roomu a room_height to wysokosc, wiec helikoptery beda sie pojawiac w calym roomie. W helikopterze wydaje mi sie ze niepotrzebne jest robienie nastepnego, lepiej zmniejszyc czas po jakim sie maja pojawiac w obj_cr_enemy lub ustawic czesciowo losowa ilosc czasu po jakim maja sie robic.

  5. mozna to zrobic np. tak

    speed+=1
    if keyboard_check(ord('W'))
    {   if keyboard_check(ord('A'))
            {direction=135}
        else
            if keyboard_check(ord('D'))
                {direction=45}
            else
                {direction=90}
    }
    else
    if keyboard_check(ord('S'))
    {   if keyboard_check(ord('A'))
            {direction=225}
        else
            if keyboard_check(ord('D'))
                {direction=315}
            else
                {direction=270}
    }
    else
    if keyboard_check(ord('D'))
    {   if keyboard_check(ord('W'))
            {direction=315}
        else
            if keyboard_check(ord('S'))
                {direction=45}
            else
                {direction=0}
    }
    else
    if keyboard_check(ord('A'))
    {   if keyboard_check(ord('S'))
            {direction=225}
        else
            if keyboard_check(ord('W'))
                {direction=135}
            else
                {direction=180}
    }
    else
    { speed-=1 }
    
    if speed>4 then speed=4

    lub szybciej

    if keyboard_check(ord('A'))
    { motion_add(180,0.5) }
    if keyboard_check(ord('W'))
    { motion_add(90,0.5) }
    if keyboard_check(ord('S'))
    { motion_add(270,0.5)
    if keyboard_check(ord('D'))
    { motion_add(0,0.5) }
    if speed>4 then speed=4

    tylko tutaj trzeba ustawic jeszcze w create tarcie

    friction=0.3

     

    albo mozna zrobic tak jak napisal Zakol, ale u niego jak puscisz przycisk to ludzik sie odrazu zatrzymuje a tu jest taki bajer ze tak sie trohe 'ślizga' :P

    edit. hmmm chyba 3 a teraz to juz chyba 4

  6. w rysowaniu podlogi/sufitu jest taki kawalek

    background_get_texture(textura_sufitu)

    robisz w create tabelke taka jak dal tymon

    tex[0,0]=textura_sufitu_do_lvl1
    tex[1,0]=textura_podlogi_do_lvl1
    tex[0,1]=textura_sufitu_do_lvl2
    tex[1,1]=textura_podlogi_do_lvl2

    i w rysowaniu sufitu zamiast textura_sufitu wpisujesz

    tex[0,room]

    a podlogi

    tex[1,room]

  7. chodzi mu o to ze jezeli da predkosc np 30 to naboj bedzie na klatke o 30 pixeli sie poruszal a jezeli wrog ma mniej niz 30 pixeli to naboj go przelatuje. ale ja nie wiem za bardzo jak to zrobic, moze dac wieksza maske ale to i tak nie bedzie calkowite rozwiazanie

×
×
  • Dodaj nową pozycję...