ID:263898
 
its supposed to be a simple problem i want the user to press a direction in order to affect a process going on

my direction procs are the regular ones simply.
North()
South()
East()
West()

i think [THINK] the code should be something along these lines

if(usr.North())


but when i do that i get an error like this

"14:error:usr.North:undefined var"

does anyone know why? or can you tell me the correct way to this problem
What you would have to do is check if this process is activated in the Direction Procs. If they are then do what you want them to do, if not simple continue on with the standard procedure.
if(usr.dir==NORTH)  //if user is facing north...
//Blah Blah


That should work ^_^
In response to Dice1989
no crunk that wont work i need it to be somthing like you press north and it cause somthing to happen so basically you have to activate it for the reaction to come
In response to Jamaican Productions
Ive already answered this in your How To post :P
if some1 press north
client/North()

if some1 press South
 client/South()



etc
In response to Saucepan Man
that doesnt work



ok look

the process is like this

mob
verb
Star_Train()
set category ="Training"
usr<<"you begin to focus on the star rock and its chakra aura forms around you causing you to glow a briliant purple"
usr.chakratrain=1
usr.random = rand(1,2)
if(usr.random == 1)
usr<<output('1special.dmi',"TRAIN")
if(usr.random == 2)
usr<<output('2special.dmi',"TRAIN")


i want somone to press a verb and the process restarts and the person gets a small bit of mastery of there chakra at that point i will do that part when i figure out how to place a command for a verb inside that


i decided not to use direction commands since that seems alot more dificult


In response to Jamaican Productions
anyone....this would be really useful to me
The direction procs belong to the client, so to use them in your verb you would have to reference the client. Something like src.client.East().
In response to Jamaican Productions
Uh, I'm sure Im able to help but I dont think I know what youre asking?

I'll post an answer to what I think youre asking:

mob
verb
Star_Train()
set category ="Training"
usr<<"you begin to focus on the star rock and its chakra aura forms around you causing you to glow a briliant purple"
usr.chakratrain=1
switch(pick(1,2)) //i changed to this instead of using rand(1,2) as this is more efficient etc.
if(1) usr<<output('1special.dmi',"TRAIN")
if(2) usr<<output('2special.dmi',"TRAIN")
usr.training=1 usr.TraingingCheck()
proc
TrainingCheck()
if(src.training)
src<<"Youre still training."
spawn(20)src.TrainingCheck() //loops every 2 seconds if src.training is true
else
src<<"Slacker. You stoppped training!" //the proc will end here as theres no line saying to repeat

verb
StopTraining()
set name="Stop Training"
usr.training=0


If this is what youre after, then you could also put them into your client/North() settings.