Jump to content

Home

Is it possible to make


sketch42

Recommended Posts

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

Link to comment
Share on other sites

Originally posted by tk102

I think you'd have to use a creature event 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

Link to comment
Share on other sites

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 ;)

Link to comment
Share on other sites

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???

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...