Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
I'm having a couple of problems...
First, how do I play a death scene? The CS CD has all these "player die" graphics on it, but nowhere can I find to call a "play animation" event nor does there seem to be a predefined animation number for death (like there is for attack & block).
Second, I want my player to have multiple lives, so I defined a global variable "PlayerLives", set it to "3" in main, and then call an event in the EndGame routine that decrements the PlayerLives variable by one, resets stamina to full, and then teleports back to my map. Every time, both in Classic and OS X versions, teleporting back to the map causes the game to crash.
Ideas?
Thanks in advance
-John
------------------
this is pretty obvious so you might have it covered - maybe you teleport to the right location but at a position outside of your actual map? In the Endgame event you made, set the position before you teleport. I had a problem with stamina when i made a friendly character who got insulted - did a delete character and added a new character with too much stamina - didn't crash but the add didn't work - maybe if you added too much stamina to a player it would crash - I didn't try out what the amount was though..
hope this helps, and otherwise it's a bump for the topic
Yeah, I reset the map position to the original coordinates (I want them to start the level over with 1 less life) before I teleport.
I also have tried it without resetting the stamina at all. No Luck.
However, I don't know that I explicitly "add the player to the map." How do you do that? If I call the "Start Game" routine, the PlayerLives gets reset to 3 (and it crashes then, too.)
------------------ -Fyre http://www-students.biola.edu/~johns
If I remember correctly, the EndGame thingy will always end the game, regardless of what events you do...I think I saw this in a similar thread, at any rate. Not sure, so don't quote me on it.
------------------ quitcherbellyachin. --- New Fortress of Die Nacht released! (12/20) (url="http://"http://aviary.damnsw.net")Download it from here!(/url) | | (url="http://"http://aviary.damnsw.net/downloads/dienachtd5.sit")direct download(/url) | | (url="http://"http://aviary.damnsw.net/fortress/progresslog.html")Progress Log (12/20)(/url)
Makes sense. But what routine does a player's death call then?
just an idea, but you you make a conditional event that is called when the player had 1 health? just make this event the one that resets the map and substracts from lives. I havn't looked into to this, but it seems feasable to me. then make a conditional event that is called when the players lives variable is at zero, and make this the endgame event.
Quote
Originally posted by opivykid: **just an idea, but you you make a conditional event that is called when the player had 1 health? just make this event the one that resets the map and substracts from lives. I havn't looked into to this, but it seems feasable to me. then make a conditional event that is called when the players lives variable is at zero, and make this the endgame event.
**
For this, would be good to see the formulaes Coldstone uses in combat. I suspect strongly you'd need to peg that low-life (!!) value at 10 or so or there would be deadly blows that took you past it and negated the whole mechanism.
------------------ everywhere else, it's -- "Nomuse"
I don't think there is a way to do what you're trying to do.
I was attempting a very similar thing, and there was a long discussion in a thread called "Interrupt the endgame to prevent dying" in which various suggestions were made, but nothing worked.
When the player dies, coldstone calls the built-in EndGame event. You can patch in animations, "death scenes", etc here if you want. But when this event ends, Coldstone seems to set all the player-related variables to 0 (and presumably does other behind-the-scenes low level resetting of stuff) so that if you try to force the game to continue (like with your teleport), the engine crashes.
No matter what I've tried, I have not been able to prevent this "zeroing-out" of the game state.
The various hacks involving checks against the player's health being less than some threshold value suffer from the limitation Commander Arashi just pointed out -- a high damage attack would negate the hack.
In my book, this is a major limitation of the Coldstone engine. In addition to the multiple lives concept, there are a host of other cool game mechanics you could enable if there was a way to stop the game from ending when the player "dies".
Let's hope they add this to 1.0.1!
Can you do something where it always checks to see if the player health is less than 1?
If so, you could put that in effect, and hope that it evaluates before the death sequence evaluates.
I don't think you can do the "health < 1" check, because where would you hook it in? There is no constant event checker running. You need to hook events into specific actions, like using an item, stepping on a map square, issuing a menu command, casting a spell, etc. You can't have an event "always checking" the player's health.
Trinity plugin simulates this with a weapon that checks the player's health on every attack. If you attack with your own health below a certain threshold, it teleports you away. This is cool, but it suffers from several problems that make it not really work for the "you have three lives" idea.
If I'm wrong and there is a way to make an event that is continually checking the player's health, please point me to how to do it!!
-jinnes
I've got this to work. First you need to make a global variable for your character's health. Give the player as much hp as you can possibly give him, but use some resistance you aren't planning to use in the game as your hp... (will explain later)
Put an event call on every weapon for when it hits. In this event, you must first get the difference between your max hp and your current hp. Take this difference, and subtract it from your global variable for current hp. Now, make the unused resistance equal to the global variable and heal your true hp back to full (the resistance is only for displaying purposes). Now check if the global variable is less then 1 in the same event. If it is, you can make your death scene
------------------ The word politics is derived from the words poly, meaning many, and tics, referring to blood sucking parasytes.
Originally posted by Demiscus: **I've got this to work. First you need to make a global variable for your character's health. Give the player as much hp as you can possibly give him, but use some resistance you aren't planning to use in the game as your hp... (will explain later)
Basically, ignore the built-in HP system and build your own, eh? A pity we have to go to this kind of extreme to be "creative." Of course, the engine will still be working like mad filling the screen with indicators of the built-in hitpoints. At least you can customize the map background to not show HP...
It seems like this is the kind of thing that could be easily fixed with the next release of Coldstone...by next release, I mean v1.1
Demiscus -- that's cool that you did all that. You're brave! I agree that is the best compromise/workaround possible.
It still suffers from some problems, tho. Like what if your player ran from a fight and the monster scored the last hit. There would be no way to transfer that hit from HP to your "fake" HP stat, because the player never attacked so your transfer event never ran. A minor quibble I guess, but it bugs me...
Anyway, seems like a lot of work which could be avoided if CS just let us stop the endgame from ending the game.
If you give a monster a weapon in his inventory, will he use it? If this is so, then the monsters will use the weapons they are given and the event links will be triggered in his attacks too....
Another way of making a check that was constantly happening: make a npc called runner. Make his graphic white (transparent), and set him to go to a certain place. When he gets there Have the health check go off. (making his speed higher or him closer to his target will make the check happen more often, but could slow the game down. Then just delete the npc and add another one in the same place this started (ie, a runner starts off at 1,1 and must get to 3, 3. he gets to 3,3 and it does the health check, followed by his death and his rebirth at 1,1)
(This message has been edited by Demiscus (edited 02-17-2002).)
Good ideas re: the multiple lives thing.
Any ideas on playing a death animation, tho?
You'd do the same thing but play an animation instead of teleportingt them away.....
OK. How? There's no "Play Animation" event, or anything akin to that I can find.
Originally posted by JohnStokes: **OK. How? There's no "Play Animation" event, or anything akin to that I can find.
I think he means change player animation. Look at first part of PoG, where the player wobbles then falls down (I love the way the world "spins" about him during this animation. A cute trick...and very, very easy.)
Could also summon dialoge box,
"You are dead"
"Ok"
With a QT movie displayed therein. (See other threads for details on how to make a picture show through the default dialoge box, and how to make a movie not appear to be looping).
Maybe I'm just dense, but HOW???
I've tried "Change Player Map Icon", "Stamp Control", and even "Change Player Portrait" but nothing works.
And if it's by the "call animation" event in the animation file itself, how do I get the engine to call that specific animation - like the fourth one in my animation file: (Player_Anim:4) (y'know, like animation 3 corresponds to spell attack).
Sorry to be an ignoramous, but I guess I need some step by step instructions here.
And how would I do it for an NPC?