I'm messing around with the toolset maybe something I can show off later! But I've never scripted before, and after reading a few guides and messing with it I've not had much luck.
An example of what I'm trying to accomplish
1. An NPC speaks a dialog, upon completing the dialog the NPC makes a casting animation and "Teleports" aka makes the casting Animation, created a spell effect, then vanishes.
If anyone has an tips or a link to a better guide that'd be awesome!
Scripting With The NWN Toolset
Moderators: Forum Moderators, Active DMs
-
- Posts: 423
- Joined: Sun Jan 01, 2017 4:02 am
Scripting With The NWN Toolset
*Didn't just do that* As an arrow flies hitting someone in the face.
Re: Scripting With The NWN Toolset
Here is a simple script for it (I didn't test it but it should work):
The best resource for standard NWScript is http://www.nwnlexicon.com.
Code: Select all
void main()
{
//The NPC Speaking
object oSpeaker = OBJECT_SELF;
//Casting animation
ActionPlayAnimation(ANIMATION_LOOPING_CONJURE1, 1.0f, 2.0f);
//Get the VXF for the teleport animation
effect eTeleport = EffectVisualEffect(VFX_FNF_IMPLOSION);
DelayCommand(2.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eTeleport, oSpeaker));
// teleport target
//great waypoint with tag teleport_location somewhere in the module
object oTeleport = GetObjectByTag("teleport_location");
//Move the NPC
DelayCommand(4.0f, JumpToObject(oTeleport));
//You'll need to mess around with the timiing
//You could kill him after this if you want
}
Katernin Bersk, Chancellor of Divination; Kerri Amblecrown, Paladin of Milil; Xull'kacha Auvry'rae, Redcap Fey-pacted; Sadia yr Thuravya el Bhirax, Priestess of Umberlee; Lissa Whitehorn, Archmage of Artifice
-
- Posts: 24
- Joined: Mon May 01, 2017 3:41 pm
- Location: Devving
- Contact:
Re: Scripting With The NWN Toolset
A bit late but I can also lend help with any further~ scripting questions, although I don't know how many specific queries I can tend to with my life schedule.
PM me~
PM me~
Nitro wrote:About time to be honest, the forums have been a bit hostile of late.
Nitro wrote:a bit.
-
- Posts: 423
- Joined: Sun Jan 01, 2017 4:02 am
Re: Scripting With The NWN Toolset
Just wanted to say I've been messing with this. It is seriously perfect. Ty XDXerah wrote:Here is a simple script for it (I didn't test it but it should work):
The best resource for standard NWScript is http://www.nwnlexicon.com.Code: Select all
void main() { //The NPC Speaking object oSpeaker = OBJECT_SELF; //Casting animation ActionPlayAnimation(ANIMATION_LOOPING_CONJURE1, 1.0f, 2.0f); //Get the VXF for the teleport animation effect eTeleport = EffectVisualEffect(VFX_FNF_IMPLOSION); DelayCommand(2.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eTeleport, oSpeaker)); // teleport target //great waypoint with tag teleport_location somewhere in the module object oTeleport = GetObjectByTag("teleport_location"); //Move the NPC DelayCommand(4.0f, JumpToObject(oTeleport)); //You'll need to mess around with the timiing //You could kill him after this if you want }
*Didn't just do that* As an arrow flies hitting someone in the face.