Visit the Ironworks Gaming Website Email the Webmaster Graphics Library Rules and Regulations Help Support Ironworks Forum with a Donation to Keep us Online - We rely totally on Donations from members Donation goal Meter

Ironworks Gaming Radio

Ironworks Gaming Forum

Go Back   Ironworks Gaming Forum > Ironworks Gaming Forums > Neverwinter Nights 1 & 2 Also SoU & HotU Forum
FAQ Calendar Arcade Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 02-07-2004, 09:20 PM   #1
Lupine_Hesperocyon
Welcomed New User
 

Join Date: February 2, 2004
Location: WA
Age: 35
Posts: 0
I am trying to script cutscene for the begining of my module. The scripting commands I have gotten so far are based on other modules that I have donwloaded from the vault(I am not copying though). The desired effect that I want is to have the PC enter, the Zhentarim mage commander walks up and says I line above his head, then the PC gets a VFX applied to him/her, then falls down with the dying sound. Then I want 3 Netheril Wizards, and their commander Alvorah to appear. I want the camera to face her and the Zhent Boss back and forth while they say lines, then they fight, with the Netheril beating the Zhents, then Alvorah walks up to where the PC is and says a line, then teleports him/her away and the cutscene ends.

Sorry I know that was alot to take in. I am trying to script the scene and I have very little experiance, and I have been getting so many errors when I try to compile [img]graemlins/1pissed.gif[/img] [img]graemlins/1pissed.gif[/img] Could someone who understands scripting better could tell me what I did wrong?

Any help you can offer would be much appreciated!

Here it is, sorry if it is a bit messy:

EDIT: The include statements below are what I had to rename the resources

#include "camera_rec"
#include "nw_i0_generic"
#include "cutscene_rec"
void NetherilTeleport()
{
object oWPAlv1 = GetWaypointByTag("WP_Alv_appear");
object oWPWiz1 = GetWaypointByTag("WP_Wiz1_appear");
object oWPWiz2 = GetWaypointByTag("WP_Wiz2_appear");
object oWPWiz3 = GetWaypointByTag("WP_Wiz3_appear");
effect eTeleport = EffectVisualEffect(VFX_IMP_SONIC);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eTelep ort,oWPAlv1, 2.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eTelep ort,oWPWiz1, 2.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eTelep ort,oWPWiz2, 2.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eTelep ort,oWPWiz3, 2.0);
DelayCommand(2.0,CreateObject(OBJECT_TYPE_CREATURE ,"Alvorah",
GetLocation(oWPAlv1),TRUE,"Alvorah1"));
DelayCommand(2.0,CreateObject(OBJECT_TYPE_CREATURE ,"NethMage",
GetLocation(oZWP3),TRUE,"Wiz1"));
DelayCommand(2.0,CreateObject(OBJECT_TYPE_CREATURE ,"NethMage",
GetLocation(oZWP3),TRUE,"Wiz2"));
DelayCommand(2.0,CreateObject(OBJECT_TYPE_CREATURE ,"NethGirlMage",
GetLocation(oZWP3),TRUE,"Wiz3"));
}
//////
void main()
{
object oPC = GetEnteringObject();
object oMageboss = GetObjectByTag("ZhentCommander1");
object oMage1 = GetObjectByTag("ZhentMage1");
object oMage2 = GetObjectByTag("ZhentMage2");
object oMage3 = GetObjectByTag("ZhentMage3");
object oMage4 = GetObjectByTag("ZhentMage4");
object oWPAlv1 = GetWaypointByTag("WP_Alv_appear");
object oWPWiz1 = GetWaypointByTag("WP_Wiz1_appear");
object oWPWiz2 = GetWaypointByTag("WP_Wiz2_appear");
object oWPWiz3 = GetWaypointByTag("WP_Wiz3_appear");
object oWPAlv2 = GetWaypointByTag("WP_Alv_move");
object oAlvorah = GetObjectByTag("Alvorah1");
object oWiz1 = GetObjectByTag("Wiz1");
object oWiz2 = GetObjectByTag("Wiz2");
object oWiz3 = GetObjectByTag("Wiz3");
object oSold1 = GetObjectByTag("ZhentSold1");
object oSold2 = GetObjectByTag("ZhentSold2");
object oRogue1 = GetObjectByTag("ZhentKill1");
object oRogue2 = GetObjectByTag("ZhentKill2");
effect eEvilSpell = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
object oWPPC = GetWaypointByTag("Start_Point");
const float fR = 5.0;
const float fP = 60.0;
////////////////////////////////////////////////
if(GetIsPC(oPC))
{
string sHimHer;
string sHeShe;
if (GetGender(oPC) == GENDER_FEMALE)
{
sHimHer = "her";
sHeShe = "she";
}
else
{
sHimHer = "him";
sHeShe = "he";
}
DelayCommand(0.1,SetCutsceneMode(oPC,TRUE));
DelayCommand(38.0,GestaltCameraFace(0.0,oMageboss, fR,fP,oPC,fR,fP,2.0,30.0,oPC,
2,1,0));
DelayCommand(30.0,AssignCommand(oMageboss,
SpeakString("Hold you positions my brethren. I will deal with "+sHimHer+"!.")));
DelayCommand(30.0,
AssignCommand(oMageboss,
SpeakString("You think as the last one alive that you will defeat us?")));
DelayCommand(30.AssignCommand(oMageboss, SpeakString("You are not as powerful as you think.")));
DelayCommand(14.0,PlayVoiceChat(VOICE_CHAT_BATTLEC RY2,oMageboss));
DelayCommand(2.0, AssignCommand(oPC,ApplyEffectToObject(DURATION_TYP E_INSTAN,eEvilSpell,OBJECT_SELF,2.0)));
DelayCommand(1.0,PlayVoiceChat(VOICE_CHAT_DEATH, oPC));
DelayCommand(0.5,AssignCommand(oPC,PlayAnimation(A NIMATION_LOOPING_DEAD_BACK,1.0,60.0)));
DelayCommand(38.0,GestaltCameraFace(0.0,oWPAlv1,fR ,fP,oPC,fR,fP,2.0,30.0,oPC,2,1,0));
NetherilTeleport(oAlvorah,oAlvorah,oMageboss);
DelayCommand(30.0,AssignCommand(oAlvorah,SpeakStri ng("You filthy Zhentarim have killed enough for one day.We will not allow you to get the scroll!")));
DelayCommand(30.0,AssignCommand(oMageboss,SpeakStr ing(".")));
DelayCommand(38.0,GestaltCameraFace(0.0,oMageboss, fR,fP,oPC,fR,fP,2.0,30.0,oAlvorah,2,1,0));
DelayCommand(0.1,SetCutsceneMode(oPC,FALSE));
//this is where I gave up and hoped it would compile, but it didn't obviously
}
}

