hey guys,
I'm using a cronometrer at a maze to calculate the players performance. I need the cronometer to start when the player clicks at the last message of the conversation in which the instructions to the maze task are given. The problem is that the cronometer is starting at the same moment that the conversation starts, and then all the time the player spent reading the instructions is been considered as maze time.
My cronometer trigger is the last ga activated at the conversation, and it is setted at the last message of the conversation. Nevertheless it starts to run at the same time of the conversation. Can anyone help me out?
Bellow goes the cronometer strart script
void main(){object oPC = GetPCSpeaker();
if (!GetIsPC(oPC)) return;
int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
SetLocalInt(oPC, "initial_minute", GetTimeMinute());SetLocalInt(oPC, "initial_second", GetTimeSecond());}
ga trigger in conversation starts before I want it to
Débuté par
el.sombrero
, mars 03 2013 03:15
#1
Posté 03 mars 2013 - 03:15
#2
Posté 03 mars 2013 - 03:38
I'd use http://nwvault.ign.c...I.Detail&id=141 if you're not already, and set it so it counts up. Since a script can't run before it's called, (violating causality would be about as bad as crossing the streams) I suspect the poor way the stock time stuff works is causing you to think it's starting at the start of the conversation when it's not.
#3
Posté 03 mars 2013 - 03:45
void main()
{
object oPC = GetPCSpeaker();
if (GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF)) == TRUE) return;
SetLocalInt(oPC, "initial_minute", GetTimeMinute());
SetLocalInt(oPC, "initial_second", GetTimeSecond());
SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
}
I dont think your problem is the script - upload the conversation somewhere and link it here.
[What kamal_ said instead]
{
object oPC = GetPCSpeaker();
if (GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF)) == TRUE) return;
SetLocalInt(oPC, "initial_minute", GetTimeMinute());
SetLocalInt(oPC, "initial_second", GetTimeSecond());
SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
}
[What kamal_ said instead]
Modifié par Morbane, 03 mars 2013 - 03:58 .
#4
Posté 03 mars 2013 - 03:47
kamal_ wrote...
(violating causality would be about as bad as crossing the streams)
Who Ya Gonna Call?
#5
Posté 04 mars 2013 - 03:08
Hey guys,
My script works fine when I put it on a trigger instead of using it at a GA at the conversation.(I change the object oPC= to a ground trigger).
I'm 100% sure that it is starting at the exact moment the conversation starts because I've used a cronometer to check the time I get for results. The time the cronometer indicated is the exact time of all the conversation + maze time. When I put the script at a trigger right in front of the player (so that the player just walk on it after the conversation is finnished) I get just the maze time.
I could use the trigger solution, but it's very important to my project that the cronometer starts at the last line of the conversation.
About using the countdown timer Kamal suggested... right know it would do more harm than good, another of ther scripts are based on the timer I'm already using, plus I need a "countup" timer.
(by the way, YEAH, there is something strange in my neighborhood :0)
My script works fine when I put it on a trigger instead of using it at a GA at the conversation.(I change the object oPC= to a ground trigger).
I'm 100% sure that it is starting at the exact moment the conversation starts because I've used a cronometer to check the time I get for results. The time the cronometer indicated is the exact time of all the conversation + maze time. When I put the script at a trigger right in front of the player (so that the player just walk on it after the conversation is finnished) I get just the maze time.
I could use the trigger solution, but it's very important to my project that the cronometer starts at the last line of the conversation.
About using the countdown timer Kamal suggested... right know it would do more harm than good, another of ther scripts are based on the timer I'm already using, plus I need a "countup" timer.
(by the way, YEAH, there is something strange in my neighborhood :0)
Modifié par el.sombrero, 04 mars 2013 - 03:09 .
#6
Posté 04 mars 2013 - 09:05
It seems odd that queries for the time from within a conversation would return the time the conversation started rather than the time of the query, but that may be what is going on. I think that is what kamal's point was. Seems like there should be a way to test this though. Put a script that gets the time and prints it out on several conversation nodes. Then walk through the nodes slowly, with delays in between. If the same time is always printed with each node then that is what is going on.
Regards
Regards





Retour en haut






