Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Conquering Death
Conquering Death
2004-09-17, 7:37 AM #1
I'm going out on a totally liberal limb here and considering making death obsolete in LoG03. When you die, what basically happens is that you go to Hell and must complete some seemingly ridiculously difficult task supposedly to give you another chance at life. If you complete this task, then you're taken back to the vicinity of where you died.

I haven't put down any code yet or tried this in-game, but if your health hits 0, and the flag is set wherein system variables aren't reset on death, can I override the "Hit fire to respawn" function and merely set the player's health back to 100 and teleport him? I guess the system variables flag wouldn't even be necessary at that point.

If that wouldn't work, then could I have the flag set and set a variable saying the player's standing in the afterlife, so that shortly after he respawned (on 'startup', I suppose), he'd be teleported to a Hell ghost?

Once you've completed one of the tasks, you'd then be teleported to a certain ghost position specific for your region. (If the player fell into a pit of lava and dropped a ghost template on death, you'd keep respawning in the lava.)

If you die thrice, your fourth death (as recorded in a global cog counter that wouldn't reset due to the non-variable resetting death flag) would set that other flag that crashes MotS (but in a recoverable fashion, that is, you can still go to the menu). So you have three extra lives, so to speak, but if you use those you're done.

Any ideas?
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2004-09-17, 8:11 AM #2
I think once your health hits zero, the engine takes over and there's just no way of stopping it. But you wouldn't really NEED to do that anyway, like you said.

Check out the CTF cogs, they set which walkplayers a player can spawn at in game and also control the score through cog rather than through the engine if IRL. I'd just change the sithstrings.uni to say "Press fire to go to Hell" and use the CTF method to only allow respawn in Hell.

That way, after they died...they should be 'teleported' to hell. Completing the task part should be simple cogging enough, then you just teleport them back.

On the other hand, I suppose you'd actually only want the player to spawn NOT in hell once...when they originally joined right? Because logically all deaths in game send you to hell. If you wanted to be really simple about it...just put ALL your walkplayers in hell and have a joined message teleport them to the start. That should only be called once when they join the game. While a little hokey, that should accomplish what I think you're after.

This CAN be done and theres a few different way to do it.

What happens when you die in hell? Or can you not do that? Maybe you should rename hell to purgatory or Limbo world or something...Hell seems kind of final and why exactly would satan be sending you on quests anyway? :D
-El Scorcho

"Its dodgeball time!" -Stormy Waters
2004-09-17, 9:06 PM #3
No, no, it works out in the story.

Furthermore, I want to avoid the player dying altogether, as that caused some crashing issues in LoG02... <.<
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2004-09-18, 1:22 AM #4
Just a thought (and it's early in the morning, so don't shoot me - I haven't gathered all my marbles yet...) but couldn't you run a check in the player's class cog for the "damaged" message to check if the player's health is <1 (maybe <2 just to be safe?) and use "ReturnEx(-1)" and then use "JKEndLevel(x)" where x=0 is failure and x=1 is success.

This way you could skip to an entirely different section of gameplay (what with the damaged message being processed before the killed message, I believe...). Alternatively, you could run the "damaged" code check and then use JK's "TeleportThing()" verb to another (separate, as in no playable way of getting to this place) sector. Of course both these suggestions have pros and cons:

Pros for the former:
1.) Allows a separate level choice for the player (level branching)

Cons:
1.) You could only use level branching for two levels.


Pros for the latter:
1.) May take a while to build the dungeon part into every map, but once implemented, you could have more control over what happens. For example, if the player died in hell then they *would* see the "press fire to restart" message, but if they survived hell, you could teleport them back to the position where they were originally killed (in the real world). You could then restore them with full health or maybe even half health for surviving hell :o

Cons:
1.) You'd need to build the "dungeon/hell" part of your level into every map. Possibly create a 3DO of that map portion so you could import it into other level sections?


On reflection (having typed this out), I'd be more inclined to go with the latter option. It seems to have more flexibility about it ;).

