OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: Cabellan on 06 May 2007, 13:30:45

Title: Script Kegetys Spectator doesn't work
Post by: Cabellan on 06 May 2007, 13:30:45
Hello,

It's my first topic and I'm sorry for my english. ^^

I tried to put the spectating script by Kegetys in my mission but when a player dies he stays in the first person. He doesn't become a seagull or a "spectator". Is there a command to put in a trigger or else?

Thanks for your help.
Title: Re: Script Kegetys Spectator doesn't work
Post by: Mandoble on 06 May 2007, 13:58:23
AFAIK, what you need is:

this in your init.sqs
Code: [Select]
// Initialize spectating script when player joins as seagull
// Set the following to limit visible sides:
//  KEGsShownSides = [west, east, resistance, civilian];
[] execVM "spect\specta_init.sqf";
Sleep 2;
foo = [player, player, "null"] execVM "spect\specta.sqf";

This on your onPlayerRespawnAsSeagull.sqs
Code: [Select]
; Initialize spectating script when player dies
; Set the following to limit visible sides:
;  KEGsShownSides = [west, east, resistance, civilian];
_this execVM "spect\specta.sqf";

This on your description.ext
Code: [Select]
// Include spectating script resource
#include "spect\spectating.hpp"

And the spect folder.
Title: Re: Script Kegetys Spectator doesn't work
Post by: Cheetah on 06 May 2007, 14:11:39
Are you testing it in the mission editor or in a real multiplayer game?
Title: Re: Script Kegetys Spectator doesn't work
Post by: Cabellan on 06 May 2007, 14:37:41
I tested it in the two.
In the mission editor it's working when I put in a trigger

Code: [Select]
foo = [player, player, "null"] execVM "spect\specta.sqf";

and in multiplayer, the player stays in first person.
 (without
Code: [Select]
foo = [player, player, "null"] execVM "spect\specta.sqf"; in a trigger)

Title: Re: Script Kegetys Spectator doesn't work
Post by: JasonO on 06 May 2007, 15:29:53
I'm not sure if the script works without doing this, but have you tried killing yourself?

I'm not sure if you have tried it. It only works if you join as a seagull or die as far as I can remember.
Title: Re: Script Kegetys Spectator doesn't work
Post by: Cabellan on 06 May 2007, 15:40:34
I tried to kill myself and i stayed in the first person with my character dead.
After, i asked to a mate to kill me but it's same.