(Expletive deleted.) in Developer Help
|
|
Blarg.
GM_Summon_All()
set category = "Owner"
set name = "Summon all"
set desc = "Summon all players in the world."
if(alert("This will summon every player in the world. Continue?","Summon all","Yes","No") == "Yes")
for(var/mob/M in world)
if(istype(M,/mob/Car))
..()
if(M == usr)
..()
else
M.loc = locate(usr.x,usr.y - 1, usr.z)
M << "[usr] has summoned you!"
..()
I bolded and italicised the lines I'm having the problem with... It's supposed to ignore any mobs in the world that are of type mob/Car, and the person who used the verb naturally. If I put the "if(istype(M,/mob/Car))" line first, it summons all the cars and not the user of the verb, and if I put the "if(M == usr)" line first, it ignores the cars and summons the user of the verb. Help please? -.-'
|
The trouble with what you had before was that ..() just called back. It didn't stop the loop or skip that person.
--Tarmas.