Skip to content

SCUMM 8 API: Functions

Paul Nicholas edited this page Apr 15, 2017 · 19 revisions

Below you will find the SCUMM-8 API reference. This API was heavily inspired by the original SCUMM command reference.

Basic Principles

  • "Walkable" tiles For a sprite tile to be deemed "walkable", you must set the Flag 0 (see below). Otherwise the selected player will not be able to navigate a path to the tile when used in a room's map.

Definitions (Room/Object/Actor)

  • x,y

    • Position of Object within a Room.
  • w,h

    • Width and height (in sprite cel's) of an Object.
  • state

    • The name of the state (which in turn, references a sprite number) to show for the object/actor. e.g. state=state_here
  • trans_col

    • The color to draw as transparent (defaults to 0 = black)
  • classes

    • Object and Actors can have multiple classes attributed, all of which have different effects. The available classes are:
      • class_untouchable = Item cannot be interacted with at all
      • class_pickupable = Item can be picked-up into actor's inventory
      • class_talkable = Actor can be talked to
      • class_giveable = Object can be given to another Actor
      • class_openable = Object can be opened
      • class_actor = Object is an Actor (not just a normal Object)
      • class_door = Object is a door (will allow easy linking to other rooms using target_door property.

For example: classes = { class_openable, class_door }

  • property

    • Desc
  • property

    • Desc
  • property

    • Desc
  • property

    • Desc
  • property

    • Desc
  • property

    • Desc
  • property

    • Desc
  • property

    • Desc
  • property

    • Desc
  • property

    • Desc
  • property

    • Desc
  • property

    • Desc
  • property

    • Desc
  • property

    • Desc
  • property

    • Desc

TODO: Document this...

Functions

startup_script()

TODO: Document this...

camera_at(val)

TODO: Document this...

camera_follow(actor)

TODO: Document this...

camera_pan_to(val)

TODO: Document this...

wait_for_camera()

TODO: Document this...

cutscene(type, func_cutscene, func_override)

TODO: Document this...

dialog_add(msg)

TODO: Document this...

dialog_set(msg_table)

TODO: Document this...

dialog_start(col, hlcol)

TODO: Document this...

dialog_hide()

TODO: Document this...

dialog_clear()

TODO: Document this...

dialog_end()

TODO: Document this...

get_use_pos(obj)

TODO: Document this...

do_anim(actor, cmd_type, cmd_value)

TODO: Document this...

open_door(door_obj1, door_obj2)

open one (or more) doors TODO: Document this...

close_door(door_obj1, door_obj2)

close one (or more) doors TODO: Document this...

come_out_door(from_door, to_door, fade_effect)

TODO: Document this...

fades(fade, dir)

1=down, -1=up TODO: Document this...

change_room(new_room, fade)

TODO: Document this...

pickup_obj(objname)

TODO: Document this...

start_script(func, bg, noun1, noun2)

create new thread for script and add to list of local_scripts (or background scripts) TODO: Document this...

script_running(func)

TODO: Document this...

stop_script(func)

find script and stop it running TODO: Document this...

break_time(jiffies)

wait for cycles specified (min 1 cycle) TODO: Document this...

wait_for_message()

TODO: Document this...

say_line(actor, msg, use_caps, dont_wait_msg)

TODO: Document this...

stop_talking()

stop everyone talking & remove displayed text TODO: Document this...

print_line(msg, x, y, col, align, use_caps, dont_wait_msg)

punctuation...

":" new line, shown after text prior expires ";" new line, shown immediately note: an actor's talk animation is not activated as it is with say-line. TODO: Document this...

put_at(obj_or_actor, x, y, room)

TODO: Document this...

walk_to(actor, x, y)

walk actor to position TODO: Document this...

wait_for_actor(actor)

TODO: Document this...

proximity(obj1, obj2)

TODO: Document this...

valid_verb(verb, object)

TODO: Document this...

shake(enabled)

TODO: Document this...

Clone this wiki locally