I just got a comment on this video at the timestamp. Is it possible if skeletons become immortal and you'll just have to get rid of them by making them fall down or make them disappear (or move) through the wall.
I wonder if it's possible by adding any fix. Because logically, as it's a skeleton, he shouldn't get killed except if he gets moved to non-existent room.
Can skeleton be immortal?
- atrueprincefanfrom18
- Site Shah
- Posts: 1785
- Joined: January 21st, 2020, 2:53 pm
- Contact:
- atrueprincefanfrom18
- Site Shah
- Posts: 1785
- Joined: January 21st, 2020, 2:53 pm
- Contact:
Re: Can skeleton be immortal?
And yes, they can be. Seems C is not really that hard!
You need to make changes here. Before you take_hp(100) which would make the guard (skeleton) dead, first check if the guard is skeleton. You need to check
And I also checked what made the skeleton turn dead when they fall on spikes. Seems you need to make changes here. Same thing:
I think I should make video on this.
You need to make changes here. Before you take_hp(100) which would make the guard (skeleton) dead, first check if the guard is skeleton. You need to check
Code: Select all
if (Char.charid != charid_4_skeleton) {
// do the normal things, such as taking hp, playing music, showing blood here
}
Code: Select all
if (Char.charid != charid_4_skeleton) {
// do the normal things, such as taking hp, showing dead skeleton, playing music here
}
- atrueprincefanfrom18
- Site Shah
- Posts: 1785
- Joined: January 21st, 2020, 2:53 pm
- Contact:
Re: Can skeleton be immortal?
Video done!
Maybe I should do more such videos? A lot more to discover from SDLPoP source code!
Maybe I should do more such videos? A lot more to discover from SDLPoP source code!
Re: Can skeleton be immortal?
Or you can modify the "take_hp" function not to do anything if the character is a skeleton.
Re: Can skeleton be immortal?
Programming is fun.atrueprincefanfrom18 wrote: ↑March 21st, 2021, 5:01 amA lot more to discover from SDLPoP source code!
Re: Can skeleton be immortal?
With your change, the skeleton will behave slightly differently than with the changes by atrueprincefanfrom18.
When the skeleton falls into a trap, the game will show the skeleton's dead sprite.
If the skeleton fell into spikes, it will not move, unlike in the video.
But the prince will draw his sword at the chomped or spiked skeleton.
You can even "revive" the skeleton if you stab it.