mob/players
Login() // logging on in...
var/mob/players/A = usr
if(A.everwood==1)
A.loc = locate(/turf/everwoodsh)
if(A.kishkan==1)
A.loc = locate(/turf/start)
if(A.terrash==1)
A.loc = locate(/turf/terrashsh)
if(A.zenith==1)
A.loc = locate(/turf/zenithsh)
if(A.zenith==0&&A.everwood==0&&A.kishkan==0&&A.terrash==0)
A.loc = locate(/turf/start)
var // player variables
terrash = 0
kishkan = 0
zenith = 0
everwood = 0
obj
terrash
icon = 'building.dmi'
icon_state = "bigshroom"
density = 1
Bump()
var/mob/players/M = usr
if(M.kishkan==1)
M.kishkan = 0
if(M.zenith==1)
M.zenith = 0
if(M.everwood==1)
M.everwood = 0
if(M.terrash==0)
M.terrash = 1
M << "<b>Start Modification Saved."
kishkan
icon = 'building.dmi'
icon_state = "bigshroom"
density = 1
Bump()
var/mob/players/M = usr
if(M.terrash==1)
M.terrash = 0
if(M.zenith==1)
M.zenith = 0
if(M.everwood==1)
M.everwood = 0
if(M.kishkan==0)
M.kishkan = 1
M << "<b>Start Modification Saved."
zenith
icon = 'building.dmi'
icon_state = "bigshroom"
density = 1
Bump()
var/mob/players/M = usr
if(M.kishkan==1)
M.kishkan = 0
if(M.terrash==1)
M.terrash = 0
if(M.everwood==1)
M.everwood = 0
if(M.zenith==0)
M.zenith = 1
M << "<b>Start Modification Saved."
everwood
icon = 'building.dmi'
icon_state = "bigshroom"
density = 1
Bump()
var/mob/players/M = usr
if(M.kishkan==1)
M.kishkan = 0
if(M.zenith==1)
M.zenith = 0
if(M.terrash==1)
M.terrash = 0
if(M.everwood==0)
M.everwood = 1
M << "<b>Start Modification Saved."
turf
everwoodsh
icon = 'lightgrass.dmi'
zenithsh
icon = 'snow.dmi'
icon_state = "ice5"
terrashsh
icon = 'lightgrass.dmi'
Problem description:
When I bump any of the objs listed, it doesn't do anything. What's the problem here?
That effectively describes what's going on. Usr is unfriendly. Unless the thing you're putting it in is a verb, you will get problems.
In this case, there's an easy fix. Bump() gives you an argument, equal to the thing that did the bumping. So you can do this:
a isn't neccessarily a mob, nor a player. The ifs check that a is a mob, and the client check is to make sure it's a player. Note that the colon (:) thingy there is naughty and you shouldn't use it. So rewrite this without it, it's just a quick example, and you already know a is a mob so it's fairly safe.
I so bet I'm going to get shouted down over use of colon.