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

Sonic Heroes


Klonoa

Recommended Posts

I'm making a sonic heroes styled engine with static in TGF and my problem is when I try to change the leader it won't switch.

It's like this; I have 3 counters. Sonic Leader, Tails Leader, and Knuckles Leader. Along with that icon that shows you who is the leader.

If sonic is leader then the Sonic leader counter is set to 1. If tails is leader then sonic's counter is set to 0 and tails' is set to 1 and so on.

When sonic is leader and you press B then I have it switch to knuckles as leader by setting sonic's counter to 0 and knuckles to 1. But the problem is that since everyone uses B and Y to switch to another character, if I press B with sonic as leader (or anyother character as leader) then he doesn't switch and everyone switches at once since like I said and it stays on Sonic.

I set the events like this;

If Sonic Leader = 1 and user presses B= Set Sonic Leader to 0 and set Knuckles Leader to 1.

But it just doesn't change and sonic stays like that. I noticed the counters changed for a split second though. I just need to know how to fix this. So does anyone have any idea what I should do? Or is a 2d Sonic Heroes engine impossible to do?

Link to comment
Share on other sites

... it can't help you because it uses 2 characters instead of 3? Dude, adaptations like that are usually simpler than all hell. Now, the AI to get players to follow you... no. But just to be able to switch characters? Yeah...

And I still say Lost Vikings style puzzle solving with Sonic and Company would be one of the awesomest game concepts ever.

Link to comment
Share on other sites

I'm making a sonic heroes styled engine with static in TGF and my problem is when I try to change the leader it won't switch.

It's like this; I have 3 counters. Sonic Leader, Tails Leader, and Knuckles Leader. Along with that icon that shows you who is the leader.

If sonic is leader then the Sonic leader counter is set to 1. If tails is leader then sonic's counter is set to 0 and tails' is set to 1 and so on.

When sonic is leader and you press B then I have it switch to knuckles as leader by setting sonic's counter to 0 and knuckles to 1. But the problem is that since everyone uses B and Y to switch to another character, if I press B with sonic as leader (or anyother character as leader) then he doesn't switch and everyone switches at once since like I said and it stays on Sonic.

I set the events like this;

If Sonic Leader = 1 and user presses B= Set Sonic Leader to 0 and set Knuckles Leader to 1.

But it just doesn't change and sonic stays like that. I noticed the counters changed for a split second though. I just need to know how to fix this. So does anyone have any idea what I should do? Or is a 2d Sonic Heroes engine impossible to do?

It's just a thought, but try using just one counter, and redo the switch leaders events. Like instead of;

[LIST]If "Sonic leader" = 1
[/LIST]+Upon pressing "B"

[INDENT]Set "Sonic Leader" to 0
Set "Knux Leader" to 1[/INDENT]

[/CODE]

And so on, try;

[CODE][LIST]Upon pressing "B"
[/LIST]

[INDENT]Sub 1 to "Leader"[/INDENT]

[/CODE]

[CODE][LIST]Upon pressing "Y"
[/LIST]

[INDENT]Add 1 to "Leader"[/INDENT]

[/CODE]

[CODE][LIST]If "Leader" = 3
[/LIST]

[INDENT]Sub 3 to "Leader"[/INDENT]

[/CODE]

[CODE][LIST]If "Leader" = -1
[/LIST]

[INDENT]Add 3 to "Leader"[/INDENT]

[/CODE]

Link to comment
Share on other sites

I believe it's possible, but hard to do with 3 players and involves alot of events.

Speaking of which, I'm making a game that involves tag team work, but I scrapped it, this as far as I got:

If available put all events in groups, anything involving sonic, put in his own group, so on. Now make some counters and put them in their own group too. Now when you want to switch to a player just press a button or whatever, and tell the events to activate a group and deactivate the player groups. For example: When sonic's group is activated, shut down knuckles and tails groups, and just go along that path, but make sure you have the follow engine on. Example: when sonic is Activated make tails follow sonic and knuckles follow tails.

Also give the players seperated controls, sonic is PLAYER 1, Knuckles is PLAYER 2 and Tails is PLAYER 3.

