2018-12-30 16:43:04 -08:00
|
|
|
|
---
|
|
|
|
|
|
title: objects / present
|
|
|
|
|
|
---
|
2023-11-25 09:50:24 -08:00
|
|
|
|
# present
|
2018-12-30 16:43:04 -08:00
|
|
|
|
|
|
|
|
|
|
### NAME
|
|
|
|
|
|
|
2018-12-30 16:59:01 -08:00
|
|
|
|
present() - find an object by id
|
2018-12-30 16:43:04 -08:00
|
|
|
|
|
|
|
|
|
|
### SYNOPSIS
|
|
|
|
|
|
|
2018-12-30 16:59:01 -08:00
|
|
|
|
object present( mixed str, object ob );
|
2018-12-30 16:43:04 -08:00
|
|
|
|
|
|
|
|
|
|
### DESCRIPTION
|
2018-12-30 16:59:01 -08:00
|
|
|
|
|
2021-12-03 06:22:10 +08:00
|
|
|
|
if first argument is string, second argument is missing, searches for
|
2022-09-02 21:48:01 -04:00
|
|
|
|
a object in the object's environment using the id() apply where it answers 1
|
|
|
|
|
|
to indicate a match.
|
2018-12-30 16:43:04 -08:00
|
|
|
|
|
|
|
|
|
|
if first argument is string, second argument is object, only searches
|
2022-09-02 21:48:01 -04:00
|
|
|
|
for target in that object's inventory using the same strategy as above.
|
2018-12-30 16:43:04 -08:00
|
|
|
|
|
|
|
|
|
|
"foo 1" means the first "foo" in the inventory. the first in the
|
|
|
|
|
|
inventory is the last object that moved in.
|
|
|
|
|
|
|
2021-12-03 06:22:10 +08:00
|
|
|
|
if first argument is object, second argument is missing, check if
|
2018-12-30 16:43:04 -08:00
|
|
|
|
object is in this object's inventory, or as a sibling in this object's
|
2022-09-02 21:48:01 -04:00
|
|
|
|
environment's inventory, returns object's parent.
|
2018-12-30 16:43:04 -08:00
|
|
|
|
|
|
|
|
|
|
if first argument is object, second argument is object, check if
|
|
|
|
|
|
object1 is in object2 inventory, return object1 if true.
|
|
|
|
|
|
|
|
|
|
|
|
If object is hidden (via set_hide()), and current object is not hid‐
|
|
|
|
|
|
able. returns 0
|
|
|
|
|
|
|
|
|
|
|
|
### SEE ALSO
|
|
|
|
|
|
|
2018-12-30 16:59:01 -08:00
|
|
|
|
move_object(3), environment(3)
|
2019-10-19 01:03:49 -07:00
|
|
|
|
|