Wind(dir)
if(dir == 7 ) return "Northwest"
if(dir == 8 ) return "North"
if(dir == 9 ) return "Northeast"
if(dir == 6 ) return "East"
if(dir == 3 ) return "Southeast"
if(dir == 2 ) return "South"
if(dir == 1 ) return "Southwest"
if(dir == 4 ) return "West"
..()
Wind2(dir)
Wind()
walk(src,dir)
..()
obj
log
icon = 'log.dmi'
HP = 1
density = 1
Wind2()
Problem description:
I set this up thinking that the log once created would have the pre-defined variable HP and would call the Wind2 proc. The wind 2 proc would call Wind and get a direction (for instance, 6) and return the direction for Wind to be put in walk and give the object a direction to move constantly.
There is no predefined variable HP. If you want logs to have inherited health, you need to define HP for objs.
It is returning the direction, but you're not doing anything with that direction that is returned. All Wind() is doing is returning a direction, so just calling it on a line by itself equates to almost the same thing as putting the number 2 (for south) on a line by itself. SOUTH means something, but SOUTH on a line by itself does nothing (but generate an error)
You want to do something like dir=Wind(), setting dir to the return value of Wind().