Library›People
Nearest person
fn/game.NearestPerson
The nearest living person within so many metres of a place - players and NPCs alike - and whether there is one.
- Does
- An action: done when the run reaches it
- Runs
- On every machine
- Listed under
- Library › People
- In a file
fn/game.NearestPerson
Pins
- inata position
The place.
- inmetresa number
How far round it, in metres.
Starts as
20 - outwhoa character
The person.
- outfoundyes or no
Yes when there is one.
How it is made
Its body, as the bench opens it read-only. Copy into my mod on the bench makes a copy to change. The library's file is people.graph.json.
Built from
- People near
get/Game.CharactersNearEverybody alive within so many metres of a place, players and NPCs. - For each
flow/ForEachDoes Body once for every item of a list, then Done. - Position of
get/Game.PositionWhere a person or thing is. - Distance
math/DistanceHow many metres apart two places are. - Less
math/LessWhether A is less than B. - Branch
flow/BranchGoes one way when the condition holds, the other way when it doesn't. - Is nothing
math/IsNothingWhether a value is empty - Not
math/NotNo for yes, yes for no.
Modding