Home   Help Search Login Register  

Author Topic: Embarrasing briefing problem  (Read 2081 times)

0 Members and 1 Guest are viewing this topic.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Embarrasing briefing problem
« on: 21 Jan 2010, 18:39:48 »
I've encountered a problem with my brifings that I wasn't aware of. I've never encountered them before upgrading to 1.05, but I can't guarantee that they weren't in there to begin with. Well here it goes:

Everytime a unit dies and respawn the tasks and notes vanishes. They work perfectly upon mission start. My briefings are set up the following way:

1) briefing.sqf is started from init.sqf, using the execVM command
2) briefing.sqf then adds the diary entries to the entity player, but not until I've checked that
Code: [Select]
waitUntil { !isNull player }; waitUntil { player == player };
I'm beginning to suspect that I'm making some kind of noob mistake here. That probably means that there's a simple solution to my problem, that I've overlooked. Bear in mind that the briefing works perfectly in SP and at MP startup. It only vanishes after group respawn and teamswitch.
 :dunno:
« Last Edit: 21 Jan 2010, 18:54:30 by nominesine »
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: Embarrasing briefing problem
« Reply #1 on: 21 Jan 2010, 18:53:38 »
Sorry to say this is 'indented behaviour' - you'll have to re-execute (and update task conditions) on respawn.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Embarrasing briefing problem
« Reply #2 on: 21 Jan 2010, 18:54:57 »
How do I do that?
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: Embarrasing briefing problem
« Reply #3 on: 21 Jan 2010, 18:59:16 »
First off, re-execute your briefing.sqf file to give the tasks back - then create (and run) a script to check the status of the things that fired the tasks in the first place (e.g. destroyed buildings, etc.) and update the tasks accordingly.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Embarrasing briefing problem
« Reply #4 on: 21 Jan 2010, 19:09:27 »
It's not just the tasks that vanishes. It's everything that was added from briefing.sqs. i.e notes, objectives, images, etc. So I guess I must run the briefing all over again. With that said, how do I check when a player respawns? Is this trigger the answer???

CON: !(alive player)
ACT: execVM "briefing.sqf";

The problem also appears if I use teamswitch and I don't think that trigger would fire then, would it?
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: Embarrasing briefing problem
« Reply #5 on: 21 Jan 2010, 19:18:36 »
Well, a simple method would be to run the following on the player at the start:
Code: [Select]
player addEventHandler ["killed", {execVM "respawn.sqf"}];
Then, in "respawn.sqf":
Code: [Select]
waitUntil{alive player};
// Do your re-adding stuff here

I don't really know how to make it work with teamswitch... I've never used it, and so have no idea what (if any) EHs it fires, etc.  I simply use something like the above to re-add briefings/notes/tasks in my missions with respawn enabled.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: Embarrasing briefing problem
« Reply #6 on: 21 Jan 2010, 19:21:43 »
I would imagine you have the same problem with JIPs?
TS3 IP: tor.zebgames.com:9992

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Embarrasing briefing problem
« Reply #7 on: 21 Jan 2010, 19:41:30 »
Yes indeed, but I figured that if I solve the first problem first, I can solve the second one later  :D

I've managed to solve the JIP problem before. But this one confuses me, since it now appears in missions that I believed was working up until 1.04, but not in 1.05 (I'm about 98% sure they did).
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: Embarrasing briefing problem
« Reply #8 on: 21 Jan 2010, 20:02:54 »
Since this is a MP mission do you really have to worry about Team Switching? Since there is respawn it seems quite silly to have Team Switch and in that case the Kill EH should work fine.

I remember when briefings use to be easy.... Oh, OFP/ArmA, how nice you were...

I think this whole briefing script thing is just BS, they should bring it back to HTML, WTH was wrong with HTML? Obviously BIS needs a refreshment course on the KISS method.
TS3 IP: tor.zebgames.com:9992

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Embarrasing briefing problem
« Reply #9 on: 21 Jan 2010, 20:37:12 »
Since Team Switching can be made available in MP with the respawn "side" option, I wanted it included as well. The reason  that I placed the topic under "general" was that I'm looking for a general solution. Preferably one that works equally well in SP/MP. I agree completely about the Keep it simple statement. I also miss the HTML file.

EDIT: Wit a little help rom Laggy I've found a nearly working solution to the teamswitch problem. There is an onTeamswitch command that makes it possible to run the briefing script all over again a split second after the first briefing is removed. But if I switch then back to the original unit again, every entry in the brifing will show up twice.
« Last Edit: 22 Jan 2010, 02:17:23 by nominesine »
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
Re: Embarrasing briefing problem
« Reply #10 on: 22 Jan 2010, 02:30:45 »
Haven't done any thorough testing, but putting already played units in an array and checking if the new teamswitched unit is in that array seems to work, no doubling of briefing.

init.sqf or similar:
Code: [Select]
BriefedUnits = []; BriefedUnits = BriefedUnits + [player]
trigger or script:
Code: [Select]
onTeamSwitch {if (! (player in BriefedUnits)) then {execVM "briefing.sqf"; BriefedUnits = BriefedUnits + [player]}}
Works well in editor, haven't tried MP/host/dedi yet.

Not sure if the briefing gets doubled if another player has already played the unit, so maybe the BriefedUnits array needs to be PV'd.

Laggy
« Last Edit: 22 Jan 2010, 02:34:21 by laggy »
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.

Offline sharkattack

  • Former Staff
  • ****
Re: Embarrasing briefing problem
« Reply #11 on: 10 Jul 2010, 14:37:45 »
Seems your not the only one to fall victim nominesine

I never had this issue previously as i would disable all AI.
With my latest mission attempt id like to have the team switch option available should it be played in SP mode
and group respawn options when played in multi player.  Can anyone confirm if the below code works on a dedicated server. Seems to be just the job for single player .

best wishes shark-attack 

 
"HOLY SARDINE" - see Shark-Attack meet his match