Author Topic: Which function can I package to detect when a player was ghosted?  (Read 685 times)

1:Which function can I package to detect when a player was ghosted?

2: Which function can I package to detect when a player was "un"-ghosted, aka. removed from the simulation?
>> simObject::onRemove?

I'm trying to make a kinda thing "List of players alive/dead" sorta-thing and I'd like some answers.
« Last Edit: July 04, 2010, 01:58:44 AM by Bauklotz »

Imma test if simObject::onAdd exists and then gonna lock if it does.

EDIT: Didn't work, I had a slight thought about that it was when a object was added with that simObject as parent though.

EDIT EDIT: serverConnection::onAdd doesn't work either.
« Last Edit: July 04, 2010, 02:27:56 AM by Bauklotz »

1. armor::onAdd
2. armor::onDisabled / armor::onRemove

1. armor::onAdd
2. armor::onDisabled / armor::onRemove

Is this client-sided?



Is there a way to do this client-sided?
Not without server-sided coding.

1. Package Gameconnection::setFinishedInitialGhost(%this,%val) and check if %val is 1 if you want to know exactly when they finished ghosting.
To check if they have ghosted at any point, you can use .getFinishedInitialGhost()
This is server sided only.

2. If it's client sided, you could get the shapename from a player object and compare it to the f2 list to see if the name has a player object.
However, that requires looping through a huge group of objects which will cause quite some lag.