Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

[GM7] - Boss Help


Mr.S

Recommended Posts

Well i been trying for a long time to get a boss to work but i am having a problem with a few things:

1. Getting Sonic to bounce in the opposite direction when he hits the boss

2. Getting the boss to flash and be invincible when the boss flashes.

Can anyone help me with those problems ? I am using Kains Sonic 3 Engine.

Link to comment
Share on other sites

Some quick and dirty solutions...

#1. When Sonic hits the boss, do a one-time multiplication of his X and Y velocities by -1; this will make him go in the opposite direction until he decelerates and returns to normal.

#2. I would guess putting the drawing function for Robotnik inside an IF statement, where it's only draw while a variable equals 0 (we'll call it Flash). Then, just toggle it between 0 and 1 for a while, to create the flashing effect.

As for "invincibility", put all the damage code inside another IF statement, and have it only work if the flashing code isn't going on.

Does that help any?

Link to comment
Share on other sites

Well i been trying for a long time to get a boss to work but i am having a problem with a few things:

1. Getting Sonic to bounce in the opposite direction when he hits the boss

2. Getting the boss to flash and be invincible when the boss flashes.

Can anyone help me with those problems ? I am using Kains Sonic 3 Engine.

To set up a boss, first set up the boss object. In the Create Event, put in a code like this:

BossHits = 8
Invincible = 0[/CODE]

In the Alarm 1 Event, put:

Invincible = 0

In the Collision W/ ObjSonic Event, make it so that:

if jumping = true

if Invincible = 0

<Start Of A Block>

Set Alarm 1 to 10

BossHits = -1 (Check the Relative box)

YSpeed = -2 (Check the Relative box)

Invincible = 1

<End Of Block>

I'm not sure if, "jumping" is the jumping variable in Kain's Sonic Engine, so you might have to check objSonic's variables.

In the Step Event, do this:

if BossHits is lower than 0

<Start Of A Block>

Destroy

<End Of Block>

In the Destroy event, do whatever you want, like making Eggman explode or creating a separate object that appears as if he is running away. In the Collision event, you might have to change how long the alarm is.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...