Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Code question for python coders


I was wondering if there is a simple way to have your character listen? Is it possible to do something along the lines of
j = “john”.say(“green”)
if j:

or is there some other way to do that? The level wants me to use flags but my computer lags to much to do that so I plan on just coding it in to automatically do it.


Cool idea bro.

I believe something similar exists if you look at the level kithguard mastery there is something similar there and I do not think the code would look like that


The Master’s Flags will allow you to programmatically add flags using addFlag. Unfortunately, it hasn’t been released yet. Hopefully out soon.


Uh I think that this is different than what he is saying


Feinty is correct! In the level I was curious about I had to build a fire-trap or a wall depending on what type of enemy was coming. The NPC’s would announce what was coming by saying something along the lines of “Place a green flag a yak is coming” I was wondering if it would be possible make my character listen to the npc’s and then do something.
if the npc said green
move to this position
if the npc said black
move to this position