Hi everyone,
Attempting to come up with a solution that involves the least amount of conditional statement nesting as possible.
Here's the scenario:
Player must stay out of Event X's "circumference of light". The circumference in question is simply determined by an arrangement of tiles around the event, and if the player steps on one of those tiles, they get the penalty.
The event is also moving, so the player stay out of the spotlight effect and make their way around the event while trying to reach their goal.
Where I'm stuck is, is how to effectively manage the space around the moving event. The area that the light covers is four tiles wide and four tiles long, but with each of the corners cut out, like this:
XXX
XXXXX
XXXXX
XXXXX
XXX
Of course that area will always be moving with the event, so I'll need to constantly track that area, and also be able to inquire if the player has stepped into that space.
One CRUDE solution, which I'm probably going to go with if nothing else is suggested, is to actually invisible events all around the main event in the spaces I mentioned, and have them touch-activated. I can then penalize the player anytime they step on one.
I think the problem here is, if it's "player touch" and not "event touch", the events won't trigger if the player is still and the event comes onto their tile.
So, anyone got any thoughts on this?
Thanks!
EDIT: So I've had an experiment with the "Player Touch" and "Event Touch" triggers with some peculiar results.
"Event Touch" will work in both cases of the event or the player making the contact, however there seems to be some odd caveats to this. If the event is set below the player with through ON, the event will not trigger if it touches the player, however the opposite will work.
If the event is set to the Same as Player with through ON again, then neither case seems to work. It doesn't work if I run into the event, and it doesn't work if I'm still and the event runs into me.
Suffice to say, if Event Touch doesn't work with "Through" on, then when the edges of the flame light travel into out of bounds areas on the map, the events will get stuck and end up in all the wrong places. So another solution may be necessary.
Attempting to come up with a solution that involves the least amount of conditional statement nesting as possible.
Here's the scenario:
Player must stay out of Event X's "circumference of light". The circumference in question is simply determined by an arrangement of tiles around the event, and if the player steps on one of those tiles, they get the penalty.
The event is also moving, so the player stay out of the spotlight effect and make their way around the event while trying to reach their goal.
Where I'm stuck is, is how to effectively manage the space around the moving event. The area that the light covers is four tiles wide and four tiles long, but with each of the corners cut out, like this:
XXX
XXXXX
XXXXX
XXXXX
XXX
Of course that area will always be moving with the event, so I'll need to constantly track that area, and also be able to inquire if the player has stepped into that space.
One CRUDE solution, which I'm probably going to go with if nothing else is suggested, is to actually invisible events all around the main event in the spaces I mentioned, and have them touch-activated. I can then penalize the player anytime they step on one.
I think the problem here is, if it's "player touch" and not "event touch", the events won't trigger if the player is still and the event comes onto their tile.
So, anyone got any thoughts on this?
Thanks!
EDIT: So I've had an experiment with the "Player Touch" and "Event Touch" triggers with some peculiar results.
"Event Touch" will work in both cases of the event or the player making the contact, however there seems to be some odd caveats to this. If the event is set below the player with through ON, the event will not trigger if it touches the player, however the opposite will work.
If the event is set to the Same as Player with through ON again, then neither case seems to work. It doesn't work if I run into the event, and it doesn't work if I'm still and the event runs into me.
Suffice to say, if Event Touch doesn't work with "Through" on, then when the edges of the flame light travel into out of bounds areas on the map, the events will get stuck and end up in all the wrong places. So another solution may be necessary.