Changing pathfinding cell size at runtime

Get help using Construct 2

Post » Wed Jun 12, 2013 11:35 pm

I've searched high and low on the forums for this and couldn't find anything...unless I missed it. How would I change an object's cell size with an event? I see I can get the value such as "Enemy.Pathfinding.CellSize" but I can't seem to figure out how to change it. Any ideas?
B
6
S
1
G
1
Posts: 56
Reputation: 812

Post » Thu Jun 13, 2013 1:13 am

Well ,

It's in the behaviors section , at the left of the screen when clicking on an object with pathfinding behavior
B
38
S
16
G
17
Posts: 2,230
Reputation: 17,220

Post » Thu Jun 13, 2013 6:03 am

@Whiteclaws He asked if it was possible during runtime, read the whole thing.

@sgtwombatstudios As far as I can tell it's not possible. If it's important that you are able to change it, I would suggest having a few invisible sprites that the object follows with different cell sizes that you can switch between.
B
44
S
13
G
7
Posts: 603
Reputation: 7,936

Post » Fri Jun 14, 2013 8:33 pm

Thanks for the reply. I was thinking of doing something along those lines as a workaround. The problem is that the smaller screen, such as a phone, the smaller the cell size needs to be to work correctly. I'm thinking of having a few copies of the enemies, each with a different cell size. And then depending on what range the screen size falls under, the enemy with the best cell size for that screen will be loaded? I haven't tried it yet, but I'm guessing it will work.
B
6
S
1
G
1
Posts: 56
Reputation: 812


Return to How do I....?

Who is online

Users browsing this forum: Alex Bryant, kiko2015, Momio, waguilar and 12 guests