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
|
|
In response to Rcet
|
|
Ok If the user builds a door how would only him beable to open it
|
In response to Strange Kidd
|
|
Use a var to store thier name, and check the var upon opening.
Example VERB: mob/var/example_name -Rcet |
In response to Rcet
|
|
well not rele i wanted to do it with the click thing
|
In response to Strange Kidd
|
|
I'm going to help you this last time I won't help you ever again:
obj |
In response to Nadrew
|
|
There is no new door?
|
In response to Strange Kidd
|
|
I don't know how you want it created so that's up to you.
|
In response to Nadrew
|
|
well where would i put it if i wanted it on the usr
|
In response to Strange Kidd
|
|
new D(usr.loc)
|
In response to Nadrew
|
|
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) |
In response to Strange Kidd
|
|
var/obj/Door/D = new() |
In response to Nadrew
|
|
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() |
In response to Strange Kidd
|
|
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 |
In response to Super16
|
|
THANKS MAN!
|
hope i helped
-Rcet