mikael
05-07-2008, 07:30 AM
I was wondering how to handle something like water correctly. Where if someone tried to walk across it they should be stopped so it has to have collision data but at the same time an enemy should be able to look across it and see the player.
I had something like this scenario in mind:
The player and an enemy is separated by a small river and there's a bridge a bit further down. The enemy should be able to see the player but recognise that it can't reach him and so try to use checkpoints to navigate across the bridge first.
So HasLineOfSightToPosition should return true for the enemy but CanWalkTo should return false. Currently they would both return false since the water texture would have collision data and I don't know how to make it transparent without using SetIsCreature. And that feels a bit like cheating, plus I think a lot of other AI behaviour would be difficult to implement if it was considered a creature.
Also according to the scripting reference, CanWalkTo and HasLineOfSightToPosition are both the same function internally at the moment.
Is there some way to solve this?
I had something like this scenario in mind:
The player and an enemy is separated by a small river and there's a bridge a bit further down. The enemy should be able to see the player but recognise that it can't reach him and so try to use checkpoints to navigate across the bridge first.
So HasLineOfSightToPosition should return true for the enemy but CanWalkTo should return false. Currently they would both return false since the water texture would have collision data and I don't know how to make it transparent without using SetIsCreature. And that feels a bit like cheating, plus I think a lot of other AI behaviour would be difficult to implement if it was considered a creature.
Also according to the scripting reference, CanWalkTo and HasLineOfSightToPosition are both the same function internally at the moment.
Is there some way to solve this?