Enemy Lights Brain

Type: Enemy and Ally Additional
Level: 3 star
Pages: 1
Description: When added to a character brain it adds some, not particularly bright, spotlights to the character. Add using call page or add brain. Not really sure what the purpose of this is.

Note: The kode references something called Enemy Light which is not a prop that exists in the gallery and you cannot swap it out for another prop (such as a lightbulb) as the kode throws up an error. It is a bit of a mystery how this works.


  1. WHEN [once]
  2. …WHEN DO [boolvar:is being lit][equals][true]
  3. …WHEN DO[vectorvar: height offset][equals][up][multplied by][height][divided by][2]
  4. …WHEN DO[objvar:front light][equals][attach][Enemy light][offset][vectorvar:height offset][plus][forward][to socket][position]
  5. …WHEN DO[objvar:back light][equals][attach][Enemy light][offset][vectorvar:height offset][plus][backward][to socket][position]
  6. …WHEN DO [objvar:front light][power on]
  7. …WHEN DO [objvar:back light][power on]
  8. WHEN [is dead]
  9. …WHEN DO [destroy][objvar:back light]
  10. …WHEN DO [destroy][objvar:frontlight]


Assuming this is designed to light up your enemy in a dark environment you can easily do this by putting a lightbulb in the world and use IWP .

Use this kode in the character brain

WHEN DO [IWP: lightbulb][position][equals][above] // you can change the offset to anything you like, such as [position] to have a light at their feet or [front side][position] to have a light in front of them. Experiment to get the affect you like.


Comments are closed.

Website Powered by WordPress.com.

Up ↑

%d bloggers like this: