Improving the light conditions (Light Plant, part 2)

As I talked about in my latest post, the Light plant is one of the Enemies/Puzzle mechanics in our game. It’s projectiles provide light, but are also dangerous to the player on touch, so they have to be avoided.
This week, I’ve added two new behaviours to the plant, “angry” and “activation”. These two are the main mechanics that this plant will have to create interesting puzzles.

The angry behaviour

When the player hits the plant with a projectile, the plant will mark the players current position as of being hit, and will then shoot towards that spot with a higher fire rate for a short amount of time.

This was done by having the player variable as public in the script, so that a reference to the player GameObject can be added through the editor. When an object tagged with “projectile” enters the plants hitbox, it will destroy that object and set the plant in “angry” mode. I use the WaitForSeconds coroutine method described in my earlier post to stay in this mode for a set amount of time. When the coroutine ends, it resets the angry flag, making the flower return to it’s normal passive mode.

The activation behaviour

An inactive Light Plant will currently just wait to have an object tagged “LightProjectile” enter it’s trigger-collider, and will then set itself to be active, behaving as any other plant.


Using this mechanic of “aggroing” the plant, together with the “activation” mechanic will be one of the core dynamics in our game where the player uses light in different kinds of puzzles.
An example of such a puzzle is what we are working towards in our current prototype, where the player first needs to navigate past a Light Plants default shot pattern. After they’ve done this, they will proceed into the next area only to notice that it’s too dark to proceed. Using the taunt mechanic to make the plant shoot into that dark area will reveal another plant in that area which will react by activating itself, providing further light.

A dark corridor, not yet lit
After aggroing the plant, there is now a lot more light, but also more danger.

Next steps

After this, there is not too much to do on the actual plant. Moving further we will focus more on interactions with the projectiles, and also with other enemies. There is also some work needed in making sure the level design is correct. We need to have good pacing, while making sure that the player understands a mechanic on a basic level before building more complex puzzles involving several different mechanics.

Author: weakman54

I make games.

One thought on “Improving the light conditions (Light Plant, part 2)”

  1. Hi,
    My name is Jakub and I am from group Shadhavar. I feel that you did a good job with explaining what you have done and how you have done it. Your explanation of the behaviours is easy to understand and effective on explaining how they function. I am sure that even a person with no programming experience at all will understand what you mean and how this works.
    The mechanic of lighting up the area with the enemy’s projectiles is very creative and cool idea of using enemy as not only a danger but also as a tool in a sense. The only thing I can find unclear might be why you chose it that way? Wouldn’t it be more dangerous if the enemy’s projectiles were hard to spot making the game more challenging?
    There is not much at all to point out as bad or not clear in this post because it’s very well written and easy to understand. It is also valuable, it gives ideas about using enemy’s attack in creative ways. Great job!


Leave a Reply to jakubwolfram Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s