ID:270126
 
I'm just about finished with my game, but I want to know how to make an ending to it. When you kill the last boss I want it to take you to another part of the map tell you that you beat the game. then teleport you to somewhere else and it gives you a special item for beating the game. I can probably do all this on my own, only I don't know how to implement it into my game. Because when you kill that boss all of this needs to show up.I need some help Let me know if I need to post any codes or whatever..
here's some things which I thought of that you could use to do all those stuff (from the top of my mind):

- Make a new Z layer (or a HUD layover) for THE END part
- use [src or]usr.loc = locate(x,y,z of the new map layer, if used)
-Spawn()/Sleep()
-usr.loc again to a special room (if any)
-usr.contents += new obj/...

Um...yeah >.>

- GhostAnime
In response to GhostAnime
usr.contents+= path is a HORRIBLE way. use src.Move(usr).
In response to Mysame
Um, why is it a horrible way? If you are going to say a statement, at least give a reason. I have never heard that before and since I have seen you make certain posts before I would like to see some proof to show me that usr.contentes+= typepath is horrible.
In response to Kalzar
mob
proc/The_End()
usr <<"....."
sleep(7)
src.loc = locate(5,50,11)
usr <<"Congradulations! You beat the game."
usr <<"?????????????"
// new/obj/?????(usr)
src.loc = locate(1,1,1)


Ok This what I came up with but. I don't know how to call up this proc when you destroy the last boss.

(As in where would I add it at?)
In response to Kiyo Takamine
I bet ya have a death proc, so add it into that
eg:
mob/DeathByMistake(mob/PersonWhoKilled)
if(src.name == "Last Boss" && !src.client)
spawn() PersonWhoKilled.The_End()
del(src)
In response to GhostAnime
That End proc is totally wrong. Never use usr in a proc. Except Click() and DblClick()
In response to Mysame
=(

It didn't work, I added to my deathproc but It does nothing. I also changed them to src.

mob
proc/deathcheck2(mob/M as mob)//handles death
if(src.HP <= 0)
del(src)
if(src.name == "LastBoss" && !src.client)
spawn() src.The_End()
del(src)
////
mob
proc/The_End()
src <<"....."
sleep(7)
src.loc = locate(5,50,11)
src <<"Congradulations! You beat the game."
src <<"You get ????????"
// new/obj/?????(usr)
src.loc = locate(1,1,1)
In response to Kiyo Takamine
It does work. It's just that the "LastBoss" is hearing the text and everything. You're calling it on src.
In response to Mysame
what do you mean? o.O so Do I need to change it to M instead of src
In response to Kiyo Takamine
Why don't you try it out.
In response to Mysame
Mysame wrote:
That End proc is totally wrong. Never use usr in a proc. Except Click() and DblClick()|

Stop giving bad advice. This is the second time I saw you make a post about advice. You are telling him to do something, but haven't linked him to any resources why, or given him a reason why. This leads me to believe that you are just copying off of what people say on the forums and you don't even know yourself.
In response to Kalzar
My advice is not bad. And if someone wishes to explain they'd need the whole forum capacity. See all the rants about usr/src? Yeah.
In response to Mysame
Trust me, i've seen them before but the very least you can do is link to it.
In response to Kalzar
Since this mob of hobos keep flaming each other, ill have to help you. Here is the new code with some comments to explain why it wasnt working:
Your Code:
mob
proc/deathcheck2(mob/M as mob)//That will only work on verbs.
if(src.HP <= 0)
del(src)//Since it runs this first it wont even get to run src.The_End() since src will be non existent.
if(src.name == "LastBoss" && !src.client)//!src.client, well thats going to return false because src will be the monster, which doesnt have a client
spawn() src.The_End()
del(src)
////
mob
proc/The_End()
src <<"....."
sleep(7)
src.loc = locate(5,50,11)
src <<"Congradulations! You beat the game."
src <<"You get ????????"
// new/obj/?????(usr)
src.loc = locate(1,1,1)


Your fixed code:
mob
proc/deathcheck2(mob/M)
if(src.name == "LastBoss")
spawn() M.The_End()
del(src)
else if(src.HP <= 0)
del(src)
////
mob
proc/The_End()
src <<"....."
sleep(7)
src.loc = locate(5,50,11)
src <<"Congradulations! You beat the game."
src <<"You get ????????"
// new/obj/?????(usr)
src.loc = locate(1,1,1)


There this should work now.