Use verse to get Conversation device OnConversationEvent event number

Has anyone ever played with the new conversation device? I can’t seem to figure out how to get or compare what actual event number had triggered.

I’m working on a reputation system, and I’d like to use this new device to increase or decrease Rep based on how they respond to npc.
So Event 1 is bad and event 2 is good responses.

OnConversationEvent reads…but I can’t figure out how to COMPARE it to see if Event 1 fired, or Event 2 fired.
So far, this code (without the erroneous “if()”) works, but it fires BOTH Increase and Decrease.
Because its only reading that an event fired, but not WHICH event.

I started putting in the if() statements to see what its asking for. tried all kinds of stuff

In your function definition:

IncreaseReputation(Agent : agent, EV:int): void=

It is the argument EV which will refer to the Conversation Event which was fired.

if(EV = 1):
   # do stuff

or

case(EV):
   1 =>
      # Event 1
   2 =>
      #Event 2
   _ =>
      #Default
1 Like

Thanks. I must have ben really tired trying to work with that.

I’ve got the bad habit of forgetting to step away from the problem for abit, if I haven’t found a solution yet.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.