Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

these three gotchas with swopping characters #27

Open
dougmencken opened this issue Mar 22, 2018 · 3 comments
Open

these three gotchas with swopping characters #27

dougmencken opened this issue Mar 22, 2018 · 3 comments
Assignees

Comments

@dougmencken
Copy link
Owner

dougmencken commented Mar 22, 2018

Let the joined Head over Heels character stay below an elevator, wait when elevator lowers on top of character, then swap, swap, ... Magically, Head is on top of an elevator

head goes on elevation via swapping

Get funny BANG somehow related to FallKindOfActivity::assignAnchor~ when one of two characters in the same room is active and is under some door, then just swap ’em

When inactive character of two in the same room meets mortal item it turns into bubbles... Until swapping. And when active one dies too, that other would be lost forever. Maybe activate him in cases of meeting something mortal?

inactive dies

@dougmencken dougmencken added this to the 30th anniversary release milestone Mar 22, 2018
@dougmencken dougmencken self-assigned this Mar 22, 2018
@dougmencken
Copy link
Owner Author

dougmencken commented Mar 28, 2018

Yet it activates, and room restarts

one

inactive character head @ safari4.xml is going to vanish, activate it

@@ -404,6 +405,12 @@ void UserControlled::collideWithMortalItem( PlayerItem* player )
                         break;

                 case Vanish:
+                        if ( ! player->isActiveCharacter() )
+                        {
+                                std::cout << "inactive " << player->getUniqueName() << " is going to vanish, activate it" << std::endl ;
+                                player->getMediator()->pickNextCharacter( nilPointer );
+                        }
+
                         // animate item, restart room when animation finishes
                         if ( player->animate() )
                         {

dougmencken added a commit that referenced this issue Mar 28, 2018
for #27

~ ~ mmmmm .... LIVES ARE NOT DEDUCTED AT ALL, VIDAS INFINITAS FOR EVERYONE?
dougmencken added a commit that referenced this issue Mar 28, 2018
for #27

and deduction of lives is back
it was absent since “ introduce wrappers for functions of allegro library ”
with introduction of Item::getOriginalLabel()
@dougmencken
Copy link
Owner Author

dougmencken commented Sep 12, 2018

“funny BANG” inside FallKindOfActivity::assignAnchor is just missing checks for nil

if ( itemBelow != nilPointer && anchor != nilPointer )

before doing things like

if ( itemBelow->whichKindOfItem() == "grid item" && anchor->whichKindOfItem() != "grid item" )
if ( ! itemBelow->isMortal() )
if ( anchor->isMortal() )
if ( anchor->getX() + anchor->getY() < itemBelow->getX() + itemBelow->getY() )

dougmencken added a commit that referenced this issue Sep 12, 2018
it fixes “funny BANG” #27

plus let character, usually Head, to fall down when it’s under door
and another character below, usually Heels, moves away
dougmencken added a commit that referenced this issue Sep 12, 2018
it fixes “funny BANG” #27

let character, usually Head, to fall down when it’s under door
and another character below, usually Heels, moves away

FreeItem’s maskImage becomes static maskItemBehindImage
@dougmencken dougmencken changed the title gotchas with swopping characters these three gotchas with swopping characters Sep 12, 2018
@dougmencken
Copy link
Owner Author

Yet there’s just one “Let joined Head over Heels character stay below elevator, wait when elevator lowers on top of character, then swap, swap, ... Magically, Head is on top of elevator” to fix

dougmencken added a commit that referenced this issue Sep 12, 2018
it fixes “funny BANG” #27

let character, usually Head, to fall down when it’s under door
and another character below, usually Heels, moves away

use strings instead of numbers for ways in behaviors’ fallFrames & blinkFrames

FreeItem’s maskImage becomes static maskItemBehindImage
dougmencken added a commit that referenced this issue Sep 12, 2018
it fixes “funny BANG” #27

let character, usually Head, to fall down when it’s under door
and another character below, usually Heels, moves away

use strings instead of numbers for ways in behaviors’ fallFrames & blinkFrames

FreeItem’s maskImage becomes static maskItemBehindImage

plus some improvements of code
@dougmencken dougmencken removed this from the 32nd anniversary (in 2019) milestone Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant