Code question for python coders


#1

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:
self.moveXY(2,5)

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.


#2

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


#3

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


#4

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


#5

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