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

Join the forum, it's quick and easy

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
www.gmindo.web.id/forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

membatasi gerak objek di view room.

5 posters

Go down

membatasi gerak objek di view room. Empty membatasi gerak objek di view room.

Post by DONI Sat 30 Mar 2013, 08:24

halo2 nanya lg nih...
saya bikin room dgn size weight=800, Height=600
bagaimana ya cara bikin agar objek tidak bisa kelewat batas view room??
DONI
DONI
GM Beginner
GM Beginner

75%
Jumlah posting : 104
Points : 110
Join date : 14.02.13

Kembali Ke Atas Go down

membatasi gerak objek di view room. Empty Re: membatasi gerak objek di view room.

Post by Kevin Blaze Coolerz Sat 30 Mar 2013, 08:44

Code:
if x >= room_width x = room_width
if x <= 0 x = 0
if y >= room_height y = room_height
if y <= 0 y = 0

berapa pun ukuran room pasti work Very Happy (kecuali ak salah mengetikan kode)
Kevin Blaze Coolerz
Kevin Blaze Coolerz
Admin
Admin

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

http://kevin-blaze-coolerz.blogspot.com/

Kembali Ke Atas Go down

membatasi gerak objek di view room. Empty Re: membatasi gerak objek di view room.

Post by ghoraghori Sat 30 Mar 2013, 18:46

wah kyknya emang harus belajar GML
klo cara saya di DnD bikin obj yg unvisible trus colision actionnya di stop
ghoraghori
ghoraghori
GM Beginner
GM Beginner

100%
Jumlah posting : 145
Points : 207
Join date : 20.03.13
Lokasi : Sidoarjo

Kembali Ke Atas Go down

membatasi gerak objek di view room. Empty Re: membatasi gerak objek di view room.

Post by Asuna Sat 30 Mar 2013, 20:20

@Kevin
katanya di viewnya bukan roomnya, jadi harusnya gini:
Code:
if x < view_xview[0] x = view_xview[0]
if x > view_xview[0]+view_wview[0] x = view_xview[0]+view_wview[0]
if y < view_yview[0] y = view_yview[0]
if y > view_yview[0]+view_hview[0] y = view_yview[0]+view_hview[0]
Asuna
Asuna
Global Moderator
Global Moderator

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

Kembali Ke Atas Go down

membatasi gerak objek di view room. Empty Re: membatasi gerak objek di view room.

Post by Kevin Blaze Coolerz Sat 30 Mar 2013, 20:32

ghoraghori wrote:wah kyknya emang harus belajar GML
klo cara saya di DnD bikin obj yg unvisible trus colision actionnya di stop
harus Very Happy
DnD gk menjamin game kmu akan terlihat Pro

Asuna wrote:@Kevin
katanya di viewnya bukan roomnya, jadi harusnya gini:
Code:
if x < view_xview[0] x = view_xview[0]
if x > view_xview[0]+view_wview[0] x = view_xview[0]+view_wview[0]
if y < view_yview[0] y = view_yview[0]
if y > view_yview[0]+view_hview[0] y = view_yview[0]+view_hview[0]

ooh iy, salah baca Razz
Kevin Blaze Coolerz
Kevin Blaze Coolerz
Admin
Admin

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

http://kevin-blaze-coolerz.blogspot.com/

Kembali Ke Atas Go down

membatasi gerak objek di view room. Empty Re: membatasi gerak objek di view room.

Post by DONI Sun 31 Mar 2013, 06:05

[quote="Kevin Blaze Coolerz"]
Code:
if x >= room_width x = room_width
if x <= 0 x = 0
if y >= room_height y = room_height
if y <= 0 y = 0

berapa pun ukuran room pasti work (kecuali ak salah mengetikan kode)

dah aku coba script di atas dan sama fungsinya dgn :
Code:
if x < view_xview[0] x = view_xview[0]
if x > view_xview[0]+view_wview[0] x = view_xview[0]+view_wview[0]
if y < view_yview[0] y = view_yview[0]
if y > view_yview[0]+view_hview[0] y = view_yview[0]+view_hview[0]
DONI
DONI
GM Beginner
GM Beginner

75%
Jumlah posting : 104
Points : 110
Join date : 14.02.13

Kembali Ke Atas Go down

membatasi gerak objek di view room. Empty Re: membatasi gerak objek di view room.

Post by ghoraghori Tue 02 Apr 2013, 12:35

wah berarti bukan tergantung gameplaynya tpi dri DnD/GML
emang klo udah jadi bisa diliat mana pke DnD/GML?
ghoraghori
ghoraghori
GM Beginner
GM Beginner

100%
Jumlah posting : 145
Points : 207
Join date : 20.03.13
Lokasi : Sidoarjo

Kembali Ke Atas Go down

membatasi gerak objek di view room. Empty Re: membatasi gerak objek di view room.

Post by Kevin Blaze Coolerz Tue 02 Apr 2013, 19:41

^
gk bisa Kacau
tpi pke GML akan lebih fleksible bikin game ny Very Happy
Kevin Blaze Coolerz
Kevin Blaze Coolerz
Admin
Admin

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

http://kevin-blaze-coolerz.blogspot.com/

Kembali Ke Atas Go down

membatasi gerak objek di view room. Empty Re: membatasi gerak objek di view room.

Post by Pinneaple Studios Tue 02 Apr 2013, 22:03

mas kalo ngikutin dua object sekaligus di view dan kedua object tersebut tidak akan keluar dari view gmn?
Pinneaple Studios
Pinneaple Studios
GM Intermediate
GM Intermediate

100%
Jumlah posting : 839
Points : 980
Join date : 06.01.13
Age : 22
Lokasi : Depok :D

Kembali Ke Atas Go down

membatasi gerak objek di view room. Empty Re: membatasi gerak objek di view room.

Post by Asuna Tue 02 Apr 2013, 22:07

^
kok nanya disini? membatasi gerak objek di view room. 883715920

baiklah.. cara diatas juga bisa kok membatasi gerak objek di view room. 4284594497
Asuna
Asuna
Global Moderator
Global Moderator

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

Kembali Ke Atas Go down

membatasi gerak objek di view room. Empty Re: membatasi gerak objek di view room.

Post by Kevin Blaze Coolerz Tue 02 Apr 2013, 22:08

^
kalo gitu view ny hrus di bagi 2
ak prnah download example ny, & kyk ny ak msih ingat cara buat ny
Kevin Blaze Coolerz
Kevin Blaze Coolerz
Admin
Admin

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

http://kevin-blaze-coolerz.blogspot.com/

Kembali Ke Atas Go down

membatasi gerak objek di view room. Empty Re: membatasi gerak objek di view room.

Post by Pinneaple Studios Tue 02 Apr 2013, 22:14

@Asuna=ntar repost!!
masih confused aku
Pinneaple Studios
Pinneaple Studios
GM Intermediate
GM Intermediate

100%
Jumlah posting : 839
Points : 980
Join date : 06.01.13
Age : 22
Lokasi : Depok :D

Kembali Ke Atas Go down

membatasi gerak objek di view room. Empty Re: membatasi gerak objek di view room.

Post by Asuna Tue 02 Apr 2013, 22:15

^
repost? enggak kok, beda lagi pertanyaannya Hammer
Asuna
Asuna
Global Moderator
Global Moderator

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

Kembali Ke Atas Go down

membatasi gerak objek di view room. Empty Re: membatasi gerak objek di view room.

Post by Sponsored content


Sponsored content


Kembali Ke Atas Go down

Kembali Ke Atas

- Similar topics

 
Permissions in this forum:
Anda tidak dapat menjawab topik