Skilltree
parent_type = /obj/
icon = 'Skilltree.dmi'
var
reqpoints = 0
tech_obtained = /Skill/
unlocked_skills = list()
Click()
if( (name in usr.Learned_Skills) )
usr << "You have already learned this!"
else if( !(name in usr.Activated_Skills) )
usr <<"This skill is not available at this time."
else if(usr.Skill_Points < reqpoints)
usr << "You don't have the required skill points for this!"
else if( alert("Obtain [name] for [reqpoints] points?","Skill Obtain","Yes","No") == "Yes")
usr << "You have obtained [name]!"
usr.Learned_Skills += name
for(var/A in unlocked_skills)
if( !(A in usr.Activated_Skills) )
usr.Activated_Skills += A
usr.Skill_Points = max(0, usr.Skill_Points - reqpoints)
usr.contents += new tech_obtained
usr.Refresh_Skilltree()
Attack
name = "Attack"
icon_state = "Attack"
reqpoints = 0
unlocked_skills = list("Defend")
tech_obtained = /Skill/Attack
Defend
name = "Defend"
icon_state = "Defence"
reqpoints = 0
tech_obtained = /Skill/Defend
turf
Skilltree
icon = 'Skilltree.dmi'
Background
icon_state = "Background"
Left_Right
icon_state = "Left - Right"
Up_Down
icon_state = "Up - Down"
///////////////////////////////////////Otherpart//////////////////////////////////////////////////////////////
Skill
parent_type = /obj
Attack
Click()
usr << "You clicked [src]"
Defend
Click()
usr << "You clicked [src]"
mob
verb
SkillTree()
if(Skill_Tree)
for(var/I in client.images) if(I)
del I
client.eye = usr
Skill_Tree = 0
return
src << "Your view has changed, but you are still in the same spot."
Skill_Tree = 1
client.eye = locate (7,7,2)
Refresh_Skilltree()
proc
Refresh_Skilltree()
for(var/image/I in client.images) if(I && I.tag == "Skilltree")
del I
for(var/Skilltree/S in oview(client.eye) )
if( ! (S.name in Activated_Skills) )
var/image/I = new('Skilltree.dmi',S.loc,"Unavailable",FLY_LAYER)
I.tag = "Skilltree"
client.images += I
var
Skill_Points = 0
Activated_Skills = list("Attack")
Learned_Skills = list()
tmp
Skill_Tree = 0
Problem description:
When I click the verb before i make a charater the skilltree I made works fine but after I create the charater and get on the game map it blackscreens me any ideas y