I Wanna Be The Forums!

General Category => Game Design! => Topic started by: kaelhead on December 30, 2009, 06:55:43 am

Title: How can i make a boss
Post by: kaelhead on December 30, 2009, 06:55:43 am
i spanish little english sry:
my question is how can i make a boss i have sprites and more and next??? step? ???
Title: Re: How can i make a boss
Post by: zapuppy on December 30, 2009, 10:43:07 am
look up a tutorial.
Title: Re: How can i make a boss
Post by: Jksnxia on March 14, 2010, 04:46:47 pm
Are you using Game Maker?
Title: Re: How can i make a boss
Post by: Shikamaru on March 19, 2010, 04:11:33 am
i want to know it too, and yes i use the game maker. need help please~
Title: Re: How can i make a boss
Post by: Jeed-Unit on March 19, 2010, 11:50:12 am
Read these tutorials to understand what you are using first. http://www.yoyogames.com/make/tutorials Then come back with a more specific question.
Title: Re: How can i make a boss
Post by: Shikamaru on March 19, 2010, 03:40:55 pm
a boss that jumps around the room and shoot @ the hero and have 60 hp.
thats my specific question :D.
Title: Re: How can i make a boss
Post by: Jksnxia on March 19, 2010, 05:47:54 pm
in the Create event, set "bosshealth=60" or any variable name like "applehealth=60"

then set if collision with bullet, "bosshealth-=1"

for jumping around you can use codes or path, which one do you wanna use? codes are more precise but paths are easier

to shoot, I suggest using Alarms, in the create event, set like Alarm[0]=100
then add an Alarm 0 event, put in whatever attacks you want, then the boss will attack at the count of 100
Title: Re: How can i make a boss
Post by: Shikamaru on March 20, 2010, 06:10:18 am
thank you :D

i have now  alarm  0 > 100
how can i make him to shoot @ object @ the player?


is that right?

screenshot  http://img214.imageshack.us/img214/4707/screenag.jpg (http://img214.imageshack.us/img214/4707/screenag.jpg)


and if i chance the room to the bossroom  i get this error

Quote
FATAL ERROR in
action number 1
of Other Event: Intersect Boundary
for object player:

Unexisting room number: 0


this is my roomchanger script

Code: [Select]
if (onCollide) {
    room_goto(boss1);
    with (player) instance_destroy();
}
Title: Re: How can i make a boss
Post by: Jksnxia on March 20, 2010, 05:21:13 pm
i have now  alarm  0 > 100

it should be "alarm [ 0 ] = 100", I'm not sure about ">100"

how can i make him to shoot @ object @ the player?

is that right?

screenshot  http://img214.imageshack.us/img214/4707/screenag.jpg (http://img214.imageshack.us/img214/4707/screenag.jpg)

I use codes, I don't use drag and drop often, so I'm not sure, here's what I do in codes:
instance_create(x,y,threat)

and for the object "threat", set it to "move_towards_point(player.x,player.y,5)" the 5 is the speed. You can use drag and drop for this too, you should be able to figure out which ones with these codes.

and if i chance the room to the bossroom  i get this error

Quote
FATAL ERROR in
action number 1
of Other Event: Intersect Boundary
for object player:

Unexisting room number: 0


this is my roomchanger script

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

well, first check to see you have "playerStart" object in the room. Then check if you have anything else that has the same name as the room name, like if you have object "boss1" AND room "boss1", you need to change one of those.
Title: Re: How can i make a boss
Post by: Shikamaru on March 20, 2010, 07:08:07 pm
i have named the room now to bossroom1   and the same error
the playerstart is there too.

here a screenshot from the room.

http://img532.imageshack.us/img532/6185/bossroom1.jpg (http://img532.imageshack.us/img532/6185/bossroom1.jpg)
Title: Re: How can i make a boss
Post by: Jeed-Unit on March 20, 2010, 08:05:01 pm
hmm, in the top bar, go in scripts->check resource names. It will tell you if there is something wrong. But for me, unless you forgot to change your code so it now reads room_goto(bossroom1), I have no idea with the information you gave us :/
Title: Re: How can i make a boss
Post by: Jksnxia on March 20, 2010, 09:32:17 pm
did you change any codes in the object "player"? if so, show us the codes. Also, just want to point out, tijit said in the IWBTE documentation, the room is x=800 y=608   and I don't think you need the world object in the room, I don't have it in any of my rooms and it works fine, but I may be wrong.

