Jump to content

Lua choice property: first value not recognisef


Recommended Posts

The first option in a choice property does not work. It does work when you set the property to another value in the dropdown list and then setting it back to the first .

 

Attach the following script to an entity:

Script.myChoice = "" --choice Test "FirstChoice, SecondChoice"
function Script:Start()
if self.myChoice == 0 then
 System:Print("-----------------first choice----------")
elseif self.myChoice == 1 then
 System:Print("-------------second choice----------")
end
end

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...