gc / citizens

BSD 2-Clause "Simplified" License
7 stars 2 forks source link

Scripted Citizens not handled #13

Open gc opened 1 year ago

gc commented 1 year ago

Scripted citizens are not handled properly in loadScriptedCitizen (and in the panel probably).

We can JSONify their actions something like this (We can discuss the format):

"script":[
   {
      "type":"MoveTo",
      "data":{
         "location":{
            "x",
            "y",
            "z"
         }
      },
      {
         "type":"Wait",
         "data":{
            "seconds":1.5
         }
      },
      {
         "type":"Say",
         "data":{
            "message":"Hi!"
         }
      }
   ]

i dont particularly think we should try to make an ingame editor for the scripts, atleast not now. it would be more complex than the others by far i think. so we can manually create them in json, which isnt too bad.