[SOLVED]Custom effects when a player leave the game
- fr blood
- Frequent Poster Miles card holder
- Posts: 995
- Joined: Wed Mar 06, 2013 4:04 pm
- Location: France
[SOLVED]Custom effects when a player leave the game
Hellow everyone, I would like to know what is the name of the actor that spawn red particles when a player disconnect or join spectator because I would like to replace him in my project, thanks for the help.
Last edited by fr blood on Sat Jun 27, 2015 7:37 am, edited 1 time in total.
RE: Looking for an actor's name
Might be hard coded, I've never seen an actor name for it.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

- fr blood
- Frequent Poster Miles card holder
- Posts: 995
- Joined: Wed Mar 06, 2013 4:04 pm
- Location: France
RE: Looking for an actor's name
I see, maybe that there is way with the scripts, actually I tried that:
It's suppose to spawn the custom teleport fog at the place where the play disconnect, but it doesn't work, the teleport fog spawn at the player's start spot.
Anyone go an idea to fix that ?
Code: Select all
Script XXX (int none) DISCONNECT
{
int x = GetActorX(0);
int y = GetActorY(0);
int z = GetActorZ(0);
Spawn("LeavingTeleportFog",x,y,z,0,0);
}
Anyone go an idea to fix that ?
Last edited by fr blood on Fri Jun 26, 2015 12:51 pm, edited 1 time in total.
RE: Looking for an actor's name
Once a player disconnects, their xyz resets, I'm assuming. You'd have to run an Enter script on every player that updates 64-sized global arrays with each player's last XYZ every 6 tics or so. Then on disconnect, just pull that players's X Y and Z from those arrays and reset their values.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

-
Watermelon
- Zandrone
- Posts: 1244
- Joined: Thu Jun 28, 2012 9:07 pm
- Location: Rwanda
RE: Looking for an actor's name
To confirm: Yes it's natively done, this is the function that is run:
https://bitbucket.org/Torr_Samaho/zandr ... ult#cl-962
https://bitbucket.org/Torr_Samaho/zandr ... ult#cl-962
- fr blood
- Frequent Poster Miles card holder
- Posts: 995
- Joined: Wed Mar 06, 2013 4:04 pm
- Location: France
RE: Looking for an actor's name
Ok thanks for the help, Aenima's option is the best I have.
EDIT:
Well I wanted to have the effect to spawn when player disconnect and join spect, so I tried that script but it doesn't work at all.
So I tried another script, more simple, but this one make the effect only if the player leave the game, and not when he joins spectators.
Any idea to make this works also when the player joins spectators ?
EDIT:
Well I wanted to have the effect to spawn when player disconnect and join spect, so I tried that script but it doesn't work at all.
Code: Select all
bool InGame[64];
Script XXX ENTER
{
while(InGame[PlayerNumber()] == TRUE)
{
int x = GetActorX(0);
int y = GetActorY(0);
int z = GetActorZ(0);
delay(2);
}
Spawn("LeavingTeleportFog",x,y,z,0,0);
}
Script XXX (int id) DISCONNECT
{
InGame[PlayerNumber()] = FALSE;
}
Code: Select all
Script XXX ENTER
{
while(PlayerInGame(PlayerNumber()))
{
int x = GetActorX(0);
int y = GetActorY(0);
int z = GetActorZ(0);
delay(2);
}
Spawn("LeavingTeleportFog",x,y,z,0,0);
}
Last edited by fr blood on Fri Jun 26, 2015 3:44 pm, edited 1 time in total.
RE: Custom effects when a player leave the game
I believe that the function PlayerInGame() only applies for whether the player is in a multiplayer game or not, but doesn't account for spectators. You should go back to your original code and have it so that in the DISCONNECT script, the LeavingTeleportFog is spawned at whatever coordinates stored in an array correspond to the player's TID. Otherwise, the ENTER script is terminated when the player leaves.
- fr blood
- Frequent Poster Miles card holder
- Posts: 995
- Joined: Wed Mar 06, 2013 4:04 pm
- Location: France
RE: Custom effects when a player leave the game
I managed to make it works with the 1st script, but it makes the same problem, it works when a player leave the game, but not when he spects, I noticed that all in the disconnect script works but the change of the bool.
I guess that the problem is from Zandronum, because when I add something else in the disconnect script it works well when I spect, but the changing of the bool value doesn't.
Code: Select all
bool InGame[64];
Script XX ENTER
{
InGame[PlayerNumber()] = TRUE;
while(InGame[PlayerNumber()] == TRUE)
{
int x = GetActorX(0);
int y = GetActorY(0);
int z = GetActorZ(0);
delay(2);
}
Spawn("LeavingTeleportFog",x,y,z,0,0);
}
Script XXX (int id) DISCONNECT
{
InGame[PlayerNumber()] = FALSE;
}
RE: Custom effects when a player leave the game
http://wiki.zandronum.com/PlayerIsSpectator
Pretty sure there is more info here http://wiki.zandronum.com/ACS_Functions . And useful commands :P.
Pretty sure there is more info here http://wiki.zandronum.com/ACS_Functions . And useful commands :P.
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]
- fr blood
- Frequent Poster Miles card holder
- Posts: 995
- Joined: Wed Mar 06, 2013 4:04 pm
- Location: France
RE: Custom effects when a player leave the game
Thanks, I totally forgot these commands from Zandronum, it works nice when I use Zandronum's compiler.Cruduxy wrote: http://wiki.zandronum.com/PlayerIsSpectator
Pretty sure there is more info here http://wiki.zandronum.com/ACS_Functions . And useful commands :P.
Code: Select all
Script XXX ENTER
{
while(PlayerInGame(PlayerNumber()) && PlayerIsSpectator(PlayerNumber()) == 0)
{
int x = GetActorX(0);
int y = GetActorY(0);
int z = GetActorZ(0);
delay(2);
}
Spawn("LeavingTeleportFog",x,y,z,0,0);
}