/obj/spawnpoint/player
icon_state = "player"
var/totalspawnpoints = 0
/obj/spawnpoint/player/var/spawnpointid = 0
/obj/spawnpoint/player/New()
if(src.spawnpointid==0)
totalspawnpoints = totalspawnpoints + 1
src.spawnpointid=totalspawnpoints
/mob/lobby_player/verb/
join()
view() << "Joining the Game!"
var/spawnpointid = 0
var/spawnpointidchosen = rand(1,totalspawnpoints)
var/turf/spawnpointidloc = locate(/obj/spawnpoint/player, spawnpointid == spawnpointidchosen)
loc = locate(spawnpointidloc.x, spawnpointidloc.y, spawnpointidloc.z)
Problem description:
i am trying to locate a "/obj/spawnpoint/player" with a certain var called spawnpointid that is equal to spawnpointidchosen. how would i do this?
One thing to keep in mind is that object won't be GC'd until the tag variable is cleared or del is used.