[ 02-07-2004, 09:24 PM: Message edited by: Lupine_Hesperocyon ]
__________________
<img border=\"0\" alt=\"[mage1]\" title=\"\" src=\"graemlins/mage1.gif\" />
Lupine_Hesperocyon is offline   Reply With Quote
Old 02-08-2004, 04:38 AM   #2
philip
Galvatron
 

Join Date: June 24, 2002
Location: aa
Posts: 2,101
Welcome to IW!

You have a lot of spelling mistakes in it and those cause some syntax errors. For example:

DelayCommand(30.AssignCommand

It has to be 30.0,

DURATION_TYPE_INSTAN

An extra T after it wouldn't hurt.

My tip is write it line by line and compile after every line, fix the errors and do that till the line is syntax OK. Then write a few lines and test it out in the game. If it works continue, if not do it in another way.

I recently started a cutscene as well and it's not something most people would do right first time, and it involves a lot of tweaking with the delays. I would test nearly after everything I added and I needed to, some things don't work as you expect them to so there are too many things to take into account to write the whole script at once. And it's much more fun to see how your cutscene is going.

You don't have to rewrite the whole script. If you copy this line by line in a new script and use that instead you can compile it line by line and test after some lines.

Also if you're really new to scripting in general, I'd test a bit more till you get a feeling for how and if stuff will work.

[ 02-08-2004, 04:38 AM: Message edited by: philip ]
philip is offline   Reply With Quote
Old 02-08-2004, 07:08 PM   #3
Lupine_Hesperocyon
Welcomed New User
 

Join Date: February 2, 2004
Location: WA
Age: 35
Posts: 0
Ok hehe thanks for your help. Yeah I probably should proofread for typos a bit more thanks for the help!
__________________
<img border=\"0\" alt=\"[mage1]\" title=\"\" src=\"graemlins/mage1.gif\" />
Lupine_Hesperocyon is offline   Reply With Quote
Old 02-08-2004, 10:21 PM   #4
SpiritWarrior
Jack Burton
 

Join Date: May 31, 2002
Location: Ireland
Posts: 5,854
Delay Command always warrants an extra bracket at the end also, so do pay attention to that. I would do as was suggested but even compiling the whole thing and looking to the feedback on the compile error will tell you exactly what line the problem was at.

[ 02-08-2004, 10:22 PM: Message edited by: SpiritWarrior ]
__________________
Still I feel like a child when I look at the moon, maybe I grew up a little too soon...
SpiritWarrior is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 08:05 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved