Author Topic: An OnClick transition trigger conversation ends immediately  (Read 433 times)

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
An OnClick transition trigger conversation ends immediately
« on: November 29, 2015, 04:07:48 pm »


               

I want an area transition trigger to start a conversation with a PC that clicks/enters. I've found out that an OnClick event is enough, since it curiously fires for entering PCs, too, at least in case of an area transition and not a regular trigger.


The problem, however, is that sometimes (not all the time) the started conversation ends as soon as it starts - it pops up for a fraction of a second and is interrupted immediately. I'm not quite sure what the reason behind this odd behavior might be.


I tried clearing all the actions of a PC speaker in the conditional event at the very beginning of the conversation, but it didn't seem to change anything.



               
               

               
            

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0
An OnClick transition trigger conversation ends immediately
« Reply #1 on: November 29, 2015, 07:14:57 pm »


               

I could be totally off base here, but is it possible that an NPC is also entering the trigger and the PC's conversation is interrupted when an attempt is made to start the trigger conversation with the NPC? If that's the case, a check in the script that checks that the triggerer is a PC may help, or a check that a conversation isn't already ongoing may prevent the tie-up.


 


Obviously, if you are seeing this when a solo PC is entering the trigger, then some other mechanism is in play. But, I am pretty sure I have seen similar things on PWs where one PC's convo is interrupted when another character triggers the same one.



               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
An OnClick transition trigger conversation ends immediately
« Reply #2 on: November 29, 2015, 07:24:31 pm »


               

No NPC around, the PC was entering the trigger alone. This is really odd, since after further investigation it seems to affect only certain triggers (I have triggers like this in many areas) and sometimes even only specific parts of it (i.e. if you clicked or entered one end of the trigger, it would work fine, but if you tried it with the other one, it would be interrupted).


 


While I don't know the solution, I used the workaround of firing this conversation with the PC itself, which isn't a problem, since it was supposed to be more of a menu rather than a conversation anyway. It seems to work just fine this way.


 


The only problem is that the conversation won't end if the PC moves away from the trigger.



               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
An OnClick transition trigger conversation ends immediately
« Reply #3 on: November 30, 2015, 01:13:29 am »


               

I suspect this has to do with the official location of the trigger relative to the PC. I'm not sure what the game uses as the point within a trigger area which is the location (as returned by GetLocation(oTrigger) for example), but it must use a single point for that routine. It could be using that for determine if the PC is close enough to converse. That's just a guess though based on what you described.


 


Another way is to drop an invisible placeable at the PC's location and drive the conversation with that. Then the move away part would still work. You'd need to clean it up in the conversation end and abort scripts. 



               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
An OnClick transition trigger conversation ends immediately
« Reply #4 on: November 30, 2015, 01:19:57 am »


               


I suspect this has to do with the official location of the trigger relative to the PC. I'm not sure what the game uses as the point within a trigger area which is the location (as returned by GetLocation(oTrigger) for example), but it must use a single point for that routine. It could be using that for determine if the PC is close enough to converse. That's just a guess though based on what you described.


 


Another way is to drop an invisible placeable at the PC's location and drive the conversation with that. Then the move away part would still work. You'd need to clean it up in the conversation end and abort scripts. 




 


That would be a way, yes, but I went with what I had described already. I applied a cutscene immobilize effect on the PC which is removed upon the end (regular or aborting) of the conversation. Works just fine.


 


And I'm not sure about the explanation you propose. If the PC was too far from said location, wouldn't the conversation refuse to fire altogether instead of firing and ending immediately?



               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
An OnClick transition trigger conversation ends immediately
« Reply #5 on: November 30, 2015, 01:37:48 am »


               

Don't know... PC was moving as it entered the trigger I assume.  Do you have a better theory to propose?



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
An OnClick transition trigger conversation ends immediately
« Reply #6 on: November 30, 2015, 08:51:28 am »


               

I have seen this behaviour when the PC is distant from the conversing object.


 


For some reason, the distance at which the conversation fails depends on dialogue zoom. It helps to have both the in-game option and the conversation set to zoom in. On the threshold of failure, the conversation will sometimes display for an instant - an engine quirk, perhaps.


 


It sounds as though the trigger is quite large?


 


I find invisible objects very reliable. When placed in range of the PC, their conversations never seem to fail, perhaps because they are a very well defined point (unlike a trigger) and have no walkmesh issues.