When switching to a group, tell the computer to ignore the controls to whomever your not using, therefore the follow engine will take the inactive players controls and activate itself. If this is too much, I'll try to make an engine like that. I probably won't succeed but I'm not doing anything right now until next year so it's worth a try, The engine will be platform movement not static.

Phew..........

I'll get right on it later.

It will be a MMF document.

Oh and by the way, Don't add or subtract your player counters, It's much easier to tell the computer to "Set" the counters to the number you want. That may be a problem.

Link to comment
Share on other sites

"That is so incredibly wrong"

Well DW, This is my method of making a tag team engine and it works, let me explain:

O.k. I assigned sonic the player 1 controls for platform movement, gave knuckles the player 2 controls and tails the player 3 controls, but I never change the controller configuration, they are the same. Now, when I want to play as knuckles I press a button, (Or in my game I collided with knuckles and tap space, tag team) I tell the computer to "Ignore player 1 controls" and "Restore player 2 controls". Therefore I can now control knuckles and sonic is now controlled by the follow engine. And vice Versa.

Also during this time sonics events are now deactivated until I tag him. Then his events will be reactivated and knuckles groups will be deactivated.

To make it simple, when your in control of knuckles and you press fire 1 to jump, sonic will not jump with you because his controls are being ignored. Sonic will only then listen to the event of the follow engine until switched.

Link to comment
Share on other sites

No no no no no. Read what I quoted.

EDIT: Well, I'm going to go through the exercise anyway.

1. Player Physics for Each character

2. Scroll algorithm that scrolls to a box that moves to the current lead character at a speed based on a logarithmic function of distance to lead character.

3. Player controls for each character which are negated when Leader doesn't equal the value for that player.

I should add right now that you don't want to make each character a different player as thats kinda dated and silly. Besides, with this method you could easily set up a player2Control variable which applies to the character controlled by player 2 and you could do splitscreen with some manner of viewport plugin and a second scrolling algorithm/target that travels to whichever character is controlled by player 2. You could also disactivate the viewport with a player2Active boolean which can be changed by the start button.

4. When control bound for switch character left, lead character--;

check for character conflict with player two (arguments: boolean up/down, in this case down)

When control bound for switch character right, lead character ++;

check for character conflict with player two (arguments: boolean up/down, in this case down)

When lead character == 0 lead character = 3

When lead character == 4 lead character =1

This is the checking for conflicting players function

If player 2 were in there, we could do this... as part of the same function so as not to cause a conflict with the mirrored statements for player 2

When lead character == leadCharacter2

lead character = lead character + convertBooleanToNegativePositive1Integer(boolean up/down)

That way, if the player chooses an already chosen character, that player is automatically forced to go to the next character after the one switched to depending on the direction approached (if it just switched to the next character without the potentially positive/negative function, then you'd be stuck being able to switch only from one character to the other and not viceversa.

Anyway, you'd mirror all that crap for player 2 and when player 2 presses the bound equivalent of start to enter, you'd set his control variable to one and then run the checkconflict function with a boolean argument of true so that if player 1 is character 1 that it will automatically transition player 2 to character 2.

Finally, when player 2 presses the bound equivalent of start, their variable is changed to -1 so that they are free from the loop.

Anyway, I'll make an engine for this in MMF 1.5 and then put it on here for you to look at this weekend. No, I'm not going to include 360 physics or anything fancy... just 3 different simple sprites that you can switch around and control... with 2 players.

Link to comment
Share on other sites

Always glad to be of service. Oh, and it stands to reason that it isn't... entirely complete. I didn't include scrolling on the Y plane for instance. Still, it should be fairly simple to fill in the gaps.

Oh, and I'm sure you got this, but what was so wrong...

was that Knuckles was character 2 instead of Tails. :P

Link to comment
Share on other sites

Uh, couldn't this problem have been fixed by changing the "If *enter key here* is pressed" with a value? Like when the key is pressed, set a value to 2. If it's being held down, change it from 2 to 1. Finally, if the key is let go, set it to 0. Then you can say to switch characters if the value is 2 and set the value to 1 so that it'll only occur once.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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