ID:159650
 
Right. I'm really clueless on this, i have 3 types of trees and i want a Chop Verb to only work if the variable "Axe" is set to "Yes".

Little halp? (By the way, the trees are called 'Cirom Tree', 'Tropin Tree' and 'Squadum Tree' if you needed their names.)
What you need is a selection statement checking whether that variable is true (1 in DM) or false (0 in DM). Shouldn't be hard to figure out what a selection statement is. Find out what the three constructs are: Sequence, Selection and Iteration. And read some of the DM guide, look at some demos and you won't need to ask for help here for such a simple thing :-)

Good luck.
In response to Lyndonarmitage1
Lyndonarmitage1 wrote:
What you need is a selection statement checking whether that variable is true (1 in DM) or false (0 in DM).

This goes for pretty much every programming language: 1=on/true/yes, 0=off/false/no. It also allows for the use of operators like if(!usr.Axe) instead of if(usr.Axe!="Yes"), improves readability and probably processing efficiency.

Shouldn't be hard to figure out what a selection statement is. Find out what the three constructs are: Sequence, Selection and Iteration.

I don't see how this would help much, unless hes planning on drawing up a flow chart just for the hell of it. There should be no need for iteration in this, and throwing textbook terms at something rarely provides a solution.

obj/Tree
verb/Chop()
set src in oview(1)
if(usr.Axe)
usr<<"You got some wood from the [src.name]"
else
usr<<"You don't have an axe!"
In response to Falacy
Your right iteration has nothing to do with it.
He did however claim he was clueless so I thought rather than spoon feeding him the code he should try to find out on his own, learning what selection is automatically means he would be able to answer his own question.

Glad you didn't disagree with reading the DM guide though :P