Skip to content

Commit

Permalink
Add process-by-aid function similar to process-by-ename (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
blahpy authored Mar 14, 2024
1 parent 709d6d0 commit f55a373
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions goal_src/jak1/engine/mods/mod-common-functions.gc
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,15 @@ if the result of rand-vu-int-range is 1, then DANCE! if it is not 1, then Don't
(none)
)

(defun process-by-aid ((arg0 uint))
"Get the process for the entity with the given aid. If there is no entity or process, #f."
(let ((v1-0 (entity-by-aid arg0)))
(if v1-0
(-> v1-0 extra process)
)
)
)

(defun spawn-actor-by-name ((name string))
;; Takes in the string of name of a actor, and spawns a new process based on the entity.
(let* ((entity-actor (the entity-actor (entity-by-name name)))
Expand Down

0 comments on commit f55a373

Please sign in to comment.