ID:176971
 
This is gonna sound pretty complicated for a newb ;) but i need fusion, i know i could do snippets, but what i need is how to make 2 people one icon with one control, and make the names have about 3-4 letter each, like if fred and bob fused they would be frob ;)

If you can help, thank you in advance
Muska wrote:
This is gonna sound pretty complicated for a newb ;) but i need fusion, i know i could do snippets, but what i need is how to make 2 people one icon with one control, and make the names have about 3-4 letter each, like if fred and bob fused they would be frob ;)

If you can help, thank you in advance

mob/var{fused=0;follow="";oicon}
mob/verb/
Fuse()
set category="Fight"
for(var/mob/M in oview(1))
if(usr.fused==1){usr<<"Your already fused.";return}
if(M.fused==1){usr<<"[M] is already fused.";return}
switch(alert(M,"[usr] wishes to fuse with you. Do you wish to Accept or Decline?","Fusion","Accept","Decline"))
if("Accept"){
M.oicon=M.icon;usr.oicon=usr.icon;
var/{a=copytext(usr.name,1,5);b=copytext(M.name,6)};
usr.name="[a][b]";M.name="[a][b]";
view(10)<<"[usr] and [M] fuse into one";
M.fused=1;usr.fused=1;
M.loc=locate(usr.x,usr.y,usr.z);
M.follow=usr.name;M.fusionfollow()}
if("Decline"){
usr<<"[M] declined your offer to fuse with him."
M<<"You declined [usr]'s offer to fuse.";return}
Un_Fuse()
set category="Fight"
for(var/mob/M in world)
if(M.follow==usr.name){
M.follow="";usr.fused=0;M.fused=0;
usr<<"The fuse was broken.";
M<<"The fuse was broken.";M.icon=M.oicon}
mob/proc/fusionfollow()
for(var/mob/M in world)
if(src.follow == usr.name)
if(!src||src==null||!usr||usr==null){return}
src.loc = usr.loc
sleep(2)
src.fusionfollow()
else ..()
client
Move()
for(var/mob/player/M in world)
if(usr.follow==M.name){return}
else ..()
.=..()


Something like that, it should work, its 3:30am and i'm beet. :-\

RaeKwon
In response to RaeKwon
Most of it works fine, its just the very last peice, i get 2 errors and 1 warining, its

client
Move()
for(var/mob/player/M in world)
if(usr.follow==M.name){return}
else ..()
.=..()

fusion.dm:37:error:M:undefined type: M
fusion.dm:38:error:M.name:undefined type: M.name
fusion.dm:37:M :warning: variable defined but not used

I have no dea what to do, if you can help me again, thanks :)


In response to Muska
That is because there is no such thing as mob/player.