The following goal cog was initially created by the Goal! PlugIn. It only completes goals 0 and 5. The remaining goals do not check off even though, for example, the activation of the surface in question does trigger another cog. The goals that are intially hidden do not appear. Is it a problem for the activation of a surface to be triggering both a cutscene and the completion of a goal? I don't think it would be.
Any thoughts?
Thanks.
------------------
Dead Reckoning and Dead Reckoning 2
Any thoughts?
Thanks.
Code:
symbols
int player local
message startup
message activated
message damaged
surface surfaceGoal0
surface surfaceGoal1
surface surfaceGoal2
thing thingGoal3
thing thingGoal4
surface surfaceGoal5
sound soundGoal0=accomplish1.wav local
sound soundGoal1=accomplish1.wav local
sound soundGoal2=accomplish1.wav local
sound soundGoal3=accomplish1.wav local
sound soundGoal4=accomplish1.wav local
sound soundGoal5=accomplish1.wav local
int done0=0 local
int done1=0 local
int done2=0 local
int done3=0 local
int done4=0 local
int done5=0 local
end
# ==================================================================
code
startup:
player = GetLocalPlayerThing();
SetInv(player, 99, 1000);
SetGoalFlags(player, 0, 1);
// SetGoalFlags(player, 1, 1); // Not visible at startup
SetGoalFlags(player, 2, 1);
// SetGoalFlags(player, 3, 1); // Not visible at startup
// SetGoalFlags(player, 4, 1); // Not visible at startup
SetGoalFlags(player, 5, 1);
Return;
activated:
// Goal: 0
if((!done0) && (GetSenderRef() == surfaceGoal0))
{
jkPrintUNIString(player, 350);
PlaySoundThing(soundGoal0, player, 1.0, -1, -1, 0);
SetGoalFlags(player, 0, 2);
SetGoalFlags(player, 1, 1);
done0 = 1;
Return;
}
// Goal: 5
if((!done5) && (GetSenderRef() == surfaceGoal5))
{
jkPrintUNIString(player, 350);
PlaySoundThing(soundGoal5, player, 1.0, -1, -1, 0);
SetGoalFlags(player, 5, 2);
done5 = 1;
Return;
}
//Return;
// Goal: 2
if((!done2) && (GetSenderRef() == surfaceGoal2))
{
jkPrintUNIString(player, 350);
PlaySoundThing(soundGoal2, player, 1.0, -1, -1, 0);
SetGoalFlags(player, 2, 2);
SetGoalFlags(player, 3, 1);
done2 = 1;
Return;
}
//Return;
damaged:
// Goal: 1
if((!done1) && (GetSenderRef() == surfaceGoal1))
{
jkPrintUNIString(player, 350);
PlaySoundThing(soundGoal1, player, 1.0, -1, -1, 0);
SetGoalFlags(player, 1, 2);
done1 = 1;
Return;
}
//Return;
killed:
// Goal: 3
if((!done3) && (GetSenderRef() == thingGoal3))
{
jkPrintUNIString(player, 350);
PlaySoundThing(soundGoal3, player, 1.0, -1, -1, 0);
SetGoalFlags(player, 3, 2);
SetGoalFlags(player, 4, 1);
done3 = 1;
Return;
}
//Return;
touched:
// Goal: 4
if((!done4) && (GetSenderRef() == thingGoal4))
{
jkPrintUNIString(player, 350);
PlaySoundThing(soundGoal4, player, 1.0, -1, -1, 0);
SetGoalFlags(player, 4, 2);
done4 = 1;
Return;
}
Return;
end------------------
Dead Reckoning and Dead Reckoning 2