Home   Help Search Login Register  

Author Topic: Join In Progress - Issues with completed objectives  (Read 1538 times)

0 Members and 1 Guest are viewing this topic.

Offline satexas69

  • Members
  • *
Join In Progress - Issues with completed objectives
« on: 22 Mar 2007, 15:42:11 »
I'm having some issues where join-in-progress members don't see the exact same completions of objections when they join.. for example, in my third objective, you must "destroy" a lighthouse.... when a JIP member shows up, the lighthouse is standing although everyone else sees just the the llighthouse podium where it used to sit...

Is there a foolproof way of resolving this to synchronize objectives?

Here's my standard setup:

I use THIS in my ON ACT: line in triggers:

[server, "objective1"] exec "obj.sqs";

And THIS format in my obj.sys file:

Code: [Select]
_scriptcall = _this select 1
; ============================================================================
?(_scriptcall == "objective1"):goto "objective1"
?(_scriptcall == "objective2"):goto "objective2"
?(_scriptcall == "objective3"):goto "objective3"
; These are my main achievement objectives - required to finish the map
#objective1
"1" objstatus "DONE"
hint "Major Woody Rescued"
obj1=true; publicVariable "obj1"
exit
; ============================================================================
#objective2
"2" objStatus "DONE"
"Major_Woody" setmarkercolor "colorgreen"
hint "Major Woody successfully placed in MCU"
obj2=true; publicVariable "obj2";
exit
; ============================================================================
#objective3
"3" objStatus "DONE"
"LightHouse" setmarkercolor "colorgreen"
hint "Lighthouse Destroyed"
obj3=true; publicVariable "obj3";
exit

I know that the init.sqs isn't loaded on player connect... but is there some way to set live variables in some file that can be read and compared when the player joinns that will synchro?

And I know people say the init.sqs isn't read upload a player joining in progress... but I've seen some people do this:

onplayerconnected "Al exec "update.sqs"".... is this for JIP?

Offline sharkattack

  • Former Staff
  • ****
Re: Join In Progress - Issues with completed objectives
« Reply #1 on: 22 Mar 2007, 18:14:29 »
i think  the upadte sqs  refreshes the variables evey time a player connects
so if objective one is complete  and a new player joins  he has the objective checked
should work also with youre lighthouse.
"HOLY SARDINE" - see Shark-Attack meet his match

Offline satexas69

  • Members
  • *
Re: Join In Progress - Issues with completed objectives
« Reply #2 on: 23 Mar 2007, 03:45:41 »
Shark,

But what would I put in the Update.sqs file to synchronize? Do I put the same obj=0 original stuff that I initialize in my init.sqs? And if so, will it update the variables?

If an OBJ is completed, and the players in the game know - how would the update.sqs script know?  ???

Offline sharkattack

  • Former Staff
  • ****
Re: Join In Progress - Issues with completed objectives
« Reply #3 on: 23 Mar 2007, 13:13:10 »
try with this  in youre init sqs obviously replace the variables with youre own

one= False;
two = False;
three= False;
four = False;
if !(local Server) then {exit}
onPlayerConnected "publicVariable ""one""; publicVariable ""two""; publicVariable ""three""; publicVariable ""four"""
exit

think this does the same without having to use a script to update 
on player connecting variables in there current state (true or false ) are passed to the player
"HOLY SARDINE" - see Shark-Attack meet his match