ID:266248
 
I have a verb called summon and i am trying to make it create a new mob and locate it where the usr that summoned it is. Here is the code:

mob/verb/summon()
if(usr.magic>=25)
new/mob/beast(usr.loc)
else usr<<"You don't have enough magic!"

ok the blue part wont work the way it is, but if i change it to just usr it locates it in the usr's contents in the inventory statpanel. So how would I locate it where the usr is?
Air _King wrote:
I have a verb called summon and i am trying to make it create a new mob and locate it where the usr that summoned it is. Here is the code:

mob/verb/summon()
if(usr.magic>=25)
new/mob/beast(usr.loc)
else usr<<"You don't have enough magic!"

ok the blue part wont work the way it is, but if i change it to just usr it locates it in the usr's contents in the inventory statpanel. So how would I locate it where the usr is?

What blue part? As far as I can see, it should work fine. Lemme run a quick test.

Yep. That works fine for me. I've got..
mob/verb/summon()
if(usr.magic>=25)
new/mob/beast(usr.loc)
else
usr<<"You don't have enough magic!"

Weird.
What doesn't work about it? Does it cause an error? Does nothing happen?

And, if nothing happens, I would suggest actually double-checking that the beast does have an icon. As Vortezz verified (and as I can say simply by looking at it) the code you gave by itself will work fine if you create the appropriate beast type.
In response to Spuzzum
Spuzzum wrote:
What doesn't work about it? Does it cause an error? Does nothing happen?

And, if nothing happens, I would suggest actually double-checking that the beast does have an icon. As Vortezz verified (and as I can say simply by looking at it) the code you gave by itself will work fine if you create the appropriate beast type.

originally i was working on this on my laptop and I already had the icon on my other comp, and i didn't put the icon in, but what happened was it wouldn't show up on my look verb