ID:143076
 
Code:
        SummonEspadas()
set category="Race"
for(var/mob/M in world)
if(src.Squad=="Espada")
src.Frozen=1
var/obj/Negoation1/E2 = new /obj/Negoation1 ()
var/obj/Negoation/E1 = new /obj/Negoation ()
var/obj/Negoation/E3 = new /obj/Negoation ()
E2.loc=locate(usr.x,usr.y+2,usr.z)
sleep(10)
E3.loc=locate(usr.x,usr.y+1,usr.z)
sleep(10)
E1.loc=locate(usr.x,usr.y,usr.z)
sleep(30)
src.Frozen=0
del(E1)
del(E2)
del(E3)
src.loc=locate(1,1,1)//Have to change
if(src.Rank=="Espada #1")
src.loc=locate(usr.x-9,usr.y-1,usr.z)
if(src.Rank=="Espada #2")
src.loc=locate(usr.x-8,usr.y-1,usr.z)
if(src.Rank=="Espada #3")
src.loc=locate(usr.x-7,usr.y-1,usr.z)
if(src.Rank=="Espada #4")
src.loc=locate(usr.x-6,usr.y-1,usr.z)
if(src.Rank=="Espada #5")
src.loc=locate(usr.x-5,usr.y-1,usr.z)
if(src.Rank=="Espada #6")
src.loc=locate(usr.x-4,usr.y-1,usr.z)
if(src.Rank=="Espada #7")
src.loc=locate(usr.x-3,usr.y-1,usr.z)
if(src.Rank=="Espada #8")
src.loc=locate(usr.x-2,usr.y-1,usr.z)
if(src.Rank=="Espada #9")
src.loc=locate(usr.x-1,usr.y-1,usr.z)
if(src.Rank=="Espada #10")
src.loc=locate(usr.x-8,usr.y-1,usr.z)
return


Problem description:It dosent seem to cate the npc which i add the vars too

SummonEspadas()
set category="Race"
for(var/mob/M in world)
if(M.Squad=="Espada")
M.Frozen=1
var/obj/Negoation1/E2 =new/obj/Negoation1
var/obj/Negoation/E1 =new/obj/Negoation
var/obj/Negoation/E3 =new/obj/Negoation
E2.loc=locate(usr.x,usr.y+2,usr.z)
sleep(10)
E3.loc=locate(usr.x,usr.y+1,usr.z)
sleep(10)
E1.loc=locate(usr.x,usr.y,usr.z)
sleep(30)
M.Frozen=0
del (E1)
del (E2)
del (E3)
M.loc=locate(1,1,1)
if(M.Rank=="Espada #1")
M.loc=locate(usr.x-9,usr.y-1,usr.z)
if(M.Rank=="Espada #2")
M.loc=locate(usr.x-8,usr.y-1,usr.z)
if(M.Rank=="Espada #3")
M.loc=locate(usr.x-7,usr.y-1,usr.z)
if(M.Rank=="Espada #4")
M.loc=locate(usr.x-6,usr.y-1,usr.z)
if(M.Rank=="Espada #5")
M.loc=locate(usr.x-5,usr.y-1,usr.z)
if(M.Rank=="Espada #6")
M.loc=locate(usr.x-4,usr.y-1,usr.z)
if(M.Rank=="Espada #7")
M.loc=locate(usr.x-3,usr.y-1,usr.z)
if(M.Rank=="Espada #8")
M.loc=locate(usr.x-2,usr.y-1,usr.z)
if(M.Rank=="Espada #9")
M.loc=locate(usr.x-1,usr.y-1,usr.z)
if(M.Rank=="Espada #10")
M.loc=locate(usr.x-8,usr.y-1,usr.z)
return
In response to Anime Entertaniment
I tryed that besides both code dosent even summon them
In response to Anime Entertaniment
SummonEspadas()
set category="Race"
for(var/mob/M in world)
if(M.Rank=="Espada #1")
M.loc=locate(usr.x-9,usr.y-1,usr.z)
if(M.Rank=="Espada #2")
M.loc=locate(usr.x-8,usr.y-1,usr.z)
if(M.Rank=="Espada #3")
M.loc=locate(usr.x-7,usr.y-1,usr.z)
if(M.Rank=="Espada #4")
M.loc=locate(usr.x-6,usr.y-1,usr.z)
if(M.Rank=="Espada #5")
M.loc=locate(usr.x-5,usr.y-1,usr.z)
if(M.Rank=="Espada #6")
M.loc=locate(usr.x-4,usr.y-1,usr.z)
if(M.Rank=="Espada #7")
M.loc=locate(usr.x-3,usr.y-1,usr.z)
if(M.Rank=="Espada #8")
M.loc=locate(usr.x-2,usr.y-1,usr.z)
if(M.Rank=="Espada #9")
M.loc=locate(usr.x-1,usr.y-1,usr.z)
if(M.Rank=="Espada #10")
M.loc=locate(usr.x-8,usr.y-1,usr.z)
return
note: fix line errorrs
        SummonEspadas()
