Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

[K1] Fade in problem

Page: 1 of 1
 sekan
04-04-2008, 10:56 AM
#1
Hi,

I have made a dialog and attached a script that in the end will destroy 3 npcs and put a fade out during that process. Before the script worked fine in some ways. Than i changed something to get rid of a bug. It seems that i have get rid of that but know i get a bigger bug. It's fade out but it never fade in. The screen remains black.

This is the script


void main() {

object oNPC1=GetObjectByTag("lrwooli");
object oNPC2=GetObjectByTag("wookie_sekan02");
object oNPC3=GetObjectByTag("wookie_sekan01");
ActionDoCommand(SetCommandable(TRUE,oNPC1));
ActionDoCommand(SetCommandable(TRUE,oNPC2));
ActionDoCommand(SetCommandable(TRUE,oNPC3));
ActionPauseConversation();
NoClicksFor(5.0);
SetGlobalFadeOut(1.5, 0.5);
AssignCommand (oNPC1,ActionDoCommand(DestroyObject(oNPC1)));
AssignCommand (oNPC2,ActionDoCommand(DestroyObject(oNPC2)));
AssignCommand (oNPC3,ActionDoCommand(DestroyObject(oNPC3)));
DelayCommand(1.0,SetGlobalFadeIn(2.5,0.5));
ActionResumeConversation();
}


Anybody that can find a error?
 glovemaster
04-04-2008, 12:04 PM
#2
void main() {
object oNPC1=GetObjectByTag("lrwooli");
object oNPC2=GetObjectByTag("wookie_sekan02");
object oNPC3=GetObjectByTag("wookie_sekan01");

ActionDoCommand(SetCommandable(TRUE,oNPC1));
ActionDoCommand(SetCommandable(TRUE,oNPC2));
ActionDoCommand(SetCommandable(TRUE,oNPC3));
ActionPauseConversation();

NoClicksFor(5.0);

SetGlobalFadeOut(1.5, 0.5);
AssignCommand (oNPC1,ActionDoCommand(DestroyObject(oNPC1)));
AssignCommand (oNPC2,ActionDoCommand(DestroyObject(oNPC2)));
AssignCommand (oNPC3,ActionDoCommand(DestroyObject(oNPC3)));
SetGlobalFadeIn(2.5,0.5);
ActionResumeConversation();
}

Since this parameter is the delay for the fade in I assume that you intentionally set this to 2.5 and so you could just add another second on.

The script looks fine so I think its just because your using the DelayCommand function with it and it has a delay parameter already.

Hope that works ;)
 sekan
04-04-2008, 12:19 PM
#3
void main() {
object oNPC1=GetObjectByTag("lrwooli");
object oNPC2=GetObjectByTag("wookie_sekan02");
object oNPC3=GetObjectByTag("wookie_sekan01");

ActionDoCommand(SetCommandable(TRUE,oNPC1));
ActionDoCommand(SetCommandable(TRUE,oNPC2));
ActionDoCommand(SetCommandable(TRUE,oNPC3));
ActionPauseConversation();

NoClicksFor(5.0);

SetGlobalFadeOut(1.5, 0.5);
AssignCommand (oNPC1,ActionDoCommand(DestroyObject(oNPC1)));
AssignCommand (oNPC2,ActionDoCommand(DestroyObject(oNPC2)));
AssignCommand (oNPC3,ActionDoCommand(DestroyObject(oNPC3)));
SetGlobalFadeIn(2.5,0.5);
ActionResumeConversation();
}

Since this parameter is the delay for the fade in I assume that you intentionally set this to 2.5 and so you could just add another second on.

The script looks fine so I think its just because your using the DelayCommand function with it and it has a delay parameter already.

Hope that works ;)

Thanks it works now :D
 stoffe
04-04-2008, 12:23 PM
#4
I have made a dialog and attached a script that in the end will destroy 3 npcs and put a fade out during that process. Before the script worked fine in some ways. Than i changed something to get rid of a bug. It seems that i have get rid of that but know i get a bigger bug. It's fade out but it never fade in. The screen remains black.


Try this variant and see how it works. You seem to be doing a lot of assigning for no apparent gain, and your ResumeConversation will be queued immediately, not after 5 seconds. Presumably you want to resume after the fade in/out has completed?

void main() {
ActionPauseConversation();

object oNPC1 = GetObjectByTag("lrwooli");
object oNPC2 = GetObjectByTag("wookie_sekan02");
object oNPC3 = GetObjectByTag("wookie_sekan01");

NoClicksFor(5.0);
SetGlobalFadeOut(1.5, 0.5);
SetGlobalFadeIn(3.5, 0.5);

SetCommandable(TRUE, oNPC1);
SetCommandable(TRUE, oNPC2);
SetCommandable(TRUE, oNPC3);

DelayCommand(2.5, DestroyObject(oNPC1));
DelayCommand(2.5, DestroyObject(oNPC2));
DelayCommand(2.5, DestroyObject(oNPC3));

DelayCommand(5.0, ActionResumeConversation());
}


Generally using the action queue is unreliable if you want to do things in a timed sequence, in my experience. It's handy though when you want to do a series of things one after the other and don't care about the timing. :)
 glovemaster
04-04-2008, 12:28 PM
#5
*Ahem* Beat you there Stoffe :xp:
Page: 1 of 1