Jump to content

QUEST FUNCTION CONFIRM() - cancel event?


Recommended Posts

Hello guys,

I want to do some confirms in quest, but when I do like this:

 

local action = confirm(vid, "Do you want pizza? ", 10)

	if action == CONFIRM_YES then

	    local action = confirm(vid, "Great! Maybe some ketchup on it? ", 10)

	    if action == CONFIRM_YES then

	        -- OH, SORRY, TOO LATE, FIRST ACTION TIMEOUT BEGIN... PIZZA IS COLD NOW.

	    end

	end


 

 

so... the main problem is I should cancel last CONFIRM (timeout) event before starting new confirm event... but there's no function like this in quest functions

anyone have some ideas how to handle it? YMIR just don't use confirm 2 times in a row so they don't make function like this :(

for ex. we spend 5 seconds at first confirm and we go to second confirm and next 5 seconds later begin TIMEOUT event of first confirm..

 

PS. I saw confirm_timeout_event at game_src -> questlua.cpp but don't know how to cancel it with new function or fix inside this, according to current state

PS2. names of locals doesnt matter - it's all about time event

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

14 hours ago, ZenkoKXO. said:

Can you be a more specific? I didn't understand what you're looking for.

Maybe you can do some screenshots?

Sure, I can't really do it with screenshots, so I will try to explain other way:

you use: confirm(vid, "Do you like pizza? ", 10)

other player gets confirm window and he click YES or NO, for ex. he do it in 5 seconds

So confirm timer is set to 10 seconds - all is fine, but when we use another confirm at same quest the old TIMEOUT is still active, so after another 5 seconds in second confirm instance it happen to TIMEOUT

Main problem is the 10 seconds TIMER doesn't stop after choosing YES or NO / or the function confirm() doesn't clear timeout event before initiate.

Use this quest: http://pastebin.com/CVxLM8B0

before clicking YES wait 6 seconds and at second confirm wait 5 seconds and you will see the problem :)

QUEST from sender of confirm will be closed because of timeout of first confirm..

Tried my best to explain this, I just need to cancel TIMEOUT event after user choose YES or NO

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 0

      Target Information System

    2. 1

      Feeding game source to LLM

    3. 2

      anti exp explanation pls

    4. 1

      Feeding game source to LLM

    5. 2

      anti exp explanation pls

    6. 0

      [GR2] Positioning an object added with "Attach"

    7. 1417

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.