ID:149817
 
Im trying to code an attack in my game that moves the player from there mob to an obj and puts them in control of an obj. Then they bump another mob to attack them and delete the obj and transfer them back to there original mob. First i used a mob instead of an obj because they cant move as an obj, but they have all the default variables of mobs which isn't good. I need a way to make objects move and see if im going about this right.

The code i have now is right here:

GuidedBlast()
var/tmp/temp = src.client.mob
var/obj/blast/B = new(src)
B.loc = locate(src.x + 1, src.y, src.z)
B.name = "[src]'s Blast"
B.damage = src.str
src.client.mob = B
This code worked half way but im wondering if anyone knows of a better way.

Also i would like to know how to put icons in verb panels. I know its probably easy, but i haven't been watching the message boards lately to see the answer to this question.
I'm speaking out of my butt since I have never tried to control an obj through a client as such.

The client type has a mob var. Also, mob has a client var along with a key var. Normally, mobs can change their players by changing their key.

However, objs do not have a key or client var listed. Can a client directly control an object like this? If not, try making obj/blast mob/blast.
In response to ACWraith
Im not sure. Originally i tried to just change there mob and make it purely a visual effect, but it gave them the default verbs i dont want them to have. I could -= verbs, but thats kind of sloppy. the code was the same except it created a new /mob/blast.
You can't put icons in verb panels but you can put them in stat panels, is that what you want?
In response to Nadrew
yeah, but im pretty sure you can put them in verb panels
In response to Krim
Krim wrote:
yeah, but im pretty sure you can put them in verb panels

Nope just statpanels:)