PDA

View Full Version : Scripting question


Doc Valentine
08-11-2005, 05:52 PM
Hey everyone,

I am having a problem, I have made a script for the ebon hawk module that makes a dialog fire when it starts. I put the script on the onEnter struct of the .are file. And the tag for the character as well as the dlg name in the script match the only thing i am doing differently is the npc that is supposed to speak the dialog comes in with the player from another module, but has the tag im looking for. Shouldnt he say the dialog when the player enters? Or should i put it on the OnHearbeat.

stoffe
08-11-2005, 05:59 PM
I am having a problem, I have made a script for the ebon hawk module that makes a dialog fire when it starts. I put the script on the onEnter struct of the .are file. And the tag for the character as well as the dlg name in the script match the only thing i am doing differently is the npc that is supposed to speak the dialog comes in with the player from another module, but has the tag im looking for. Shouldnt he say the dialog when the player enters? Or should i put it on the OnHearbeat.

Don't know if this is the problem in your case, but anything that interacts with the player character in an OnEnter script should be delayed by about a second or so to allow the player object time to properly spawn in the area. I've noticed that strange things can happen if you don't do this.

Also note that the OnEnter script does not only fire when the player character is spawned into the area, but any time any creature is spawned into the arena. Thus if you haven't blocked out the script so it only does things if it's the player that enters, chances are that your code has already been triggered before the player has entered the area when one of the pre-placed NPCs (if any) are spawned.

Doc Valentine
08-11-2005, 06:02 PM
Well that has never happened to me before with onEnter script. Also, there are no npc's in the module, save the ones I already have.

EDIT: Also, when i go to the character he does not say his dialog which is in the module.

Doc Valentine
08-11-2005, 06:27 PM
AAAAAAAAAAAAAAHHHHHHHAAAAAAAAAAAA!!!!!!!! I figured it out, the tags in the dlg listener struct did not match ace's tag. STUPID STUPID STUPID!