ID:1334381
 
(See the best response by LordAndrew.)
Code:
mob
verb
fly()
density = 0 //fly into walls


Problem description:I can use it and i start to fly but how do i cancel it?

Best response
As it stands you're merely setting density to 0. You'd want to make use of the if and else statement to toggle density on and off. Section 8 of chapter 6 in the Guide has an explanation on conditional flow statements, and section 9 has a simplified version of what you're asking for.
thanks
In response to LordAndrew
Wouldn't density = !density also toggle it? Or am I mistaken on how ! works for situations like this?
In response to NNAAAAHH
No, you're correct. This would be my preferred method of doing something like this instead of an unnecessary if else statement.