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.

Koq Player Ikut mati

3 posters

Go down

Koq Player Ikut mati Empty Koq Player Ikut mati

Post by Pinneaple Studios Mon 11 Mar 2013, 13:20

Info-Obj_player
Information about object: obj_player

Sprite: player
Solid: true
Visible: true
Depth: 0
Persistent: false
Parent: <no parent>
Mask: <same as sprite>

Create Event:
set the health relative to 100

Step Event:
execute code:

if keyboard_check(ord("W"))
{
y-=5
}
if keyboard_check(ord("S"))
{
y+=5
}
if keyboard_check(ord("D"))
{
x+=5
}
if keyboard_check(ord("A"))
{
x-=5
}

image_angle=point_direction(x,y,obj_crosshair.x,obj_crosshair.y)


Keyboard Event for <no key> Key:
start moving in directions 000010000 with speed set relative to 4

Mouse Event for Glob Left Pressed:
execute code:

instance_create(x,y,obj_playerbullet)



Other Event: No More Health:
destroy the instance
--------------------------------------------------------------------------
Info obj_spambot
Information about object: spambot

Sprite: spambot
Solid: true
Visible: true
Depth: 0
Persistent: false
Parent: <no parent>
Mask: <same as sprite>

Create Event:
start moving in directions 010101010 with speed set to 3
set Alarm 0 relative to 2+random(10)
set the health to 100

Alarm Event for alarm 0:
start moving in directions 010101010 with speed set to 3
set Alarm 0 relative to 2+random(10)

Collision Event with object obj_player:
destroy the instance

Collision Event with object obj_playerbullet:
set the health relative to -50

Collision Event with object block:
bounce not precisely against solid objects

Other Event: No More Health:
destroy the instance
--------------------------------------------------
Info for obj_playerbullet
Information about object: obj_playerbullet

Sprite: bullet
Solid: true
Visible: true
Depth: 0
Persistent: false
Parent: <no parent>
Mask: <same as sprite>

Create Event:
execute code:

speed = 10
direction=point_direction(obj_player.x,obj_player.y,obj_crosshair.x,obj_crosshair.y)


Step Event:
execute code:

image_angle=direction


Collision Event with object spambot:
destroy the instance

Uups:
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

Koq Player Ikut mati Empty Re: Koq Player Ikut mati

Post by zebrakelabu Mon 11 Mar 2013, 17:18

Coba code komplit utk collission event spambot dgn objplayerbullet.

Variabel healthnya apa? Ngga boleh sekedar "health" aja lho, krn itu milik objplayernya (jadinya playernya yang mati)

zebrakelabu
zebrakelabu
Admin
Admin

100%
Jumlah posting : 933
Points : 960
Join date : 06.01.13
Lokasi : Jakarta

http://www.project25games.com

Kembali Ke Atas Go down

Koq Player Ikut mati Empty Re: Koq Player Ikut mati

Post by Pinneaple Studios Mon 11 Mar 2013, 17:35

seep, aku dah bikin custom variables
tapi.....
gimana caranya biar dia hancur, kan aku pake
global.plhealth //untuk player
//dan
global.sphealth //untuk spambot
cara spambotnya mati 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

Koq Player Ikut mati Empty Re: Koq Player Ikut mati

Post by Kevin Blaze Coolerz Mon 11 Mar 2013, 18:36

biar mati ya di kurangi global.sphealth nya
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

Koq Player Ikut mati Empty Re: Koq Player Ikut mati

Post by Pinneaple Studios Mon 11 Mar 2013, 18:40

meskipun udah kurang dari NOL masih idup si spambot
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

Koq Player Ikut mati Empty Re: Koq Player Ikut mati

Post by Kevin Blaze Coolerz Mon 11 Mar 2013, 18:43

di obj_spambot, Step:
if global.sphealth <= 0 instance_destroy()

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

Koq Player Ikut mati Empty Re: Koq Player Ikut mati

Post by Pinneaple Studios Mon 11 Mar 2013, 18:56

semua spambotnya mati
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

Koq Player Ikut mati Empty Re: Koq Player Ikut mati

Post by Kevin Blaze Coolerz Mon 11 Mar 2013, 19:01

kirain spambot cma ad 1

kalo gitu jgn pke global var, pake var biasa aja, jdi di create event (spambot) buat var sphealth = 100 (atau brp pun)
trus gnti global.sphealth jdi sphealth
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

Koq Player Ikut mati Empty Re: Koq Player Ikut mati

Post by Pinneaple Studios Tue 12 Mar 2013, 15:44

langsung mati spambotnya
kasi SS klo bisa
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

Koq Player Ikut mati Empty Re: Koq Player Ikut mati

Post by Kevin Blaze Coolerz Tue 12 Mar 2013, 16:48

Pinneaple Studios wrote:langsung mati spambotnya
kasi SS klo bisa

obj_spambot
Create:
sphealth = 100

Step:
if sphealth <= 0 instance_destroy()

ya kmu tau sndiri kan logika ny gimana?
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

Koq Player Ikut mati Empty Re: Koq Player Ikut mati

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