Just wondering...

This forum is for those interested in discussing NWN scripting.

Moderators: DM_eaze, Luceran, DM_Jaydaan, ST_DM_Myle, dm_xeen1, DM Nexus, DM_TrainWrek, Carpe_DM1, DM_Unicorn, DM_Griphon, DM_Shadowlands, dm_zane, DM_Centaur, DM_Mystic, DM Rendyll, DM_Avalon

Mer`Zikain
Count
Count
Posts: 105
Joined: Thu May 31, 2007 2:09 pm

Post by Mer`Zikain »

Yesterday I worked a lot on saving a players position when they exit an area (probably should have gone with entering the area instead) and exporting their character so I have a constant updated copy of their character. Not sure if I'm on the right track with that though.

The way I was thinking, I'd setup a script for the onAreaTransitionClick for doors and the onClick for area transition triggers that would store the players current location before the transition on the character, then onExit for the area it would export their character.

First I now realize that I should be doing this on the onEnter event for the area instead and that the variables stored most likely don't save with the exported character. So I'm kind of at a standstill on that one.

I'm also having trouble making resting players blind for the duration of the rest cycle. I fail at this script syntax T_T
Mer`Zikain
Count
Count
Posts: 105
Joined: Thu May 31, 2007 2:09 pm

Post by Mer`Zikain »

Awesome, thanks :D
Mer`Zikain
Count
Count
Posts: 105
Joined: Thu May 31, 2007 2:09 pm

Post by Mer`Zikain »

Hmm, for some reason vista is saying that file is invalid. *shakes fist at vista*
User avatar
driller
Site Admin
Site Admin
Posts: 4792
Joined: Tue Jul 04, 2006 8:52 am
Contact:

Post by driller »

Try again.

-driller
Mer`Zikain wrote:Hmm, for some reason vista is saying that file is invalid. *shakes fist at vista*
Mer`Zikain
Count
Count
Posts: 105
Joined: Thu May 31, 2007 2:09 pm

Post by Mer`Zikain »

Yep, worked that time ^^

Thanks again for all the help.

Now let's see if I can get it to work... ^^;
Mer`Zikain
Count
Count
Posts: 105
Joined: Thu May 31, 2007 2:09 pm

Post by Mer`Zikain »

Ok, I have no idea what I'm doing wrong with this thing. It spawns the default creature but not the creatures from the list I made.

My list is:

if(strList == "kobolds"){
list_add_rear_string(OBJECT_SELF,"creature_list","49:NW_KOBOLD001"); list_add_rear_string(OBJECT_SELF,"creature_list","100:NW_KOBOLD002");
return SPAWNER_LIST_CREATE_SUCCESS;
}
if(strList == "wolves"){
list_add_rear_string(OBJECT_SELF,"creature_list","100:NW_WOLF");
return SPAWNER_LIST_CREATE_SUCCESS;
}

And I have three spawn points that I'm testing with: kobolds_01_10_20_00_15_a, kobolds_01_10_20_00_15_b, and wolves_01_10_20_00_15_a

I tried using my own creatures that I had named NG_KOBOLD001/002 and NG_WOLF001, but that never worked, it just spawned ghouls all the time so I changed it to the NWN base creatures listed up there in the code I pasted. Still didn't work. I changed the default from NW_GHOUL to NW_WOLF and now it spawns wolves instead of ghouls but still doesn't spawn anything I have in those lists.

I saw on that forum I found when I searched for that mmorpg file that there is some kind of bug that makes you have to run the script once with debug on and then turn it off and it'll work fine. Tried it and it didn't work so I'm really out of ideas here.

I just tried using the default setup and the only creatures spawned there was the guard npc's. Further experimentation has been met with complete failure. Even changing the default do various other creature tags has met with failure. It seems that it's just messing with me or something >_<

In any case, have you any idea what the problem could be? Maybe changes made from expansions and updates? Or I just don't know what I'm doing? ^^;
User avatar
driller
Site Admin
Site Admin
Posts: 4792
Joined: Tue Jul 04, 2006 8:52 am
Contact:

Post by driller »

You must use the resref of the mob, not the tag. Then you have to recompile all of the spawner scripts after editing the list.

-driller
Mer`Zikain wrote:Ok, I have no idea what I'm doing wrong with this thing. It spawns the default creature but not the creatures from the list I made.

My list is:

if(strList == "kobolds"){
list_add_rear_string(OBJECT_SELF,"creature_list","49:NW_KOBOLD001"); list_add_rear_string(OBJECT_SELF,"creature_list","100:NW_KOBOLD002");
return SPAWNER_LIST_CREATE_SUCCESS;
}
if(strList == "wolves"){
list_add_rear_string(OBJECT_SELF,"creature_list","100:NW_WOLF");
return SPAWNER_LIST_CREATE_SUCCESS;
}

And I have three spawn points that I'm testing with: kobolds_01_10_20_00_15_a, kobolds_01_10_20_00_15_b, and wolves_01_10_20_00_15_a

I tried using my own creatures that I had named NG_KOBOLD001/002 and NG_WOLF001, but that never worked, it just spawned ghouls all the time so I changed it to the NWN base creatures listed up there in the code I pasted. Still didn't work. I changed the default from NW_GHOUL to NW_WOLF and now it spawns wolves instead of ghouls but still doesn't spawn anything I have in those lists.

I saw on that forum I found when I searched for that mmorpg file that there is some kind of bug that makes you have to run the script once with debug on and then turn it off and it'll work fine. Tried it and it didn't work so I'm really out of ideas here.

I just tried using the default setup and the only creatures spawned there was the guard npc's. Further experimentation has been met with complete failure. Even changing the default do various other creature tags has met with failure. It seems that it's just messing with me or something >_<

In any case, have you any idea what the problem could be? Maybe changes made from expansions and updates? Or I just don't know what I'm doing? ^^;
Mer`Zikain
Count
Count
Posts: 105
Joined: Thu May 31, 2007 2:09 pm

Post by Mer`Zikain »

You won't believe this but I tried that when I first had the problem of it not working. In any case that seems to have fixed it. Thanks yet again ^^;

But of course I can't make a post here without bugging you for more information :D heh

Two things actually, first about the previous issue. I can't get the kobolds from dropping from the sky. The wolves show up normally but the kobolds apparently have air support. ^^;

Thought I'd delete the z from the vector function in the random spawn location since I figured they were being spawned at random heights but evidently that wasn't it since they're still doing it. Must be something I'm overlooking again. Always something simple.

The second thing is about the secret word triggers. I've been looking at at mod you told me to download (really neat mod btw) and found the functions for SetListening and such. So now I can get npc's to respond to spoken phrases but I can't seem to get a trigger to do so. I can get the trigger to tell which character is nearest but it doesn't seem to like the GetListenPatternNumber function or something.

I'm sending myself the pattern number and it's always 0. I figured I'd make the onEnter script the part that initialized the SetListening and the pattern and the onHeartBeat for checking but I'm missing something. Is there a trigger in that mod that works like the npc's do? I haven't seen one yet.

Anyway, thanks again. ^^
User avatar
driller
Site Admin
Site Admin
Posts: 4792
Joined: Tue Jul 04, 2006 8:52 am
Contact:

Post by driller »

Look for this function:

CreateObject(int, string, location, int, string)

Make sure that the int after location is set to FALSE.

You cannot make a trigger respond to spoken text, only creatures.

-driller

Mer`Zikain wrote:You won't believe this but I tried that when I first had the problem of it not working. In any case that seems to have fixed it. Thanks yet again ^^;

But of course I can't make a post here without bugging you for more information :D heh

Two things actually, first about the previous issue. I can't get the kobolds from dropping from the sky. The wolves show up normally but the kobolds apparently have air support. ^^;

Thought I'd delete the z from the vector function in the random spawn location since I figured they were being spawned at random heights but evidently that wasn't it since they're still doing it. Must be something I'm overlooking again. Always something simple.

The second thing is about the secret word triggers. I've been looking at at mod you told me to download (really neat mod btw) and found the functions for SetListening and such. So now I can get npc's to respond to spoken phrases but I can't seem to get a trigger to do so. I can get the trigger to tell which character is nearest but it doesn't seem to like the GetListenPatternNumber function or something.

I'm sending myself the pattern number and it's always 0. I figured I'd make the onEnter script the part that initialized the SetListening and the pattern and the onHeartBeat for checking but I'm missing something. Is there a trigger in that mod that works like the npc's do? I haven't seen one yet.

Anyway, thanks again. ^^
Mer`Zikain
Count
Count
Posts: 105
Joined: Thu May 31, 2007 2:09 pm

Post by Mer`Zikain »

So then I'm going to have to have a strategically placed or otherwise invisible npc to do the spiffy secret word stuff?
User avatar
driller
Site Admin
Site Admin
Posts: 4792
Joined: Tue Jul 04, 2006 8:52 am
Contact:

Post by driller »

Yes. Use effects like CutSceneInvisibility on him.

-driller
Mer`Zikain wrote:So then I'm going to have to have a strategically placed or otherwise invisible npc to do the spiffy secret word stuff?
Mer`Zikain
Count
Count
Posts: 105
Joined: Thu May 31, 2007 2:09 pm

Post by Mer`Zikain »

Awesome, thanks :D
Mer`Zikain
Count
Count
Posts: 105
Joined: Thu May 31, 2007 2:09 pm

Post by Mer`Zikain »

I don't see a CutsceneInvisibility type effect. Only EffectInvisibility and the three different invisibility constant types. I'm going to experiment with the types but the Darkness type seems like it might be what I need, unless what you're talking about is an undocumented function.
Mer`Zikain
Count
Count
Posts: 105
Joined: Thu May 31, 2007 2:09 pm

Post by Mer`Zikain »

Nevermind, found it way down at the bottom of the list of constants under VFX ^^;
Mer`Zikain
Count
Count
Posts: 105
Joined: Thu May 31, 2007 2:09 pm

Post by Mer`Zikain »

I'm workin on a dying script and having a bit of trouble. The EffectHitPointChangeWhenDying function isn't working for me at all. The character just lays there and there's never any change in hp. So I setup a different method to make concurrent calls to a dying function of my own design. The problem with it is that it shows "someone damages you..." when the script executes instead of "you're bleeding to death".

I'm not sure why the hp change effect isn't working. The example at nwnlexicon is bugged as all get out, they even spelled the visual effect wrong :P

How does yours work? ^^;
Locked