Small refactoring to move responses to existing conditional.
This commit is contained in:
+14
-8
@@ -1,3 +1,8 @@
|
|||||||
|
; I encountered an issue. Functions like (get-pilot ship) never seem to return anything.
|
||||||
|
; This is why I used the droid itself as the focus of the calls. This should work fine, assuming the droid is on the ship. Which is the point of this script.
|
||||||
|
; I assume this is user-error. And the script may be updated if I discover the issue.
|
||||||
|
|
||||||
|
; Change the first argument of get-entity to your ship's ID.
|
||||||
(defvar ship (get-entity 7315656 2))
|
(defvar ship (get-entity 7315656 2))
|
||||||
|
|
||||||
(defun start
|
(defun start
|
||||||
@@ -5,21 +10,21 @@
|
|||||||
[
|
[
|
||||||
(is-owner? character)
|
(is-owner? character)
|
||||||
(say (concat "Welcome back, Master." ))
|
(say (concat "Welcome back, Master." ))
|
||||||
|
(add-response "Tell me about where we are." location )
|
||||||
]
|
]
|
||||||
[
|
[
|
||||||
(is-ally? character)
|
(is-ally? character)
|
||||||
(say (concat "Hello, " (get-race character) "! Welcome to " ship "!"))
|
(say (concat "Hello, " (get-race character) "! Welcome to " ship "!"))
|
||||||
(add-response "Who is in charge?" pilot)
|
(add-response "Who is in charge?" pilot)
|
||||||
|
(add-response "I need assistance from your master." contact-owner)
|
||||||
|
(add-response "Where are we?" location)
|
||||||
|
(add-response "Where are we going?" destination)
|
||||||
]
|
]
|
||||||
)
|
[
|
||||||
(if (is-ally? character)
|
(is-enemy? character)
|
||||||
(add-response "I need assistance from your master." contact-owner)
|
(describe "The droid doesn't react as you approach. It stands staring into the void.")
|
||||||
(add-response "Where are we?" location)
|
|
||||||
(add-response "Where are we going?" destination)
|
|
||||||
)
|
|
||||||
(if (is-enemy? character)
|
|
||||||
(describe "The droid doesn't react as you approach. It stands staring into the void.")
|
|
||||||
(add-response "Hello?" enemy-info)
|
(add-response "Hello?" enemy-info)
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
)
|
)
|
||||||
@@ -32,6 +37,7 @@
|
|||||||
]
|
]
|
||||||
[#t
|
[#t
|
||||||
(say (concat "I am owned by " (get-owner self) "."))
|
(say (concat "I am owned by " (get-owner self) "."))
|
||||||
|
(add-response (concat "I need to speak with " (get-owner self) ".") contact-owner)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user