damage softlocking and stuff

Here is the link to the wedNESday tutorial for making an Adventure game. Done something cool with it? Modified it in some way? Want to ask the community about creating additional features for it? Post things Adventure Module here!
User avatar
rimoJO
Posts: 246
Joined: Sat Jan 12, 2019 2:23 am
Location: Planet Earth

damage softlocking and stuff

Post by rimoJO » Mon Jan 21, 2019 5:35 pm

Probably self-explanatory here. I take damage, the game dies. I've set the health and the death animation, but I only got to see it one percent of the time.
Mystery Game status: Currently at least one in development. Stay tuned!
User avatar
dale_coop
Posts: 4473
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: damage softlocking and stuff

Post by dale_coop » Mon Jan 21, 2019 7:08 pm

I checked your project... some small mistakes.

Your projectile object should have all its Action Step with end of action/animation set to "loop", like this:

Image


And in your Player's object details, you have to set the Action Step 2 to "GoToFirst" at the end of animation (if you have an animation) or end of action (you need to set a timer value), like this:

Image

It should work now.

PS: Don't hesitate to watch again the tutorial video (with your project opened) when you have issues. All these was explained in the tutorial video.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
rimoJO
Posts: 246
Joined: Sat Jan 12, 2019 2:23 am
Location: Planet Earth

Re: damage softlocking and stuff

Post by rimoJO » Mon Jan 21, 2019 7:39 pm

Thank you!
Mystery Game status: Currently at least one in development. Stay tuned!
User avatar
dale_coop
Posts: 4473
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: damage softlocking and stuff

Post by dale_coop » Mon Jan 21, 2019 7:53 pm

You're welcome :)
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
dale_coop
Posts: 4473
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: damage softlocking and stuff

Post by dale_coop » Mon Jan 21, 2019 8:16 pm

I will add a small explanation to this...

When the "a_create_projectile" script is executed, it set your player to its Action Step 2 (his "attacking" state):

Code: Select all

ChangeObjectState #$02, #$02
(It's same for the b_create_melee script)

The movement scripts check the state of the player, if the player is not in his Attacking state (and not already walking) :

Code: Select all

    GetCurrentActionType player1_object	;; we check the current state of the player
    CMP #$02 					;; compare with the attacking state (action step 2)
    BEQ ++					;; if it IS, we go skip the code
...then, he can move:

Code: Select all

StartMoving player1_object, MOVE_UP
You understand why the player needs to leave from his attacking state... So, it's the reason, after a timer (value "1" for example) or after the end of his animation, we want him to go back to his first action step (then all the movement scripts will let him move).
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
rimoJO
Posts: 246
Joined: Sat Jan 12, 2019 2:23 am
Location: Planet Earth

Re: damage softlocking and stuff

Post by rimoJO » Tue Jan 22, 2019 12:28 am

Thank you! that worked well for me! And also, when I come into contact with an enemy, I either lose a heart or die, if I have only one heart left when I do, or the game goes into one hundred and ten percent graphic corruption mode, similar to the great Orange Ocean 1-1 glitch from Kirby's Adventure. : |
Mystery Game status: Currently at least one in development. Stay tuned!
User avatar
dale_coop
Posts: 4473
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: damage softlocking and stuff

Post by dale_coop » Tue Jan 22, 2019 8:33 am

Check the "health" of your "Player" game object, in the "object details", set it to '3'.
Check your "HUD & Boxes", in the Variables tab, select "myHealth" and set it to "3", and in the Elements tab select the one that represents my Health and check that max value is also set to "3".
If all those 3 values are set to 3, you should go without any problem (I am not at home now, I can't test it with your project).
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
rimoJO
Posts: 246
Joined: Sat Jan 12, 2019 2:23 am
Location: Planet Earth

Re: damage softlocking and stuff

Post by rimoJO » Tue Jan 22, 2019 12:44 pm

I did, but I will check again. Sometimes I lose a heart and/or die, but most of the time, the game does.
EDIT: Do strength and defense matter?
Mystery Game status: Currently at least one in development. Stay tuned!
User avatar
dale_coop
Posts: 4473
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: damage softlocking and stuff

Post by dale_coop » Tue Jan 22, 2019 1:12 pm

In 4.0 there was some issues with SFX.
Try commenting out the "PlaySound #SFX_XXXX" in the Adventure HandlePlayerHurt script (adding a ";" at the begining of the line).
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
rimoJO
Posts: 246
Joined: Sat Jan 12, 2019 2:23 am
Location: Planet Earth

Re: damage softlocking and stuff

Post by rimoJO » Tue Jan 22, 2019 8:54 pm

I know what commenting is. Anyways, I'll try it!
EDIT: It worked! Thank you!
Mystery Game status: Currently at least one in development. Stay tuned!
Post Reply