one more thing, do you start at the bossroom or do you go through a teleport to get there?
Title: Re: How can i make a boss
Post by: Shikamaru on March 21, 2010, 04:33:34 am
Player Code Intersect Boundary:

Code: [Select]
//ROOM TRANSITIONS
//read the documentation
changeRoom=outsideRoom();

if (changeRoom) {
    roomTo=(instance_position(x,y,roomChanger).roomTo);
   
    if (!place_meeting(x,y,roomChanger)) killPlayer();
    else {
        room_goto(roomTo);
    }
    if (x<0) {x+=800;y-=vspeed;changeRoom=1;}
    else if (x>800) {x-=800;y-=vspeed;changeRoom=1;}
    else if (y<0) {y+=600;x=xprevious;changeRoom=1;}
    else if (y>600) {y-=600;x=xprevious;changeRoom=1;}
}


Screenshot from the teleporter to the boss room:

http://img406.imageshack.us/img406/1496/area1.jpg (http://img406.imageshack.us/img406/1496/area1.jpg)

Title: Re: How can i make a boss
Post by: Jksnxia on March 21, 2010, 12:10:44 pm
do you have any codes in "roomChanger"? you need a "room_goto(bossroom1)" or a creation code for the object in the room, and when you type in the room name, it should appear in another color other than black
Title: Re: How can i make a boss
Post by: Shikamaru on March 21, 2010, 04:41:09 pm
look @ the screenshot there is the code~.

Title: Re: How can i make a boss
Post by: Jksnxia on March 21, 2010, 04:58:53 pm
Code: [Select]
if (onCollide) {
    room_goto(boss1);
    with (player) instance_destroy();
}

try deleteing the if statement
Title: Re: How can i make a boss
Post by: Shikamaru 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 (http://img199.imageshack.us/img199/6075/boss1i.jpg)



and i solved the bullet vanish problem ;) the boss wasnt solid.
Title: Re: How can i make a boss
Post by: SilentLoner on March 21, 2010, 06:29:39 pm
Don't double-post, please.
Title: Re: How can i make a boss
Post by: Jksnxia 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
Title: Re: How can i make a boss
Post by: Shikamaru 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?
Title: Re: How can i make a boss
Post by: Jksnxia 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()}"
Title: Re: How can i make a boss
Post by: Shikamaru 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.
Title: Re: How can i make a boss
Post by: Salamander on March 22, 2010, 06:48:36 am
Probably because theres a space between - and =
There should be no space: -=
Title: Re: How can i make a boss
Post by: Jksnxia 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
Title: Re: How can i make a boss
Post by: Shikamaru 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? ^^
Title: Re: How can i make a boss
Post by: Jksnxia 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
Title: Re: How can i make a boss
Post by: Shikamaru 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.
Title: Re: How can i make a boss
Post by: Jksnxia 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.
Title: Re: How can i make a boss
Post by: Banzai ☼ 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.
Title: Re: How can i make a boss
Post by: Jksnxia 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
Title: Re: How can i make a boss
Post by: Banzai ☼ on March 23, 2010, 02:51:46 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
Danke, dis will help me greatly. Because there are times I like to make things spam at me. Although the n game has given that oppurtunity before.
Title: Re: How can i make a boss
Post by: Jksnxia on March 24, 2010, 03:02:38 pm
Danke, dis will help me greatly. Because there are times I like to make things spam at me. Although the n game has given that oppurtunity before.

n game?
Title: Re: How can i make a boss
Post by: Banzai ☼ on March 24, 2010, 03:37:20 pm
http://www.jeffwu.net/games/ngame.swf
Theres an editor that was pretty decent.
Title: Re: How can i make a boss
Post by: Jksnxia on March 24, 2010, 03:57:52 pm
that's a pretty fun game, and IWBLZ has that as a theme, I didn't know what it was before