Frictional Games Forum (read-only)
question about collides loops? - Printable Version

+- Frictional Games Forum (read-only) (
+-- Forum: Amnesia: The Dark Descent (
+--- Forum: Custom Stories, TCs & Mods - Development (
+---- Forum: Development Support (
+---- Thread: question about collides loops? (/thread-41054.html)

question about collides loops? - sabrinagsoledad - 03-01-2016


Is it possible to make a collide function works every time the player enters to that script area?... e.g. the chekpoint where you enter it teleport to a position, but what I want to know how should I change the code to make it every time the player enteres the area he is teleport and not only the first time?

RE: question about collides loops? - Spelos - 03-01-2016

Quote:AddEntityCollideCallback("Player", "Area", "CollisionFunc", false, 1);

The false means the callback will NOT be deleted when Player touches the area.

PHP Code:
void OnStart()

void CollisionFunc(string &in asParentstring &in asChildint alState

RE: question about collides loops? - sabrinagsoledad - 03-02-2016


RE: question about collides loops? - sabrinagsoledad - 03-02-2016

One thing... I read a guide in the wiki about Checkpoints using ScriptArea's, and the code i made from that guide is the next...

AddEntityCollideCallback("Player", "AreaOfDeep", "Drowned", false, 1);

void Drowned(string &in asParent, string &in asChild, int alState)
PlaySoundAtEntity("", "impact_water_high3.snt", "Player", 0, false);
CheckPoint("Checkpoint1", "PlayerStartArea_1","", "DeathCategory", "Deathtext");

Yet now nothing hapens... I read on that guide that for the chekpoint is not necesary kill the player if I dont want the the sound and screen effects when the player dies.

On the lang file I have this

<CATEGORY Name="DeathCategory">
<Entry Name="Deathtext"> Avoid water </Entry>

But now in the game nothing hapens neither once get teleport...

RE: question about collides loops? - Spelos - 03-02-2016

I am going to make a video on this topic soon.

But the thing with CheckPoints is that you set it as soon as possible and by this command, you're actually saying:
IF player dies FROM THIS POINT, they will see THIS DEATH SCREEN, and APPEAR ON THIS POSITION, as well as (and this is optional) CALL THIS FUNCTION WHEN THEY APPEAR.

It has nothing to do with killing the player.
I already told you (I think) that if you want to kill the player, use
PHP Code:
AFTER the CheckPoint command.