PDA

View Full Version : Scripting Problem


.:Sam:.
09-24-2006, 01:29 PM
Hey, I want a dialoge to trigger when you enter a module but It don't seem to work is there something im doing wrong?


void main() {
ActionStartConversation(GetFirstPC(),"cordlg");
}

That the script I used, then I saved it and compiled and on OnEnter I put corsen (Thats the scripts name) Saved and tried it out but the script did not activate.

Can anyone help, thanks in advance.

stoffe
09-24-2006, 02:38 PM
(snip)
ActionStartConversation(GetFirstPC(),"cordlg");
(snip)
That the script I used, then I saved it and compiled and on OnEnter I put corsen (Thats the scripts name) Saved and tried it out but the script did not activate.


You'll need a character or placeable to start the conversation, you cannot converse with the Area itself. If you run that script in the Area OnEnter event then it's the area that runs the script (OBJECT_SELF) and the area has no action queue AFAIK.

If there are no other NPCs involved in the dialog other than the main character then you can make them start the conversation with themselves. Otherwise make the NPC you want the player to talk to start the conversation. Like:

void main() {
object oPC = GetFirstPC();

// Make main character start conversation with themself.
AssignCommand(oPC, ActionStartConversation(oPC, "cordlg"));

// Make NPC with specified tag start conversation with main character.
object oNPC = GetObjectByTag("TagOfNPCtoTalkTo");
AssignCommand(oNPC, ActionStartConversation(oPC, "cordlg"));
}

.:Sam:.
09-27-2006, 10:23 AM
Thanks for helping again, theres just two more things, that wasn't in the playing movies via script thread.

Firstly how do I make a movie play and then A dialouge trigger strait afterwards? And Secondly (this isn't scripting but its not worth creating a new thread for it)
I've put the movie in the movie folder but all that plays in the game is the background music of the movie, Those anyone know the problem?
Thanks in advance.

stoffe
09-27-2006, 04:13 PM
Firstly how do I make a movie play and then A dialouge trigger strait afterwards? And Secondly (this isn't scripting but its not worth creating a new thread for it)
I've put the movie in the movie folder but all that plays in the game is the background music of the movie, Those anyone know the problem?
Thanks in advance.

You should be able to start the dialog from the same script that you run the movies from, like:

void main() {
PlayMovie("MyMovie");
AssignCommand(GetObjectByTag("NPCToTalkTo"), ActionStartConversation(GetFirstPC(), "TalkDLG"));
}

...where the text marked in yellow is the name of the movie file (without the .bik extension), the part in pink is the tag of the NPC that you should talk to, and green is the name of the DLG file containing the conversation to start.

That should play the movie and then immediately afterwards start the dialog.

As for only sound playing during a movie; a wild guess would be that you used some form of compression, codec or setting that the game doesn't support.

.:Sam:.
09-28-2006, 11:23 AM
I clicked it in bink and smacker/ RAD video tools and pressed Bink it so it converted into bik and put it in the movies folder.

Darth333
09-28-2006, 11:47 AM
Did you added a new entry to movies.2da ?

.:Sam:.
09-29-2006, 10:47 AM
No...am I supposed to?

goldberry
09-29-2006, 06:19 PM
Yes, or it won't show up on the movies list.