How do I Megaman style Boss

Get help using Construct 2

Post » Sun Jan 29, 2017 7:57 pm

Hi guys.
I am making a platformer but im focused on making enemies,tilesets, items and so on and from time to time i try to put them together in C2.
Im thinking after some levels to have a boss.
That boss must randomly move to 3 places, ground,platform and air.
When he gets there, he executes the attack (ground attack if he is on the ground, air attack if he is on air and so on) and then randomly goes to another of these places and continue this cycle.

Ive searched the "how do i.." with keyword "boss" and got 41 pages of resaults.
Sadly there was nothing there to help me.

Any thoughts on how can i do that?

Thanks in advance. :)
B
21
S
4
Posts: 59
Reputation: 1,261

Post » Sun Jan 29, 2017 8:04 pm

Set up 3 functions that run each event. Use choose (1,2,3) to pick one at random. I guess have him going to a base location after each one is chosen in case the same one is picked. Each function will just simulate the movement for the boss. Only issue comes if the boss can be obstructed in some way, if he takes damage will he back off and return to the base position? You could do that and then pick an event again.
B
46
S
15
G
73
Posts: 2,027
Reputation: 43,461

Post » Sun Jan 29, 2017 8:06 pm

Break down and make a list of exactly what "actions" (what) you want your boss to under what "conditions" (when). Sound familiar? Then make an event for each one, with those conditions and actions.
Mistakes were made.
B
49
S
24
G
107
Posts: 1,581
Reputation: 60,303

Post » Sun Jan 29, 2017 8:59 pm

Thanks guys.
I saw at the store that some people sell exactly what i want!

If i buy them, open the .capx and see what events work for me and then recreate them in my game, i dont have any royalty problems right?
I mean i dont need any assets from the game, i only need to find the way to do certain things in mine.
B
21
S
4
Posts: 59
Reputation: 1,261

Post » Mon Jan 30, 2017 8:38 pm

I ended up buying 2 capx and not using them at all! :D
I did it my own way very easy.
I put an instance var on the boss (0,1,2) and made 3 invisible sprites on the positions i wanted my boss to go.
When var=0 move to sprite 0, when var=1 move to sprite 1 and when var=2 move to sprite 2.
When colide with sprite (0,1,2) execute attack and then change instance var to ->choose(0,1,2)

This way, the boss does a random loop until his dead. :)
B
21
S
4
Posts: 59
Reputation: 1,261


Return to How do I....?

Who is online

Users browsing this forum: ladjuric, plinkie, Syazanie Amirin and 4 guests