At last. I have done it.
This script is mine. I made it. It is far from finished but to tell you the
truth - I'm really proud of it.
I actually managed to make something of my own. And all thanks to Celowin.
Without his great tutorials I would never have attempted functions.
1. The script is called "Tale Telling" because that is what it does.
However - this is different.
In my new module (the one I'm still working on and had to restart because of
the thing crashing on the conversation) I have the PC doing stuff in an Inn
and ending up agreeing to tell the story about how he lost his fingers.
When he sits in a specific chair he starts telling the story and at the end
he gets transited to a village where the PC then starts acting out the Tale.
There will of course be a condition on the chair so that the Tale Telling
only starts when all information has been had from the NPC's. But that's for
later.
The Tale Intro gets shown above the PC's head as this fancy floating text
that fades away.
The function that controls the lot has four parameters that control what
text to show, the creature that speaks, the pause for next line and wether
or not the text is shown for other members of the same faction.
void Floattxt(object oCreature, string sTextToFloat, float fSeconds, int
bShowFaction=TRUE)
Here's the script - it needs more work but I just couldn't wait to make my
little contribution to the forum's.
NWScript:
#include "NW_I0_GENERIC"
void Floattxt(object oCreature, string sTextToFloat, float fSeconds, int bShowFaction=TRUE)
{
ActionDoCommand(FloatingTextStringOnCreature(sTextToFloat,oCreature,bShowFaction));
ActionWait(fSeconds);
}
void main()
{
int nChair = 1;
object oPlayer = GetLastUsedBy ();
object oChairPC;
oChairPC = GetNearestObjectByTag ("CHAIR_TALE", oPlayer, 0);
AssignCommand (oPlayer, ActionSit (oChairPC));
ActionDoCommand(Floattxt(oPlayer,"I will tell you the tale of my lost fingers.",3.0,TRUE));
ActionDoCommand(Floattxt(oPlayer,"My tale takes us back eight years",1.0,TRUE));
ActionDoCommand(Floattxt(oPlayer,"to the time around midsommer of 1874",1.0,TRUE));
ActionDoCommand(Floattxt(oPlayer,"- by the Zedacian calendar -",1.0,TRUE));
ActionDoCommand(Floattxt(oPlayer,"when I was travelling to King's Reinham",1.0,TRUE));
ActionDoCommand(Floattxt(oPlayer,"in the duchy of Stivenor,",1.0,TRUE));
ActionDoCommand(Floattxt(oPlayer,"some leagues sousth-west of here.",3.0,TRUE));
ActionDoCommand(Floattxt(oPlayer,"I had a break in the village of Long Combe.",2.0,TRUE));
ActionDoCommand(Floattxt(oPlayer,"I arrived in time for the Midsommer festival",1.0,TRUE));
ActionDoCommand(Floattxt(oPlayer,"and I heard of the Legend",1.0,TRUE));
ActionDoCommand(Floattxt(oPlayer,"that was the cause of the festival.",0.0,TRUE));
DelayCommand(17.0f,(AssignCommand(oPlayer,ClearAllActions())));
DelayCommand(17.0f,(AssignCommand(oPlayer,ActionMoveToObject(GetNearestObjectByTag("WP_TALE_TELLING")))));
DelayCommand(18.0f,(AssignCommand(oPlayer, JumpToLocation(GetLocation(GetWaypointByTag("WP_TALE_START"))))));
}
I have a feeling that this is the tecnique I will be using when I get some
of my NPC's to chat amongst themselves when triggered by the PC's presence.
Ohh - I can't wait....
I'm hooked. Thanks Celowin!
Ayath The Loafer
_________________
sic gorgiamus allos subjectatos nunc
We gladly feast on those who would subdue us
|