//including as partial to the question
mob/Login()
src.loc = locate(1,1,1)
src.Conjurations += new/mob/Familiars/Slime
src.icon='player.dmi'
src.icon_state=""
mob/var
Level=0
Health=0
Power=0
mob/var/Conjured=0
mob/var/list
Conjurations = new/list(10) //maximum of 10 Conjurations
mob
verb
Conjure(mob/Familiars/M in usr.Conjurations)
if(src.Conjured<=0)
M.loc = locate(src.x,src.y,src.z)
usr<<"Speaking in your enchanted tounge you conjure a [M] to aid you!"
src.client.eye = M
src.client.control = M
src.Conjured+=1
else
src<<"You've already conjured something!"
mob
Familiars
var
Effect=""
Slime
icon='Familiars.dmi'
icon_state=""
Level=1
Health=1
Power=1
Effect="Due to its lack of intimidation, soft state, and ultimately being non-existent on any food-chain the Slime excels for novice Conjurers as a means to scout ahead without drawing out the aggression of enemies."
//including as partial to the question
mob/Stat()
statpanel("[src]")
stat("Health:[Health]",src)
client
var/atom/movable/control
North()
if(control)step(control,NORTH)
else ..()
Northwest()
if(control)step(control,NORTHWEST)
else ..()
Northeast()
if(control)step(control,NORTHEAST)
else ..()
South()
if(control)step(control,SOUTH)
else ..()
Southeast()
if(control)step(control,SOUTHEAST)
else ..()
Southwest()
if(control)step(control,SOUTHWEST)
else ..()
West()
if(control)step(control,WEST)
else ..()
East()
if(control)step(control,EAST)
else ..()
proc/Control(atom/movable/M)
if(M)
control=M
eye=M
else eye = usr
perspective = EYE_PERSPECTIVE
Problem description:
Greetings, third day on learning DM here! Let me say in advance that I apologize for this eyesore of an organization to you upperclass programmers.
I can fortunately say that my code is working, however, I have some questions in regard of how I should go about doing particular things with it I feel are off and ultimately need some direction with. Also let me indicate that I did follow some libraries and searches on how to go about doing the Conjure verb as I'm stuck with things centering around that area.
First question: I've come to the realization that I'm not actually being the Slime itself as evidence of the stat panel where I'm still registered as the Player. I've looked around a bit with the developer help and I've seen mentions of people logging into mobs, so I wanted to ask for some input on that tidbit or suggestions on how to go about it differently. The project I'm doing requires the player to conjure familiars(monsters) that can attack, collect exp, and level from enemies. I've also noticed that the screen goes black when you move too far from the body of the player and I'm lost as heck on that front.
The second problem I'm having/will likely be having is in regards to return familiars to their Conjuration list that are Conjured, but, I admit I haven't started my hand at that and have been clueless on means to go about that.
I look forward to your wisdom!
This then calls src.Logout() (which does nothing by default) and M.Login(), which means you need to prevent /mob/Login() from turning the slime into a player (since /mob/Familiars inherits /mob/Login).
Side-notes:
* Instead of overriding all of the directional client procs, you can just override /client/Move():
* In /client/proc/Control, usr is used where mob should be used instead.
* In /mob/Login and /mob/verb/Conjure, every occurrence of src. is redundant. x by itself refers to the local variable, src variable, or global variable named "x" (in that order).
* In /mob/Login, you're adding to the Conjurations list, but the Conjurations list is initialized as a list of length 10. This means the Conjurations list ends up as 10 nulls followed by a slime. You probably wanted to limit how long the list can get, but that's not the way to do it.
* In /mob/verb/Conjure, M.loc = loc does the same thing as M.loc = locate(x, y, z). Also, both occurrences of usr should be src.