Hello.
As I'm not experienced in scripting, I do most of the things by eventing, and often it causes extreme lag ingame. I know there are ways to do things more efficiently, so I came here for your advice!
So what I want to do and how I managed it to work:
Pretty large field (17 by 29), covered in very tall grass.
The grass reacts to player movements (splits when stepped on).
Insects can attack, if player steps on the wrong tile (there is a safe path, it can be navigated by carefully observing your surroundings - if grass moves near you, don't step there). If player gets caught again and again, attacks get progressively harder.
You can (if you want to) burn the whole field, but that will summon a tough boss.
The fire should start at the center (wherever the player stands at) and go to the sides, until all of the grass is burned.
-----------------------
I've managed to do all of it,
but the last part gave me some trouble. How it works:
First, the switch turns on (triggers everything else below)
Then the ticker goes off as parallel process (it adds every 5 frames and counts from 1 to 29 - that's for the distance checking)
As it ticks, every (!) grass event checks if it's
distance from the player is equal to
ticker - if yes, then grass tile burns off.
The result looks pretty nice - fire goes off in a circle from the player to the sides of the field.
For distance checking I used Distance script by Jet:
So when every event on the map starts to do those script calls, it lags like hell. (duh)
UPDATE: It's resolved. Redone it with no lag. Thanks all for reading)