Skull_Bag
density=1
icon='Skull Bag.dmi'
icon_state="skullbag"
verb
Active_Train()
set src in oview(1)
if(usr.ActiveSide==0 || usr.ActiveSide==null)
usr.ActiveSide=rand(1,4)
if(usr.ActiveSide==1)
usr<<output("Punch The Bag Facing Up (^)","DisplayDir.output")
if(usr.ActiveSide==2)
usr<<output("Punch The Bag Facing Down (v)","DisplayDir.output")
if(usr.ActiveSide==3)
usr<<output("Punch The Bag Facing Left (<)","DisplayDir.output")
if(usr.ActiveSide==4)
usr<<output("Punch The Bag Facing Right (>)","DisplayDir.output")
winshow(usr,"ActiveWindow")
New()
src.AddName("Active Bag",color2Add="black")
Problem description: The text wont appear in the DisplayDir Skin thats provided. ANd, I dont know how to resolve the issue
Also I'm not sure why ActiveSide is a mob verb, since it would seem like it should belong to something else. It would help if you could explain what this code is supposed to do. Is it possible that ActiveSide already has a value other than 0 or null, and thus the code inside this if() never runs at all?
Basically we're missing the broader context. I'd need to see the whole routine in question and understand what it's supposed to be doing.
To be honest this code has some design issues that suggest there are design issues in the rest of the code. For instance, if ActiveSide is always being set to a value from 1 to 4, why not use a list to grab the output text instead of relying on a bunch of if() statements and repeated code?