Jump to content

Home

Playing a Movie


harIII

Recommended Posts

I'm using this line of code from the Movie Tutorial here on LF:

 

PlayMovie("PerMov01");

 

And for some reason it just keeps repeating itself; if you click, hit escape, or let it play all the way through, the movie will just simply play itself over again and again.

Link to comment
Share on other sites

Then you probably want something like this

void main() {
       if (GetLoadFromSaveGame()) {
	return;
}
object oEntering = GetEnteringObject();
if ((!GetIsPC(oEntering))) {
	return;
}
if ((!GetLocalBoolean(OBJECT_SELF, 40))) {
          SetLocalBoolean(OBJECT_SELF, 40, 1);
                      PlayMovie("PerMov01"); 
}
}

 

this way it will only fire once on enter.

Link to comment
Share on other sites

By an onEnter field in the .are file of the module.

 

The OnEnter event on areas trigger whenever any creature is spawned into the area, not just the player. This includes the player character, party members, NPCs and monsters.

 

Also note that the player party is "entering" the area both when you transition to the area, and whenever you load a savegame in that area.

Link to comment
Share on other sites

void main() {
       if (GetLoadFromSaveGame()) {
	return;
}
object oEntering = GetEnteringObject();
if ((!GetIsPC(oEntering))) {
	return;
}
if ((!GetLocalBoolean(OBJECT_SELF, 40))) {
          SetLocalBoolean(OBJECT_SELF, 40, 1);
                      PlayMovie("PerMov01"); 
}
}

 

Then this script should work for your purpose. It should only run once and only when PC entering.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...