ID:164037
 
is it possible to change the setting of an obj using a proc

like an obj is set as invisable and the proc when enabled sets it visable
obj/proc/ChangeVisibility()
if(src.invisibility>=1) src.invisibility=0 // if the object is already invisible, make it visible
else src.invisibility=101 //if the object isnt already invisible, make it invisible. you can use any range of nbrs between 1 to 101. Depending on how much your letting your users see, depends on which settings you use

//Example of how the code is used
obj
Corn
icon='Corn.dmi'
verb/MakeInvisible()
set src in oview(1)
set name="Toggle Visibility"
src.ChangeVisibility()
In response to QMarkReal
obj
hub
Curse_seal
name="Curse seal"
icon = 'kyuubi.dmi'
icon_state = "screen"
invisibility = 1
New(client/C)
screen_loc ="15,4"
C.screen +=src


mob
proc
Death_Check(mob/M,mob/N)
//===============Seal Update=====================
if(N:Fox_deamon== 1)
if(N:Curse_seal == 0)
if(N:health <= 0)
N.Curse_seal = 1
N.Attacks(usr,null,"Dfox","Curse seal",1000,5,0,0,/obj/Curse_seal/Dfox,null,null,0,0)
//N.ChangeVisibility()
return

see that top code is the obj and mob proc is the proc i want to use it to change the obj to visable , can you show it use these if possible ,ty