Dang, I'm awake now :eek:. Best go and get some breakfast, but I hope these suggestions are (semi-) useful/helpful ;) :D

-Jackpot
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2004-09-18, 2:53 AM #5
Yeah, I think lucky shows how it could work. You catch the player's damaged message and have:
Code:
if((GetThingHealth(GetLocalPlayerThing()) - GetParam(0)) <= 0)
{
   // Do the hell transportation either way lucky suggested
}

I'm not sure about player shield, though. You know, Maybe a player has 3 Health left, but just found an armor vest. So a 5 damage hit wouldn't kill him, but above code MIGHT think he's dead...needs testing.
It's SP, aight? Cause else we'd have to write some more complicated code...
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2004-09-18, 6:33 AM #6
Oh wait, I'm looking at this from the wrong angle. Of course the LoGO series has been a single player affair, I sort of thought you were refering to that co-op thing you showcasing a little while back.

However, if you want things to be the same and still have their status in single player, I think the debug mode flag 0x100 would allow you to do that...but its probably more complex then its worth.

In single player...

I'd just flat out remove the shields all together and use zagibu's method most likely. You could spawn a corpse thing, simulate death with a fancy camera trick and then teleport player to hell.
-El Scorcho

"Its dodgeball time!" -Stormy Waters
2004-09-19, 11:17 AM #7
maybe when his life is 1 the teleport to ghost x....
SpriteMod (JO 2003) Roger Wilco Skin

Snail racing: (500 posts per line) ---@%
2004-09-22, 7:08 PM #8
No, it really doesn't. Sorry.

G-Man, that seems like a good idea, but I tried something similar for LoG02, (with the GAME OVER bm overlay) and there were cases when the player would be immensely near death but still alive and have to walk around with a huge hoking sign in his camera.

I'm going to test my code and then zagibu's and get back with some results ASAP.
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2004-09-23, 5:21 PM #9
This actually is like something I'm thinking of doing. So, I'm thinking, have the player damage message check the damage, compare it to current health, if the player'd still have health, apply damage, otherwise, apply enough to take player's health to 1, and do a teleport.
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2004-09-23, 6:59 PM #10
Kyle.cog handles any damage to the player. If they have shields, item_shields.cog runs first, then returns the left over damage on to kyle.cog to take away from health. All you gotta do is peform a check in kyle.cog under damaged: to see if the damage will take away the players remaining health. If it will, then returnEx(0) with return; after that so the code below doesn't take away health.

Something like:

Code:
damaged:
   if(GetParam(1) == 32) call make_bubbles;

   //Begin New Code
   if(GetParam(0) >= GetThingHealth(Player))
   {
      Teleport the player or whatever;
      ReturnEx(0);
      Return;
   }
   //End New Code

   ReturnEx(GetParam(0));
   Return;


:)
-Hell Raiser
2004-09-23, 8:35 PM #11
Whoa. I was just about to post just about the exact same thing. Good work, Hell Raiser! :D
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2004-09-23, 9:06 PM #12
Yep, that's pretty much what I was thinking, however, didn't have time to write anything up.
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2004-09-23, 11:31 PM #13
Doesn't ReturnEx work like Return, except that it is also returning a value?
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2004-09-24, 12:08 AM #14
Yeah, that's supposed to be it. The

ReturnEx();
Return;

stuff is in the original code (LEC) though, so probably why he kept it. A safety perhaps?
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2004-09-24, 5:50 AM #15
Quote:
Originally posted by LKOH_SniperWolf
Yeah, that's supposed to be it. The

ReturnEx();
Return;

stuff is in the original code (LEC) though, so probably why he kept it. A safety perhaps?


And extra return isn't going to hurt anything, so why not? :D
-El Scorcho

"Its dodgeball time!" -Stormy Waters
2004-09-24, 11:59 AM #16
Code is art.
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2004-09-25, 3:48 PM #17
ReturnEx(0); makes it so that the Param(0) for the damage (the amount of damage) is not dealt to the player.

I got this all working splendidly in-game. Thanks, everyone! :D
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.

↑ Up to the top!