Frictional Games Forum (read-only)

Full Version: question about collides loops?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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?
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

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...
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.