ID:178464
 
I forget how you are suppose to do it but how do you leave behind corpses when a mob dies and gets deleted
new/obj/corpse(src.loc)
In response to Nadrew
Another Question
Why wont this work?
I tried using it and it deletes only 1 at a time(thats what i want it to do). But i get a runtime error and it doesnt create the skeleton. Any Help?
client
Northwest()
if(usr.icon_state == "Necromancer")
var/obj/Corpse/O
for(O in oview(7))
del(O)
new/mob/Ally/Skeleton(O.loc)
else
return
In response to Tazor07
Tazor07 wrote:
Another Question
Why wont this work?
I tried using it and it deletes only 1 at a time(thats what i want it to do). But i get a runtime error and it doesnt create the skeleton. Any Help?
client
Northwest()
if(usr.icon_state == "Necromancer")
var/obj/Corpse/O
for(O in oview(7))
del(O)
new/mob/Ally/Skeleton(O.loc)
else
return

There error is because you're referencing O.loc after you've already deleted O. Switch those two lines.

But is this really the proc you want? This is the way I read your code:

"Every time a player steps to the Northwest, check to see if they have the Necromancer icon. If they do, delete all the corpses within 7 tiles of them, and replace them with skeletons."

Am I reading that right?? It's a very odd bit of code.
In response to Skysaw
Skysaw wrote:
Tazor07 wrote:
Another Question
Why wont this work?
I tried using it and it deletes only 1 at a time(thats what i want it to do). But i get a runtime error and it doesnt create the skeleton. Any Help?
client
Northwest()
if(usr.icon_state == "Necromancer")
var/obj/Corpse/O
for(O in oview(7))
del(O)
new/mob/Ally/Skeleton(O.loc)
else
return

There error is because you're referencing O.loc after you've already deleted O. Switch those two lines.

But is this really the proc you want? This is the way I read your code:

"Every time a player steps to the Northwest, check to see if they have the Necromancer icon. If they do, delete all the corpses within 7 tiles of them, and replace them with skeletons."

Am I reading that right?? It's a very odd bit of code.

Aside from having a large range, it seems fine. Necromancers revive the dead, and turn em into their mindless slaves to do their bidding. ;)

In response to Malver
Malver wrote:
Skysaw wrote:
Tazor07 wrote:
Another Question
Why wont this work?
I tried using it and it deletes only 1 at a time(thats what i want it to do). But i get a runtime error and it doesnt create the skeleton. Any Help?
client
Northwest()
if(usr.icon_state == "Necromancer")
var/obj/Corpse/O
for(O in oview(7))
del(O)
new/mob/Ally/Skeleton(O.loc)
else
return

There error is because you're referencing O.loc after you've already deleted O. Switch those two lines.

But is this really the proc you want? This is the way I read your code:

"Every time a player steps to the Northwest, check to see if they have the Necromancer icon. If they do, delete all the corpses within 7 tiles of them, and replace them with skeletons."

Am I reading that right?? It's a very odd bit of code.

Aside from having a large range, it seems fine. Necromancers revive the dead, and turn em into their mindless slaves to do their bidding. ;)

Hmm... didn't realize the power only worked when you walk NorthWest. Or that it affected all corpses they see when walking that direction, whether they wanted to revive them or not.
In response to Skysaw
Actually, you only move Northwest if you use the ..() function, which procedes with the default procedure for that function (or use step(usr, NORTHWEST)). Here is what it does:

1. When the client sends the "Northwest()" command, check if the client's mob's icon is a necromancer.

2. If so, check to see if there are any corpses in range, then delete them and make skeletons in their place (actually, the other way around, but it does the same thing).

3. If not, do nothing.
In response to spectriplex
spectriplex wrote:
Actually, you only move Northwest if you use the ..() function, which procedes with the default procedure for that function (or use step(usr, NORTHWEST)). Here is what it does:

1. When the client sends the "Northwest()" command, check if the client's mob's icon is a necromancer.

2. If so, check to see if there are any corpses in range, then delete them and make skeletons in their place (actually, the other way around, but it does the same thing).

3. If not, do nothing.

Was not commenting on the fact that NorthWest was being completely overridden, and was assuming that was an oversight. But now that you mention it, perhaps diagonal movement was purposefully disabled in the game, and the "7" key is meant to be the "resurrect the dead" key.

Of course I still haven't heard what the actual intention of the proc was.