Skocz do zawartości

Radarow

Użytkownicy
  • Postów

    24
  • Dołączył

  • Ostatnia wizyta

Osiągnięcia Radarow

Chicken

Chicken (1/13)

0

Reputacja

  1. Nie ma co pisać odpowiedzi bo problem leżał głęboko w mojej grze i raczej nikt oprócz mnie tego nie ogarnie a sam kod działa normalnie
  2. Problem rozwiązałem sam. Dzięki za niezainteresowaniem się moim tematem :) Na serio dzięki bo przez to sam usiadłem do tego i coś wymóżdżyłem no i teraz czuje się jak jakiś mistrz gml'a B)
  3. Witam po długiej przerwie powróciłem do game makera i powoli tworzę grę. Ostatnią z bardziej kłopotliwych jak na razie rzeczy to skok z dołu na platformę. Jest to gra dla 2 graczy więc podstawowy kod nie wchodził w grę więc znalazłem taki oto kod na oficialnym forum: GML if vspeed >= 0 //if the player is falling or standing on the platform { if !place_meeting(x,y,crosjump) //if you are NOT INSIDE crosjump { if place_meeting(x,y+vspeed+1,crosjump) //but you are about to fall into (or are standing on) crosjump { if !keyboard_check_pressed(vk_down) //so long as the down button is not pressed { vspeed=0; //stop falling gravity=0; //no, really, stop falling while(!place_meeting(x,y+1,crosjump)) //while the player is not making a pixel-perfect collision { y+=1; } //move another pixel down, until you collide with the platform perfectly } else //if the down button is pressed { gravity=0.7; //reset to your normal gravity factor as you listed above y+=1; //make extra sure you are inside the platform so that all the above code is skipped } } } } wciąż się uczę więc nie znam się na tym, ale ten kod najprawdopodobniej jest poprawny bo działa w mojej prostej starej gierce ale w tej już nie... Już nie mam pojęcia o co chodzi, kiedy wskakuje na platformę moja postać nic sobie z tego nie robi a w starej gierce wszystko działało. Kombinowałem z maskami i kolizją ale nic to nie daje. Jak będzie coś potrzebne to wkleję bo nie chce wrzucić czegoś niepotrzebnie żeby nie trzeba było scrollować całego tematu.
  4. dzięki nie miałem pojęcia o takim czymś jak instance_nearest a to działa mniej więcej tak jak bym chciał. Jutro spróbuje to ulepszyć i dodać jeszce z biciemi. Napisze tu jutro rezultat albo mój problem. Dziś już muszę odpocząć.
  5. Tworze powoli AI dla bijatyki 2D. Na razie mam tyle że przeciwnik podchodzi do gracza, ale tylko jednego i tu mam pytanie jak można zrobić by wybierał jakiego gracza atakować, ale tak aby nie biegał co chwile od jednego do drugiego tylko jak np. inny gracz wejdzie mu w drogę albo zacznie atakować?
  6. No masz racje. Nie zagłębiałem się jak na razie w wykorzystanie tego obiektu, a teraz mam kilka pomysłów i chyba to jak narazie najlepsze rozwiązanie do mojej gry, no chyba że jeszcze ktoś ma jakiś pomysł. Dzięki wszystkim za pomoc.
  7. Zrobiłem sposób z tworzącym się niewidzialnym obiektem co pozwoliło mi wywalić pare niepotrzebnych kolizji, ale ten sposób jest troche ograniczony. Co do przykładu Sutikku to tak średnio u mnie działa.
  8. Powoli robię swoją bijatykę 2D, ale im dalej tym coraz więcej problemów i bałaganu w mojej grze. Chcę to teraz ogarnąć i nawet powoli idzie tylko największym problemem jest system walki, mam w głowię grę z masą postaci do grania przez co z każdą następną dochodzą nowe ciosy. Mam to tak wszystko biednie zrobione że gdy bije to zamieniam się w inny obiekt, a przeciwnik ma na mnie kolizje i obrywa, tylko że ten sposób wymaga za dużo pracy i robi się bałagan. Mam jak na razie 6 postaci a każda z nich ma po kilkanaście kolizji na różne ciosy innej postaci. Na pewno jest jakiś lepszy sposób, szukałem ale nie znalazłem nic co by jakoś znacząco pomogło. Macie jakieś pomysły? jakby co to nie jest bijatyka w której liczą się hitboxy, gra przypomina Little Fightera i gracz po prostu obrywa.
  9. nic to nie dało. Mam coś gdzieś zepsute, że odejmowanie życia nie działa i wyskakuje error. Zrobiłem drugą grę i tam wszystko działa. Chyba zaczne wszystko od nowa bo ta gra to mój pierwszy projekt i mam tam wszystko nawalone a teraz na spokojnie już bardziej ogarnięty będę i powinno być dobrze ^_^ . Dzięki wszystkim za pomoc. Już wiem w czym był błąd. Miałem zrobiony wybór postaci na podstawie change instance i przez to ten error. Teraz dodałem te kody także do spawnu i wszystko działa.
  10. Też nic nie pomaga. Ciągle przy przy uderzeniu error. Stworzyłem na szybko nową grę i tam wszystko ładnie działa. Coś jest nie tak z moją grą.
  11. ten co jest w moim pierwszym poście.
  12. dzięki przyda się tylko że problem jest w tym że kiedy gracz jest trafiony przez ten obiekt to wywala error. Coś jest nie tak z odejmowaniem życia, albo z nie wiem czym. Ja już nie mam pomysłu przez co ten error.
  13. nadal to samo. Znalazłem jeszcze inny błąd, że miałem u drugiego gracza hp<=0 zamiast hp2<=0 ale to też nic nie dało.
  14. informacje: Player 1: Information about object: naruto Sprite: narutostoi Solid: false Visible: true Depth: 0 Persistent: false Parent: Mask: No Physics Object Create Event: set variable facing to 0 execute code: hp = 100; Step Event: if relative position (0,1) is collision free for Only solid objects set the gravity to 0.5 in direction 270 else set the gravity to 0 in direction 270 if vspeed is equal to 12 set variable vspeed to 12 Collision Event with object wallik: set the vertical speed to 0 Collision Event with object invwall: set the vertical speed to 0 Collision Event with object shurik: execute code: with (other) { hp -= 10; if (hp<=0) instance_destroy(); } Key Press Event for Key: start moving in directions 000100000 with speed set to 10 set the sprite to narutobieg with subimage 0 and speed 1 scale the sprite with 1 in the xdir, 1 in the ydir, rotate over 0, and mirror horizontally set variable facing to 180 Key Press Event for Key: if relative position (0,1) gives a collision with Only solid objects set the vertical speed to -12 set the sprite to sprite4 with subimage 0 and speed 0.9 Key Press Event for Key: start moving in directions 000001000 with speed set to 10 set the sprite to narutobieg with subimage 0 and speed 1 scale the sprite with 1 in the xdir, 1 in the ydir, rotate over 0, and no mirroring set variable facing to 0 Key Press Event for Key: set the sprite to narutolad with subimage 0 and speed 1 Key Press Event for Keypad 0 Key: change the instance into object kyuubi, not performing events Key Press Event for Keypad 2 Key: set the sprite to narutothrow with subimage 0 and speed 1 create instance of object shurik2 at relative position (0,0) with speed 12 in direction facing Key Release Event for Key: start moving in directions 000010000 with speed set to 0 scale the sprite with 1 in the xdir, 1 in the ydir, rotate over 0, and no mirroring set the sprite to narutostoi with subimage 0 and speed 1 scale the sprite with 1 in the xdir, 1 in the ydir, rotate over 0, and mirror horizontally Key Release Event for Key: start moving in directions 000010000 with speed set to 0 set the sprite to narutostoi with subimage 0 and speed 1 Key Release Event for Key: set the sprite to narutostoi with subimage 0 and speed 1 Key Release Event for Keypad 1 Key: set the sprite to narutostoi with subimage 0 and speed 1 Key Release Event for Keypad 2 Key: set the sprite to narutostoi with subimage 0 and speed 1 Player2: Information about object: sasuke2p Sprite: sasukestoi Solid: false Visible: true Depth: 0 Persistent: false Parent: Mask: No Physics Object Create Event: execute code: hp2 = 100; Step Event: if relative position (0,1) is collision free for Only solid objects set the gravity to 0.5 in direction 270 else set the gravity to 0 in direction 270 if vspeed is equal to 12 set variable vspeed to 12 Collision Event with object wallik: set the vertical speed to 0 Collision Event with object invwall: set the vertical speed to 0 Collision Event with object shurik2: execute code: with (other) { hp2 -= 10; if (hp<=0) instance_destroy(); } Key Press Event for A-key Key: start moving in directions 000100000 with speed set to 11 set the sprite to sasukebieg with subimage 0 and speed 1 scale the sprite with 1 in the xdir, 1 in the ydir, rotate over 0, and mirror horizontally set variable facing to 180 Key Press Event for D-key Key: start moving in directions 000001000 with speed set to 11 set the sprite to sasukebieg with subimage 0 and speed 1 scale the sprite with 1 in the xdir, 1 in the ydir, rotate over 0, and no mirroring set variable facing to 0 Key Press Event for F-key Key: if facing is equal to 180 set the sprite to sasukecombo1 with subimage 0 and speed 0.4 scale the sprite with 1 in the xdir, 1 in the ydir, rotate over 0, and mirror horizontally if facing is equal to 0 set the sprite to sasukecombo1 with subimage 0 and speed 0.4 scale the sprite with 1 in the xdir, 1 in the ydir, rotate over 0, and no mirroring Key Press Event for G-key Key: set the sprite to sasukethrow with subimage 0 and speed 1 create instance of object shurik at relative position (0,0) with speed 12 in direction facing Key Press Event for H-key Key: if facing is equal to 180 set the sprite to sasukecombo2 with subimage 0 and speed 0.2 scale the sprite with 1 in the xdir, 1 in the ydir, rotate over 0, and mirror horizontally if facing is equal to 0 set the sprite to sasukecombo2 with subimage 0 and speed 0.2 scale the sprite with 1 in the xdir, 1 in the ydir, rotate over 0, and no mirroring Key Press Event for W-key Key: if relative position (0,1) gives a collision with Only solid objects set the vertical speed to -12 set the sprite to sasukeskok with subimage 0 and speed 0.5 Key Release Event for A-key Key: start moving in directions 000010000 with speed set to 0 set the sprite to sasukestoi with subimage 0 and speed 1 scale the sprite with 1 in the xdir, 1 in the ydir, rotate over 0, and mirror horizontally Key Release Event for D-key Key: start moving in directions 000001000 with speed set to 0 set the sprite to sasukestoi with subimage 0 and speed 1 Key Release Event for F-key Key: set the sprite to sasukestoi with subimage 0 and speed 1 Key Release Event for G-key Key: set the sprite to sasukestoi with subimage 0 and speed 1 Key Release Event for H-key Key: set the sprite to sasukestoi with subimage 0 and speed 1
×
×
  • Dodaj nową pozycję...