www.gmindo.web.id/forum
Forum ini sudah tidak dipakai lagi. Silakan ke forum baru di www.gmindo.web.id/forum Very Happy

Terima kasih

[ASK]Gimana Caranya biar jalan merayap? pada game platform

Topik sebelumnya Topik selanjutnya Go down

[ASK]Gimana Caranya biar jalan merayap? pada game platform

Post by lintangpamungkas94 on Tue 25 Mar 2014, 00:23

Btw ane jarang" ngepost nih jd sori kalo ada salah aturan..Hammer 
Ane punya kodingan begini di objek jagoan pada event step:

if keyboard_check_released (vk_left) {action = 0}
if action = 0{sprite_index = spr_jagoan; image_speed = 0.10; image_xscale = -1; x = x}
if keyboard_check_released (vk_right) {action = 1}
if action = 1{sprite_index = spr_jagoan; image_speed = 0.10; image_xscale = 1; x = x}

if keyboard_check_pressed (vk_left) {action = 2}
if action = 2{sprite_index = spr_jalan; image_speed = 0.35; image_xscale = -1; x = x}
if keyboard_check_pressed (vk_right) {action = 3}
if action = 3{sprite_index = spr_jalan; image_speed = 0.35; image_xscale = 1; x = x}

if action = 0 and keyboard_check_pressed (vk_down) {action = 4}
if action = 4{sprite_index = spr_nunduk; image_speed = 0.35; image_xscale = -1; x = x}
if action = 1 and keyboard_check_pressed (vk_down) {action = 5}
if action = 5{sprite_index = spr_nunduk; image_speed = 0.35; image_xscale = 1; x = x}
if action = 4 and keyboard_check_released (vk_down) {action = 0}
if action = 5 and keyboard_check_released (vk_down) {action = 1}

Nah niatnya pengen karakter utama jalan merayap jd nunduk sambil jalan, dengan cara tekan tombol anak panah bawah dan kiri/kanan. itu kayak gmn yah buatnya?
di bantu yaaa Mewek 
avatar
lintangpamungkas94
Newbie
Newbie

75%
Jumlah posting : 20
Points : 17
Join date : 28.07.13

Lihat profil user http://kentangbegadang.blogspot.com

Kembali Ke Atas Go down

Re: [ASK]Gimana Caranya biar jalan merayap? pada game platform

Post by Kevin Blaze Coolerz on Tue 25 Mar 2014, 19:02

Code:
if keyboard_check(vk_down)
{
if keyboard_check(vk_right)
{
x+=5
image_speed=0.35
image_xscale=1
sprite_index=spr_merayap
} else
if keyboard_check(vk_left)
{
x-=5
image_speed=0.35
image_xscale=-1
sprite_index=spr_merayap
} else
{
image_speed=0
sprite_index=spr_merayap
}
}

kira2 gitu code ny.
avatar
Kevin Blaze Coolerz
Admin
Admin

100%
Jumlah posting : 3323
Points : 3795
Join date : 06.01.13
Age : 21
Lokasi : Palembang

Lihat profil user http://kevin-blaze-coolerz.blogspot.com/

Kembali Ke Atas Go down

Re: [ASK]Gimana Caranya biar jalan merayap? pada game platform

Post by lintangpamungkas94 on Wed 26 Mar 2014, 11:07

masih kurang ngerti.. pas di coba karakternya malah nunduk trus gambarnya @.@
tolong di fix donk hehe http://www.4shared.com/XVbZ4yGice/Gambol.html Meneliti

btw link 4sharednya ngape ada adflynya @.@?
avatar
lintangpamungkas94
Newbie
Newbie

75%
Jumlah posting : 20
Points : 17
Join date : 28.07.13

Lihat profil user http://kentangbegadang.blogspot.com

Kembali Ke Atas Go down

Re: [ASK]Gimana Caranya biar jalan merayap? pada game platform

Post by Asuna on Wed 26 Mar 2014, 11:38

pake dropbox gan Dry
avatar
Asuna
Global Moderator
Global Moderator

100%
Jumlah posting : 1711
Points : 1901
Join date : 10.01.13

Lihat profil user

Kembali Ke Atas Go down

Re: [ASK]Gimana Caranya biar jalan merayap? pada game platform

Post by lintangpamungkas94 on Wed 26 Mar 2014, 12:47

nih om https://www.dropbox.com/s/3icq9ft1y0vgji8/Gambol.rar
Rolling Eyes 
avatar
lintangpamungkas94
Newbie
Newbie

75%
Jumlah posting : 20
Points : 17
Join date : 28.07.13

Lihat profil user http://kentangbegadang.blogspot.com

Kembali Ke Atas Go down

Re: [ASK]Gimana Caranya biar jalan merayap? pada game platform

Post by lintangpamungkas94 on Thu 27 Mar 2014, 19:38

lintangpamungkas94 wrote:nih om https://www.dropbox.com/s/3icq9ft1y0vgji8/Gambol.rar
Rolling Eyes 

broh kevin blaze tolong di fix in donk bounce Very Happy 
avatar
lintangpamungkas94
Newbie
Newbie

75%
Jumlah posting : 20
Points : 17
Join date : 28.07.13

Lihat profil user http://kentangbegadang.blogspot.com

Kembali Ke Atas Go down

Re: [ASK]Gimana Caranya biar jalan merayap? pada game platform

Post by Kevin Blaze Coolerz on Fri 28 Mar 2014, 19:06

