ID:157659
 
I own a Bleach game called Bleach Resolve and i want to add Mabashi doll but i cant figure out how to make them able to control players. Ive tried to code it in before but it didnt work for me so i took it out of the game.

I was hoping to get some help to add this it would be great if someone knows how.

Mabashi Doll : It would summon Rizu and if you fire Rizu at the opponent you gain control over their body if your Reiatsu Power is higher than them. Once mastering your doll you will summon more than one Rizu 2 maybe 3. This will benefit because you will be able to control more than 1 player at once. The effect will stop working after the player reaches a certain distance from the user of the doll.
Here's a relatively simple way to do it with client movements. I'm not sure if it's what you're looking for though. Best of luck.

obj/MabashiDoll
icon='Whatever.dmi'
icon_state="Whatever"
verb/Use()
var/list/Players=list()
for(var/mob/Player/M in oview())
Players+=M
Players+="Cancel"
for(var/mob/Player/M in Players)
if(M=="Cancel") return
if(M.client)
if(!usr.client.cont)
usr.client.cont=M
usr.client.eye=M
usr.client.perspective=EYE_PERSPECTIVE
M.client.contd=0
else
usr.client.cont.client.contd=1
usr.client.cont=null
usr.client.eye=usr

client
var/mob/cont
var/tmp/contd
North()
if(cont){step(cont,NORTH)}else if(!contd)
else..()
South()
if(cont){step(cont,SOUTH)}else if(!contd)
else..()
East()
if(cont){step(cont,EAST)}else if(!contd)
else..()
West()
if(cont){step(cont,WEST)}else if(!contd)
else..()
Northeast()
if(cont){step(cont,NORTHEAST)}else if(!contd)
else..()
Southeast()
if(cont){step(cont,SOUTHEAST)}else if(!contd)
else..()
Northwest()
if(cont){step(cont,NORTHWEST)}else if(!contd)
else..()
Southwest()
if(cont){step(cont,SOUTHWEST)}else if(!contd)
else..()

In response to Sealed Kyuubi (#1)
That code is terrible. I advise against you providing "help" to anyone else.
Michael1234 wrote:
Mabashi Doll : It would summon Rizu and if you fire Rizu at the opponent you gain control over their body if your Reiatsu Power is higher than them. Once mastering your doll you will summon more than one Rizu 2 maybe 3. This will benefit because you will be able to control more than 1 player at once. The effect will stop working after the player reaches a certain distance from the user of the doll.

What the hell is "rizu"? In any case, look up the /mob.client and /client.mob variables.
In response to Popisfizzy (#3)
Rizu is the doll Mabashi uses in the anime. The doll will shoot out and hit another player in the screen, Kinda like a projectile technique but if it hits the owner of the doll ( Rizu ) will gain control of who they hit.