ID:139213
 

I'm reading the Guide and learning the DM programming language, and as I learn new things I'm creating random bits of code to test different functions. I creating a verb that when used by the player, the object named target would be given another icon. When I try this the verb never shows up.

obj
target
name = "Red Target"
icon = 'contarget.dmi'
icon_state = "1"
density = 1
verb
makeblue(src in oview(1))
set name = "Acvtivate Target"
icon = 'contarget.dmi'
icon_state = "2"





Raruno wrote:

I'm reading the Guide and learning the DM programming language, and as I learn new things I'm creating random bits of code to test different functions. I creating a verb that when used by the player, the object named target would be given another icon. When I try this the verb never shows up.

> obj
> target
> name = "Red Target"
> icon = 'contarget.dmi'
> icon_state = "1"
> density = 1
> verb
> makeblue(src in oview(1))
> set name = "Acvtivate Target"
> icon = 'contarget.dmi'
> icon_state = "2"
>







 obj
target
name = "Red Target"
icon = 'contarget.dmi'
icon_state = "1"
density = 1
verb
makeblue()
set src in oview(1) // <---
set name = "Acvtivate Target"
icon = 'contarget.dmi'
icon_state = "2"
In response to TheProductions
Thank you. How do you know when to define it in the body or in the parameter?
In response to Raruno
Parameters are information input directly into the function being called, whether it be from user input (verb/say(msg as text)) or from another function elsewhere (step(src, dir))

set is used to set-up the way the verb is used. Such as name and desc, and distance calculators.