ok heres my code
turf/Door
density=1
icon='grass.dmi'
icon_state="door"
Click()
density=0
icon_state="dooro"
i want to beable to click on the door again then it to close
ID:266499
![]() Mar 24 2002, 7:18 am
|
|
Use a var to store thier name, and check the var upon opening.
Example VERB: mob/var/example_name -Rcet |
I'm going to help you this last time I won't help you ever again:
obj |
i did
obj var owner obj/Door icon = 'grass.dmi' icon_state = "door" density = 1 opacity = 1 Click() if(get_dist(src,usr) > 1) return else if(src.owner == usr.key) //Open else //Don't open mob proc Build_door() var/obj/Door/D = new D(usr.loc) D.owner = usr.key and got aotmsf.dm:283:error:D: compile failed (possible infinite cross-reference loop) aotmsf.dm:284:error:D.owner: compile failed (possible infinite cross-reference loop) |
I get a runtime error
runtime error: Cannot create objects of type /obj/Door. proc name: Build door (/mob/verb/Build_door) source file: aotmsf.dm,282 usr: \[Master GM] Strange Kidd (/mob/Man) src: \[Master GM] Strange Kidd (/mob/Man) call stack: \[Master GM] Strange Kidd (/mob/Man): Build door() |
Try this.
obj/door/var/owner obj/door icon='door.dmi' density=1 opacity=1 Click() if(usr.key==owner) density=1 else return mob/verb/BuildDoor() var/obj/door/S=new/obj/door(src.loc) S.owner=src.key |
hope i helped
-Rcet