set category="Race"
for(var/mob/M in world) // for is a procedure used for looking through things. you must indent related things under it.
if(src.Squad=="Espada")
src.Frozen=1
var/obj/Negoation1/E2 = new /obj/Negoation1 () // you spelled "Negation" wrong, by the way
var/obj/Negoation/E1 = new /obj/Negoation ()
var/obj/Negoation/E3 = new /obj/Negoation ()
E2.loc=locate(usr.x,usr.y+2,usr.z)
sleep(10)
E3.loc=locate(usr.x,usr.y+1,usr.z)
sleep(10)
E1.loc=locate(usr.x,usr.y,usr.z)
sleep(30)
src.Frozen=0
del(E1)
del(E2)
del(E3)
src.loc=locate(1,1,1)//Have to change

/*
* not a single one of these is referencing M,
* the mob you're trying to find. This will only
* affect the OWNER of the verb/procedure.
* (change "src" to "M")
*/


if(src.Rank=="Espada #1")
src.loc=locate(usr.x-9,usr.y-1,usr.z)
if(src.Rank=="Espada #2")
src.loc=locate(usr.x-8,usr.y-1,usr.z)
if(src.Rank=="Espada #3")
src.loc=locate(usr.x-7,usr.y-1,usr.z)
if(src.Rank=="Espada #4")
src.loc=locate(usr.x-6,usr.y-1,usr.z)
if(src.Rank=="Espada #5")
src.loc=locate(usr.x-5,usr.y-1,usr.z)
if(src.Rank=="Espada #6")
src.loc=locate(usr.x-4,usr.y-1,usr.z)
if(src.Rank=="Espada #7")
src.loc=locate(usr.x-3,usr.y-1,usr.z)
if(src.Rank=="Espada #8")
src.loc=locate(usr.x-2,usr.y-1,usr.z)
if(src.Rank=="Espada #9")
src.loc=locate(usr.x-1,usr.y-1,usr.z)
if(src.Rank=="Espada #10")
src.loc=locate(usr.x-8,usr.y-1,usr.z)
return // useless
Thanks i tried and it worked but it only summons a few espadas.Also i added this it has no erros but its givin my some crazy stuff.

        SummonEspadas()
