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.

[Bug]Shotgun

4 posters

Go down

[Bug]Shotgun Empty [Bug]Shotgun

Post by Pinneaple Studios Sun 07 Apr 2013, 17:49

Code:
//create
global.wp=1
sg_canshoot=true
rt_canshoot=true
mg_canshoot=true
pl_canshoot=true
global.sgammo=18
global.rtammo=2
global.mgammo=50
//alarm 0
pl_canshoot=true
//alarm 1
sg_canshoot=true
//alarm 2
mg_canshoot=true
//alarm 3
rt_canshoot=true
//global left button
if global.wp=4
if image_index=0
if speed=0
if (global.mgammo>0)
if mg_canshoot=true
{
alarm[2]=5
instance_create(x,y,obj_machinegun)
mg_canshoot=false
global.mgammo-=1
}
//global left pressed
if global.wp=2
if image_index=0
if speed=0
if (global.plammo>0)
if pl_canshoot=true
{
alarm[0]=15
instance_create(x,y,obj_pistol)
pl_canshoot=false
global.plammo-=1
}
else
if global.wp=3
if image_index=0
if speed=0
if (global.sgammo>0)
if sg_canshoot=true
{
alarm[1]=25
a = instance_create(x,y,obj_shotgun)
a.direction = point_direction(x,y,mouse_x,mouse_y)
b = instance_create(x,y,obj_shotgun)
b.direction = point_direction(x,y,mouse_x,mouse_y)-2
c = instance_create(x,y,obj_shotgun)
c.direction = point_direction(x,y,mouse_x,mouse_y)+2
sg_canshoot=false
global.sgammo-=1
}
if global.wp=5
if image_index=0
if speed=0
if (global.rtammo>0)
if rt_canshoot=true
{
alarm[3]=120
global.rtammo-=1
rt_canshoot=false
instance_create(x,y,obj_rocket)
}
pertanyaanya adalah shotgunnya gk mau nembak
http://global.sgammo=ammo shotgun
//sg_canshoot=cek kalo bisa nembak
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

[Bug]Shotgun Empty Re: [Bug]Shotgun

Post by Riza_Farhandi Sun 07 Apr 2013, 18:11

hmmm... kayaknya sih karna ada
"else"nya di atas "if global.wp=3"
tp gak tau juga sih... :/
sorry kl gak membantu Very Happy
Riza_Farhandi
Riza_Farhandi
GM Beginner
GM Beginner

100%
Jumlah posting : 393
Points : 356
Join date : 24.01.13
Age : 25
Lokasi : Tangerang Selatan

http://mrizaf.mywapblog.com/

Kembali Ke Atas Go down

[Bug]Shotgun Empty Re: [Bug]Shotgun

Post by Pinneaple Studios Sun 07 Apr 2013, 18:43

thanks a lot, ternyata aku yg gk teliti
added to special thanks
-----------------------SOLVED---------------------
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

[Bug]Shotgun Empty Re: [Bug]Shotgun

Post by Kevin Blaze Coolerz Sun 07 Apr 2013, 18:50

cma left pressed aja yg (kyk ny) bermasalah Very Happy

Code:

//global left pressed
if (image_index=0 && speed=0)
{
if (global.wp=2 && (global.plammo>0) && pl_canshoot=true)
{
alarm[0]=15
instance_create(x,y,obj_pistol)
pl_canshoot=false
global.plammo-=1
}
else if (global.wp=3 && (global.sgammo>0) && sg_canshoot=true)
{
alarm[1]=25
a = instance_create(x,y,obj_shotgun)
a.direction = point_direction(x,y,mouse_x,mouse_y)
b = instance_create(x,y,obj_shotgun)
b.direction = point_direction(x,y,mouse_x,mouse_y)-2
c = instance_create(x,y,obj_shotgun)
c.direction = point_direction(x,y,mouse_x,mouse_y)+2
sg_canshoot=false
global.sgammo-=1
}
else
if (global.wp=5 && (global.rtammo>0) && rt_canshoot=true)
{
alarm[3]=120
global.rtammo-=1
rt_canshoot=false
instance_create(x,y,obj_rocket)
}}

silakan dicoba
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

[Bug]Shotgun Empty Re: [Bug]Shotgun

Post by Pinneaple Studios Sun 07 Apr 2013, 19:03

udah bisa, cuman salah di "else"
aku gk ngerti script && yg ada gitu-gituannya
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

[Bug]Shotgun Empty Re: [Bug]Shotgun

Post by Kevin Blaze Coolerz Sun 07 Apr 2013, 19:17

sbner ny "else" gk brpengaruh bgi game cma lbih besar aja makan memori (mnurut ku) kalo GAK pake else, krna smua script akan di baca dri atas smpe bawah, kalo ad else maka yg memenuhi aja yg di baca

kmu salah di {} dan bisa di bilang salah else juga Very Happy krna kmu pke if ny brulang kali, shingga else ny di hubungkan dgn if paling akhir yg kmu pake (diatas else) Smile
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

[Bug]Shotgun Empty Re: [Bug]Shotgun

Post by Asuna Sun 07 Apr 2013, 19:47

so, ini udah bener2 solved lum? [Bug]Shotgun 3929217648
mau dilock nih, tapi nunggu respon ke Kevin juga Hammer
Asuna
Asuna
Global Moderator
Global Moderator

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

Kembali Ke Atas Go down

[Bug]Shotgun Empty Re: [Bug]Shotgun

Post by Kevin Blaze Coolerz Sun 07 Apr 2013, 19:51

kalo udah solved sih di lock aja Very Happy

Topic Locked 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

[Bug]Shotgun Empty Re: [Bug]Shotgun

Post by Sponsored content


Sponsored content


Kembali Ke Atas Go down

Kembali Ke Atas


 
Permissions in this forum:
Anda tidak dapat menjawab topik