Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN SCRIPTS

- Jump to comments -
Title  Tag-based Template, Activate Only
Author  The Krit
Submitted / Updated  06-12-2010 / 11-13-2010
Category  Tutorials
Expansions  HOTU-1.59
View Code  

Select All Text | View Code in separate window
Format  Code Only
Type  Type - Unique Items
Includes  BioWare Standard
Description
This is a template script to help people create their scripts for tag based items when only item activation needs custom behavior (a fairly common case). The template includes all the necessary interface instructions (like finding the item in question and setting the executed script return value), allowing the scripter to focus on what needs to be done. This is a simplified version of my Tag-based Template, with the events other than activation removed and the remaining code merged into the main() function. This should make the template less intimidating for beginning scripters who are only interested in handling the OnActivate event anyway.

The basic way to use this is to copy it to your script (named for the item's tag), then add your code where indicated (near the bottom of the script, but before the closing curly brace). Variables representing the item activated, the character activating the item, the object targeted, and the location targeted are defined at that point so you do not have to worry about how to find them.

The primary intended audience for this are those who are have taken a step beyond the script generator, or at least are willing to take that step. (A "step" would include just being able to copy the insides of a generated script into another script and deal with resolving variable names as needed.) An understanding of what variables are and how they are used would be useful, but the ability to write a script from scratch is not strictly necessary.

It occurred to me that my full-blown template might be intimidating to some and that the vast majority of tag-based items probably only handle activation, so I thought I would post this in case someone might find it helpful.

Nov 13, 2010 -- renamed the "oTarget" and "lTarget" variables for better compatibility with scripts originating with the Script Generator

Files

NameTypeSizeDownloads
NO FILES
SCORE OUT OF 10
10
2 votes
View Stats
Cast Your Vote!

PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS





You Must Be Logged In to Participate.
Comments (2):

Posted by _Genisys at 2010-09-08 09:40:01    Voted 10.00 on 09/08/10
Very good rendition of a template for this event, thanks.
_________________________
Here is a link to: My Other Submissions

All Updated & Final Edt. Content By Genisys/Guile (External Download)

"I do it for the thanks I get, really." :D

Posted by Gonzo_og at 2010-06-12 23:13:57    Voted 10.00 on 06/12/10
Helpful!
_________________________
stuff

You must be Logged In to post comments in this section.

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 Tools


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters