Need a scipt that forces conversation when a creature spawns
Moderators: Moderator, Developer, DM
-
DM Galadriel
- Posts: 570
- Joined: Thu Jul 19, 2012 8:12 am
Need a scipt that forces conversation when a creature spawns
Just what the title says. This is apparently outside my powers. Help is appreciated 
In the place of a Dark Lord you would have a Queen! Not dark but beautiful and terrible as the Morn! Treacherous as the Seas! Stronger than the foundations of the Earth! All shall love me and despair!
-
mrieder79
- Posts: 875
- Joined: Fri May 11, 2012 8:32 am
Re: Need a scipt that forces conversation when a creature sp
If this is for a game you are making separate from the BG server, then I recommend that you do not spawn them right before the conversation is supposed to start. Instead, have them there all along and just click scripthidden on their properties tab. Then, when you want to have the conversation start, you can use SetScriptHidden(FALSE) to unhide them, then start the convo.
I recommend doing it this way because I seem to remember having problems with making things do commands right after spawning. I can't remember for sure. It's been a year or so since I scripted, but I seem to recall a similar problem. In all the modules I make, I always use script hidden and then unhide to give the appearance of spawning. This also gets rid of the lag that is always associated with spawning.
If, however, this has to be fluid and happen anywhere in a game setting, such as in the BG PW, I don't think I can help. I've never scripted for a PW before.
I recommend doing it this way because I seem to remember having problems with making things do commands right after spawning. I can't remember for sure. It's been a year or so since I scripted, but I seem to recall a similar problem. In all the modules I make, I always use script hidden and then unhide to give the appearance of spawning. This also gets rid of the lag that is always associated with spawning.
If, however, this has to be fluid and happen anywhere in a game setting, such as in the BG PW, I don't think I can help. I've never scripted for a PW before.
-
DM Galadriel
- Posts: 570
- Joined: Thu Jul 19, 2012 8:12 am
Re: Need a scipt that forces conversation when a creature sp
This is for a quest I'm working on for UD here. I'm having the same problems with getting a script to fire after a spawn in during conversation. Just like you are talking about. Am gonna try the hidden trick. Thanks!
In the place of a Dark Lord you would have a Queen! Not dark but beautiful and terrible as the Morn! Treacherous as the Seas! Stronger than the foundations of the Earth! All shall love me and despair!
-
mrieder79
- Posts: 875
- Joined: Fri May 11, 2012 8:32 am
Re: Need a scipt that forces conversation when a creature sp
If it is for a static quest, it should work.
I would fire off the script from a trigger. The script can unhide the creatrure, do whatever visuals you want to go with their "appearance" and then start the convo.
God. Trying to make conversations fire reliably is a nightmare. Absolute nightmare.
*shudders and cries a little bit*
I would fire off the script from a trigger. The script can unhide the creatrure, do whatever visuals you want to go with their "appearance" and then start the convo.
God. Trying to make conversations fire reliably is a nightmare. Absolute nightmare.
*shudders and cries a little bit*
-
DM Galadriel
- Posts: 570
- Joined: Thu Jul 19, 2012 8:12 am
Re: Need a scipt that forces conversation when a creature sp
You are my hero. Worked like a charm and helped change an "eh quest " into a "ooh, neat" quest.
In the place of a Dark Lord you would have a Queen! Not dark but beautiful and terrible as the Morn! Treacherous as the Seas! Stronger than the foundations of the Earth! All shall love me and despair!
-
Ivan38Rus
- Retired Staff
- Posts: 1417
- Joined: Sat Aug 08, 2009 11:44 pm
Re: Need a scipt that forces conversation when a creature sp
Don't forget to set DisableAiWhileHidden flag to True.
-
Luna
- Retired Admin
- Posts: 7945
- Joined: Sat May 16, 2009 3:00 pm
Re: Need a scipt that forces conversation when a creature sp
Just saw this DM Galadriel.
Sounds like you got it working?
If not I think Boareskyr bridge has an example you can look at.
Sounds like you got it working?
If not I think Boareskyr bridge has an example you can look at.