[Platformer] Line of Sight enhancements

Get help using Construct 2

Post » Fri May 24, 2013 4:58 am

Hello All - I'm attempting to finish the logic needed for the following project: https://dl.dropboxusercontent.com/u/88974109/enemy_LoS_example.capx

You can try the game here: http://ephrisian-trial.kissr.com

As you play it, you'll notice that the enemy does the following:

if -> detector IS overlapping player && detector IS NOT overlapping tiles
|
   -> enemy follow player

if -> detector IS overlapping tiles && IS NOT within origin
|
   -> respawn at origin
    

However, This is not the ideal situation. I'd like to enemy to follow the player even though the detector hits a tile, but only for a few seconds.

if -> detector IS overlapping player && detector IS NOT overlapping tiles
|
   -> enemy follow player

if -> detector IS overlapping tiles && IS NOT within origin
|
   -> wait # seconds
   -> return to origin

As you can see, I'd like to have the enemy sprite set pathfinding back to it's origin and then follow it. However I have not been successful with that.

Any help is greatly appreciated.ephrisian2013-05-24 05:02:50
B
4
Posts: 24
Reputation: 325

Post » Fri May 24, 2013 9:13 am

I've made a few changes and implemented this logic into my larger project. However, I can't seem to get the "action" variable to stick to just the unique enemy instance that I'm within range of... it seems to change the "global" variable for all of the enemies.

You can see the larger project here: http://skyrunner.kissr.com

The .capx is here: https://dl.dropboxusercontent.com/u/88974109/Skyrunner.capx
B
4
Posts: 24
Reputation: 325

Post » Thu Sep 12, 2013 12:33 am

your links are dead :(
B
24
S
6
G
2
Posts: 213
Reputation: 2,688


Return to How do I....?

Who is online

Users browsing this forum: Je Fawk, MarkThomas, theosciandra and 23 guests