-
Notifications
You must be signed in to change notification settings - Fork 19
SCUMM 8 API: Verbs
Verbs have always been core to classic point & click adventure game engines and SCUMM-8 is no different. You can even customize/rename the verbs if you need to.
There are some verbs that function in particular ways (such as GIVE and USE). Please see below for more information.
When you want an Object that can be given to someone, you define the actions to occur on the Object being given. When the Object's give
function is called, the Actor it's being given to will be automatically passed as as parameter (such as noun2
below).
For example:
give = function(me, noun2)
-- am i being given to the right person?
if noun2 == purp_tentacle then
say_line("here you go")
me.owner = purp_tentacle
say_line(purp_tentacle, "thank you!")
else
say_line("i might need this")
end
end,
When you want an Object that the player can use, you define the actions to occur on the Object being used.
There are two ways an Object can be used: directly (e.g. use computer
), or with another Object (e.g use disk with computer
). If an Object should be used with something else, then you must specify use_with=true
in the Object's data definition. Otherwise, the Object's use
function will be called before a second object could be clicked.
When the Object's use
function is called, the Object it's being used with will be automatically passed as as parameter (such as noun2
below).
For example:
use = function(me, noun2)
-- am i being used on the correct object?
if (noun2 == obj_computer) then
say_line("ok, the disk has been inserted")
else
say_line("i might need this")
end
end,
Introduction
Definitions
Core Variables
Core Functions
Tutorials