Welcome to the Badnik Base Zone

- Simple Motobug

as seen in the first zone of Sonic After the Sequel

it just moves back and forth

1:first, just add an active them set the sprite you want for the badnik

try to get used to this animation editor, it's not hard to

ok, now that you have the badnik sprite, lets go to the events list editor, i mean, program the badnik

2: now in the events editor, go to the bottom of the page and...

Right click the place highlighted in red and do pretty much what the image says.

it should create a group and it's inside of the group where we are going to program the badnik

3: now, lets program this little guy.

First, in the group, click new condition. then a list will appear, double click on the first object on this list (it's called Special btw) and click on always

it should look like this

and then click the Insert your action here, find the motobug in the list

double click it and...

yeah... it will add a number to the Alterable Value you chose, in this case, lets chose Alterable Value A

it should look like this:

Hey, as i said before, Sonic Worlds Runs at 60 Frames per second, which means that every second it will add 60 to the Alreable Value A

4: alright, now click the New condition again but this time find the motobug on the list, doubleclick it and...

Now, in the window that appears next:

See the thing highlighted in red? it means that if the Alterable Value A is Lower than 60, something will happen.

now, Ctrl+C and Ctrl+V this event and change the lower to greater

it should look like this:

There is one more thing to do, Ctrl+C and Ctrl+V one of those again but this time, set it to Equal to 120

5: alright, now it's time to make stuff happen

we are going to make the motobug move to one direction... "but how"?

ok, this is kinda complicated so lets go step by step.

click in the insert your action here on the Alterable Value A < 60

find the motobug again and click on...

A window have appeared, and now click on the Retrieve data from an object

Another List will appear and again, find the motobug, double click it and...

Click on the X Coordinate and you will see a strange code on the window but now, all you have to do is add a +1 to the end of it

X( "Name of your object" )+1

and Done... now, Ctrl+C Ctrl+V this on the Alterable Value A > 60 but change the +1 to -1

almost forgot, for the Alterable Value A = 120

just set the Alterable value A to 0

in the end, it should look like this

YEAH, now you got a badnik that moves back and forth... and that's it

"but hey, how do i get it to interact with the player"?

5 - Interaction with the player

This is actually pretty simple, first, lets go back to Act 1.

Remember the groups? now, go to:

Objects management > Common Objects > Enemies > Mechapig

See, this is how the badnik interacts with the player. But how do you make your badnik interact with the player?

First, Copy those 3 lines of code to your badnik's group

Now, you could just double click the "red square is orverlapping mechapig" and select your badnik instead of the mechapig but there is an easier way

Drag your badnik to the mechapig! like this

Now, do this with pretty much every other mechapig, except the one with the "Create explosion at..."

to replace it, just double click it, fund set your badnik as where the explosion should be created

in the end, it should look like this

And, that's all folks, hope you enjoyed it

ready for more? just head back to ACT 2