I Wanna Be The Forums!

Please login or register.

Login with username, password and session length
Advanced search  

News:

Gaiden 1.2 patch released. Click here to download!

Pages: 1 [2] 3

Author Topic: How can i make a boss  (Read 8384 times)

Jksnxia

  • Full Member
  • ***
  • Posts: 245
  • I make short films too :3 Check out my youtube
    • View Profile
    • me youtube
Re: How can i make a boss
« Reply #15 on: March 21, 2010, 04:58:53 pm »

Code: [Select]
if (onCollide) {
    room_goto(boss1);
    with (player) instance_destroy();
}

try deleteing the if statement
Logged
Creativity and optimisim

Shikamaru

  • Newbie
  • *
  • Posts: 13
  • wazzup?
    • View Profile
Re: How can i make a boss
« Reply #16 on: March 21, 2010, 05:42:24 pm »

omg it work! thank you :D

ok next prob:  the bullets dont vanish if i hit ihm.
and how can i make a start  where the boss say something? ^^

EDIT: the boss shoots dont work they stand in the room D:.
and he dont dies D:.


bossbullet script:
Code: [Select]
instance_create(x,y,deliciousFruit);
move_towards_point(player.x,player.y,5);

boss screenshot(events, scripts, etc):

http://img199.imageshack.us/img199/6075/boss1i.jpg



and i solved the bullet vanish problem ;) the boss wasnt solid.
« Last Edit: March 21, 2010, 06:45:01 pm by Shikamaru »
Logged

SilentLoner

  • Guest
Re: How can i make a boss
« Reply #17 on: March 21, 2010, 06:29:39 pm »

Don't double-post, please.
Logged

Jksnxia

  • Full Member
  • ***
  • Posts: 245
  • I make short films too :3 Check out my youtube
    • View Profile
    • me youtube
Re: How can i make a boss
« Reply #18 on: March 21, 2010, 06:46:12 pm »

for bullet disappearing:

Someone else helped me with this too, go to bullet and set event "collision with (your boss object)" then in codes, you write "other.bosshealth-=1  sound_play(sndBossHit)   instance_destroy()"

for boss attack:

you set it as the boss to move towards player, not the object. So you create a threat, let's say it's the fruit, you name it something like deliciousFruitMove, put the "move_towards_point" code in that object, and delete it from the boss's. Then in the boss's code, change the "instance_create(x,y,deliciousFruit)" to "(x,y,deliciousFruitMove)"


if you set the boss as solid, sure the bullet will disappear, but the boss won't count as hit, so its health won't decrease
Logged
Creativity and optimisim

Shikamaru

  • Newbie
  • *
  • Posts: 13
  • wazzup?
    • View Profile
Re: How can i make a boss
« Reply #19 on: March 21, 2010, 07:09:56 pm »

now i get a error if i hit the boss.

this is now my script within  bullet hits object

Quote
other.bosshealth=-1  sound_play(sndBossHit)   instance_destroy()


and how do i destory the boss if he have 0 hp?
Logged

Jksnxia

  • Full Member
  • ***
  • Posts: 245
  • I make short films too :3 Check out my youtube
    • View Profile
    • me youtube
Re: How can i make a boss
« Reply #20 on: March 21, 2010, 07:15:34 pm »

now i get a error if i hit the boss.

this is now my script within  bullet hits object

Quote
other.bosshealth=-1  sound_play(sndBossHit)   instance_destroy()


and how do i destory the boss if he have 0 hp?

lol it's "other.bosshealth-=1" not "=-1"

for the boss's step event, "if (bosshealth<1){instance_destroy()}"
Logged
Creativity and optimisim

Shikamaru

  • Newbie
  • *
  • Posts: 13
  • wazzup?
    • View Profile
Re: How can i make a boss
« Reply #21 on: March 22, 2010, 04:33:36 am »

now i got this error

Code: [Select]
___________________________________________
FATAL ERROR in
action number 1
of Collision Event with object bullet
for object Boss1:

COMPILATION ERROR in code action
Error in code at line 1:
   other.bosshealth- =1  sound_play(sndBossHit)   instance_destroy()

at position 17: Assignment operator expected.
Logged

Salamander

  • Full Member
  • ***
  • Posts: 244
    • View Profile
