The thing with this is I'm going to want to make it so that I can open different force fields with different Fusion Keypads..
This is my current coding:
obj/var/ID
obj
FusionKeyPad
name = "Fusion KeyPad"
icon = 'Fusion KeyPad.dmi'
icon_state = "Active"
Power = 1
PoweredOn = 1
ID = 111
desc = "Using SoulPrint Identification, Only those with the highest Clearance Level can open the Fusion Force Field Doors."
FusionForceField
name = "Fusion Force Field"
icon = 'Fusion Force Field.dmi'
icon_state = "Active"
Power = 1
PoweredOn = 1
ID = 111
density = 1
HurtLevel = 25
desc = "This Fusion Force Field Door can handle anything you can throw at it, the only thing that can open it is The Fusion KeyPad with the right Clearance Level."
var/obj/FusionIDapproved = 0
var/obj/Connection = 0
obj
FusionForceField
proc
OpenForceField()
if(usr.KeyCard == 1)
while(FusionIDapproved == 1)
flick("Open",src)
sleep(600)
else usr << "<b><font color = red> Access Denied. </font>"
FusionKeyPad
verb
UseKeyPad()
set src in view()
var/obj/FusionForceField/M = (/obj/FusionForceField)
if(usr.KeyCard == 1)
if(M.ID == src.ID)
FusionIDapproved = 1
M.OpenForceField()
else return 1
else usr << "<b> <font color = red> Access Denied. </font>"
I tried using the
obj/var/ID
so I could match the two Fusion parts together, but I haven't found a successful way to link them. I also don't know how to call the proc
M.OpenForceField()
from the Fusion Force Field proc. I was hoping someone can clear this up so I can apply what I learn to future problems like this.
Thank You.
I think the reason I picked flick() in the first place is because of the convienience of the paramaters which I couldn't get working.
Now my problem is more understood that it's the icon_state I have to change, But I can't figure out how to get the icon_state changed because it is actived by a brother on the same tree and I never learned how to get around the coding tree without using var procedures.
I did manage to piece together a code that compiles, but the fusion force field still won't open. Later on I want to add DblClick() to the Fusion Key Pad, thats why I had to use to different objects for this.
This is what I have so far:
Any help on this issue would be grately appreciated.
Thank You.