set category="Race"
for(var/mob/M in world)
if(src.Squad=="Espada")
src.Frozen=1
var/obj/Negoation1/E2 = new /obj/Negoation1 ()
var/obj/Negoation/E1 = new /obj/Negoation ()
var/obj/Negoation/E3 = new /obj/Negoation ()
src.loc=locate(usr.x,usr.y+2,usr.z)
sleep(10)
src.loc=locate(usr.x,usr.y+1,usr.z)
sleep(10)
src.loc=locate(usr.x,usr.y,usr.z)
sleep(30)
src.Frozen=0
del(E1)
del(E2)
del(E3)
if(M.Rank=="Espada #1")
usr.loc=locate(usr.x-9,usr.y-1,usr.z)
if(M.Rank=="Espada #2")
M.loc=locate(usr.x-8,usr.y-1,usr.z)
if(M.Rank=="Espada #3")
M.loc=locate(usr.x-7,usr.y-1,usr.z)
if(M.Rank=="Espada #4")
M.loc=locate(usr.x-6,usr.y-1,usr.z)
if(M.Rank=="Espada #5")
M.loc=locate(usr.x-5,usr.y-1,usr.z)
if(M.Rank=="Espada #6")
M.loc=locate(usr.x-4,usr.y-1,usr.z)
if(M.Rank=="Espada #7")
M.loc=locate(usr.x-3,usr.y-1,usr.z)
if(M.Rank=="Espada #8")
M.loc=locate(usr.x-2,usr.y-1,usr.z)
if(M.Rank=="Espada #9")
M.loc=locate(usr.x-1,usr.y-1,usr.z)
if(M.Rank=="Espada #10")
M.loc=locate(usr.x-8,usr.y-1,usr.z)
return
In response to Trane5
oK I shortened the code

        SummonEspadas()
set category="Race"
for(var/mob/M in world)
if(src.Squad=="Espada")
M.Frozen=1
var/obj/Negoation1/E2 = new /obj/Negoation1 ()
var/obj/Negoation/E1 = new /obj/Negoation ()
var/obj/Negoation/E3 = new /obj/Negoation ()
E2.loc=locate(usr.x,usr.y+2,usr.z)
sleep(10)
E3.loc=locate(usr.x,usr.y+1,usr.z)
sleep(10)
E1.loc=locate(usr.x,usr.y,usr.z)
sleep(30)
M.Frozen=0
M.loc=locate(usr.x-1,usr.y-1,usr.z)
del(E1)
del(E2)
del(E3)


INstead of the object going on the npc it goes on me??
First of all: write topics. It makes everybody else's life easier.

Second: I've got absolutely no clue what you're trying to do. The for() loop does nothing, because nothing is indented under it. If everything after it WAS indented under it, the for() loop would be utterly useless, because it STILL would do nothing: it's looping through every mob in the world and then doing nothing.

Third: The description of your problem is utterly baffling: "It dosent seem to cate the npc which i add the vars too" [sic]. I assume you mean, "It doesn't create the NPC which I add the vars to," which is STILL baffling, because you aren't creating anything (except some /obj/Negoation (don't you mean "Negotiation"?) and a /obj/Negoation1, neither of which are NPCs I'd imagine), nor are you adding vars to anything. So, I have no idea what you're trying to do, how it doesn't work, and what to do to fix it.

At least I'm not providing an incorrect solution to a problem that doesn't exist, like some of the other replies in this thread.

If you want help, you aren't going to get any until you give an accurate description (bonus points if you run it through a damn spell-checker first) of what you are trying to do and how it isn't working.
In response to Trane5
Very carefully explain what that code is supposed to do. I may then be able to help.
In response to Garthor
You win. +5 Internets.
In response to LawkJaw
OK. When someone uses it looks thorugh evevryone in world and if there squad is espada the the src the gets the overlay on them . then sleep then it gets telported to the location
In response to Trane5
Trane5 wrote:
OK. When someone uses it looks thorugh evevryone in world and if there squad is espada the the src the gets the overlay on them . then sleep then it gets telported to the location

Hmm... So a player uses the verb SummonEspada() then each mob in world whos squad is Espada gets an overlay, then the proc waits a bit and "it" gets teleported to the location?

Ok, what do you mean by overlay and what is "it"?

is it the person who used the verb, one of the mobs in world with a squad of Espada or something the verb created?
In response to LawkJaw
No he wont be espada he would be somthiing else.
In response to Trane5
yea, I can't really understand what you're talking about. Try asking for help in your first language, maybe someone will be able to help.
In response to Trane5
Trane5 wrote:
looks thorugh evevryone in world


Don't do that. Make a seperate array that contains references to the people you need and you can access what you want a lot faster.