Re: How can i make a boss
« Reply #22 on: March 22, 2010, 06:48:36 am »

Probably because theres a space between - and =
There should be no space: -=
Logged
<Kayin> You know, I always said necroing is okay, but the other admins ignore me. :(

Jksnxia

  • Full Member
  • ***
  • Posts: 245
  • I make short films too :3 Check out my youtube
    • View Profile
    • me youtube
Re: How can i make a boss
« Reply #23 on: March 22, 2010, 09:45:55 am »

no I think it's actually because you put the code in the boss object, you should put that code in object bullet collision with object boss
Logged
Creativity and optimisim

Shikamaru

  • Newbie
  • *
  • Posts: 13
  • wazzup?
    • View Profile
Re: How can i make a boss
« Reply #24 on: March 22, 2010, 02:08:31 pm »

i must put the code in the bullet object and create a event

Bullet hits Boss


that means i must create for every boss a event in the bullet object? ^^
Logged

Jksnxia

  • Full Member
  • ***
  • Posts: 245
  • I make short films too :3 Check out my youtube
    • View Profile
    • me youtube
Re: How can i make a boss
« Reply #25 on: March 22, 2010, 06:08:40 pm »

that's the way I do it.

Also I've thought of another way, but I haven't tested yet:

in any boss, in step event, write
if (place_meeting(x,y-1,bullet)){
     bosshealth-=1
     sound_play(sndBossHit)
     with (other) instance_destroy()
}

*EDIT:
tested, works
« Last Edit: March 27, 2010, 09:17:38 pm by Jksnxia »
Logged
Creativity and optimisim

Shikamaru

  • Newbie
  • *
  • Posts: 13
  • wazzup?
    • View Profile
Re: How can i make a boss
« Reply #26 on: March 23, 2010, 03:32:09 am »

yay thank you :D it works.

now the 3 last questions:

1. the boss only shoots one time  with the alarm  0 = 100 event.. why?

2.  how can i chance the path after the boss has only 15 hp


3. how can i do a little start sequenze with text.
« Last Edit: March 23, 2010, 08:07:33 am by Shikamaru »
Logged

Jksnxia

  • Full Member
  • ***
  • Posts: 245
  • I make short films too :3 Check out my youtube
    • View Profile
    • me youtube
Re: How can i make a boss
« Reply #27 on: March 23, 2010, 09:47:38 am »

1. the boss only shoots one time  with the alarm  0 = 100 event.. why?

because alarm [ 0 ] = 100 means at the count of 100, it does something, you don't count 100 twice, you can make more alarms like alarm [ 1 ] = 150 or something

2.  how can i chance the path after the boss has only 15 hp

you mean change? set if (bosshealth<=15){path_end() then assign another}

3. how can i do a little start sequenze with text.

This I'm not really sure, you can either draw the texts with Game Maker, or you can just make a picture of whatever in paint then load it into Game Maker as a background or a sprite that does nothing, so when the player comes in, freeze the player and display the picture(s). I haven't tried this yet either.
« Last Edit: March 23, 2010, 09:52:56 am by Jksnxia »
Logged
Creativity and optimisim

Banzai ☼

  • Hero Member
  • *****
  • Posts: 636
  • Let's get it on!
    • View Profile
Re: How can i make a boss
« Reply #28 on: March 23, 2010, 11:34:46 am »

jks, quick steal for answer, but does the command to make something follow the player only make it so it homes in on them, or so it flies at their direction? I've been recently trying to use this program and I'd like to make objects fly in the direction, but not home in on the player.
Logged

Jksnxia

  • Full Member
  • ***
  • Posts: 245
  • I make short films too :3 Check out my youtube
    • View Profile
    • me youtube
Re: How can i make a boss
« Reply #29 on: March 23, 2010, 12:23:51 pm »

jks, quick steal for answer, but does the command to make something follow the player only make it so it homes in on them, or so it flies at their direction? I've been recently trying to use this program and I'd like to make objects fly in the direction, but not home in on the player.

for staying with the player, the code is x=player.x y=player.y hspeed=player.hspeed etc.

for flying towards it, the code is "move_towards_point(player.x,player.y,3)" in which 3 is the speed of the object flying
Logged
Creativity and optimisim
Pages: 1 [2] 3