Step event:
Code:
/*if keyboard_check_pressed (vk_left) {action = 2}
if keyboard_check_pressed (vk_right) {action = 3}
if action = 0 and keyboard_check_pressed (vk_down) {action = 4}
if action = 1 and keyboard_check_pressed (vk_down) {action = 5}
if keyboard_check_released (vk_left) {action = 0}
if keyboard_check_released (vk_right) {action = 1}
if action = 4 and keyboard_check_released (vk_down) {action = 0}
if action = 5 and keyboard_check_released (vk_down) {action = 1}

if action = 0 and keyboard_check_pressed (vk_up) {action = 8}
if action = 1 and keyboard_check_pressed (vk_up) {action = 9}
if action = 8 and keyboard_check_released (vk_up) {action = 0}
if action = 9 and keyboard_check_released (vk_up) {action = 1}

if action = 0{sprite_index = spr_diam; image_speed = 0.10; image_xscale = -1; x = x}
if action = 1{sprite_index = spr_diam; image_speed = 0.10; image_xscale = 1; x = x}

if action = 2{sprite_index = spr_jalan; image_speed = 0.35; image_xscale = -1; x = x}
if action = 3{sprite_index = spr_jalan; image_speed = 0.35; image_xscale = 1; x = x}

if action = 4{sprite_index = spr_jongkok; image_speed = 0.35; image_xscale = -1; x = x}
if action = 5{sprite_index = spr_jongkok; image_speed = 0.35; image_xscale = 1; x = x}

if action = 8{sprite_index = spr_loncat; image_speed = 0.35; image_xscale = -1; x = x}
if action = 9{sprite_index = spr_loncat; image_speed = 0.35; image_xscale = 1; x = x}

if action = 12{sprite_index = spr_tembak; image_speed = 0.35; image_xscale = -1; x = x}
if action = 13{sprite_index = spr_tembak; image_speed = 0.35; image_xscale = 1; x = x}

if action = 16{sprite_index = spr_blink; image_speed = 0.35; image_xscale = -1; x = x}
if action = 17{sprite_index = spr_blink; image_speed = 0.35; image_xscale = 1; x = x}

if action = 0 and mouse_check_button_pressed (ev_global_left_press) {action = 18}
if action = 1 and mouse_check_button_pressed (ev_global_left_press) {action = 19}
if action = 18{sprite_index = spr_shoot; image_speed = 0.55; image_xscale = -1; x = x}
if action = 19{sprite_index = spr_shoot; image_speed = 0.55; image_xscale = 1; x = x}
*/


if keyboard_check(vk_down)
{
    if keyboard_check(vk_right)
    {
    x=x
    image_speed=0.35
    sprite_index=spr_jalan_nunduk
    }
    else
    if keyboard_check(vk_left)
    {
    x=x
    image_speed=0.35
    sprite_index=spr_jalan_nunduk
    }
    else
    {
    sprite_index = spr_jongkok
    image_speed = 0.35
    }
}
else
{
    if keyboard_check(vk_right)
    {
    x=x
    image_speed=0.35
    if sprite_index!=spr_loncat sprite_index=spr_jalan
    if mouse_check_button_pressed(mb_left)
        {
        sprite_index = spr_tembak
        image_speed = 0.55
        }
    }
    else
    if keyboard_check(vk_left)
    {
    x=x
    image_speed=0.35
    if sprite_index!=spr_loncat sprite_index=spr_jalan
    if mouse_check_button_pressed(mb_left)
        {
        sprite_index = spr_tembak
        image_speed = 0.55
        }
    }
}

if keyboard_check_pressed(vk_up)
{
sprite_index = spr_loncat
image_speed = 0.35
}

if keyboard_check_released(vk_right)
or keyboard_check_released(vk_left)
{
sprite_index = spr_diam
image_speed = 0.10
}

if mouse_x < x then image_xscale=-1 else image_xscale=1

x=x
y=y
room_caption = 'Created by Lintang Pamungkas'

view_angle = random(global.sh)- global.sh /2
if global.sh > 0 global.sh -=1
if global.sh < 0 global.sh =0

gnti aja smua script di step event dgn yg diatas.

event Collision with obj_tanah
Code:
if sprite_index=spr_loncat sprite_index=spr_diam

avatar
Kevin Blaze Coolerz
Admin
Admin

100%
Jumlah posting : 3323
Points : 3795
Join date : 06.01.13
Age : 21
Lokasi : Palembang

Lihat profil user http://kevin-blaze-coolerz.blogspot.com/

Kembali Ke Atas Go down

Re: [ASK]Gimana Caranya biar jalan merayap? pada game platform

Post by lintangpamungkas94 on Sun 06 Apr 2014, 22:06

Wah thanks bisa nih XD
biar karakternya bisa nembak gmn yak? kok ane coba nembaknya ke atas mlu?
itu ane tambahin event tombol Ctrl
instance_change(obj_tembak,0);
instance_create(x,y,obj_peluru);

bsa ajarin codingan yg lbh simple ga? Embarassed 
avatar
lintangpamungkas94
Newbie
Newbie

75%
Jumlah posting : 20
Points : 17
Join date : 28.07.13

Lihat profil user http://kentangbegadang.blogspot.com

Kembali Ke Atas Go down

Re: [ASK]Gimana Caranya biar jalan merayap? pada game platform

Post by Kevin Blaze Coolerz on Mon 07 Apr 2014, 19:04

Solved = Locked
avatar
Kevin Blaze Coolerz
Admin
Admin

100%
Jumlah posting : 3323
Points : 3795
Join date : 06.01.13
Age : 21
Lokasi : Palembang

Lihat profil user http://kevin-blaze-coolerz.blogspot.com/

Kembali Ke Atas Go down

Re: [ASK]Gimana Caranya biar jalan merayap? pada game platform

Post by Sponsored content


Sponsored content


Kembali Ke Atas Go down

Topik sebelumnya Topik selanjutnya Kembali Ke Atas

- Similar topics

 
Permissions in this forum:
Anda tidak dapat menjawab topik