Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Is it possible to make

Page: 1 of 1
 sketch42
02-05-2005, 4:23 PM
#1
a new item ... say robes or a saber that gives you X amount of dark side points every 5 mins or whatever??? making it that using/equpping this item actually pulls you towards the dark side???
 Pontifice
02-06-2005, 3:19 AM
#2
I am not sure but kotor2 has this function:

void ApplyEffectToObject(int nDurationType, effect eEffect, object oTarget, float fDuration=0.0f);

The possible values for nDurationType are in nwnscript.nss.
But i don't know if you can pass a function in eEffect
 tk102
02-06-2005, 5:39 AM
#3
I think you'd have to use a creature event (http://www.lucasforums.com/showthread.php?s=&threadid=143452) to check whether the item was equipped. Probably the OnHeartbeat event would be the one to choose, though I've never done this with a the main PC.
 sketch42
02-06-2005, 8:45 AM
#4
Originally posted by tk102
I think you'd have to use a creature event (http://www.lucasforums.com/showthread.php?s=&threadid=143452) to check whether the item was equipped. Probably the OnHeartbeat event would be the one to choose, though I've never done this with a the main PC.

kewl... i was thinking about adding this to my hilt.. and taking off the alignment limitation and making the hilt bring even a lightsider dark.. ill look over the thread as soon as i get home from work... btw you have done it with NPC's??? if so how would the Main PC be different
 tk102
02-06-2005, 11:24 AM
#5
The biggest difference is that NPC's start with a .utc file. ;)

A cookie is hereby offered to someone who knows what template is used for the Main Character creature.
 ChAiNz.2da
02-06-2005, 11:47 AM
#6
Originally posted by tk102
The biggest difference is that NPC's start with a .utc file. ;)

A cookie is hereby offered to someone who knows what template is used for the Main Character creature.

Well..duh! It's c_gizka.utc ... oh wait, ...shoot no cookie for me... hehe ;)
 sketch42
02-06-2005, 4:09 PM
#7
ok ive never written a script before ... i read the thread you posted on creature events and it said that "Event: OnHeartbeat, triggered by: blah blah blah blah........ any script in this area will be run automatically once every six seconds. It is important that you do not attach scripts to the heartbeat which will run constantly, as the resulting overhead (especially if you have a lot of creatures doing so) can be high."

should this be a concern??? i wouldnt want it to run every 6 seconds anyway ... possibly every 5 mins or so..

what threads should i read to get started in scripting??? can anyone give me a push in the right direction???
 Achilles
02-06-2005, 5:19 PM
#8
Unfortunately, you are limited to the reoccuring checks provided by Bioware (such as Onheartbeat), therefore you have to either take it or leave it :(

As far as being concerned, it depends on how many scripts you tie to the event and how many characters the scripts have to check against. It might behoove you to note that no one has done this before and there is probably a reason why (if I am mistaken, then my apologies).

Finally, for getting started, check the stickies :D There are whole sections devoted to scripting.

I hope that helps.
Page: 1 of 1