Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Scripting iteraction with response  (Read 2312 times)

0 Members and 1 Guest are viewing this topic.

Azrael

  • Regular poster
  • ***
  • Karma: 9
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • View Profile
    • Mad Orange
Scripting iteraction with response
« on: September 27, 2009, 01:58:46 PM »

It's possible to select a response (added with "AddResponse") with script when the game is waiting for the player to select a response?

For example, i add 4 response with Game.AddResponse():

Code: WME Script
  1. Game.AddResponse(1, "Resp 1.");
  2. Game.AddResponse(2, "Resp 2");
  3. Game.AddResponse(3, "Resp 3.");
  4. Game.AddResponse(4, "Resp 4.");
  5.  
  6. var Selected = Game.GetResponse();

Now the game is waiting for a response to be choosed by the player. What i want now is to automatically choose a response if the player don't choose one in "X" minutes. It's possible?

Thanks ;)
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Scripting iteraction with response
« Reply #1 on: October 01, 2009, 08:42:43 AM »

GetResponse doesn't support this. The only way I can think of is killing the script with GetResponse() by some other script, after the specified time. But it seems to be kind of a dirty solution. Or you could implement your own response system and not rely on the built-in one (I think it shouldn't be terribly complicated). Or post this in the wishlist forum, if it's very important to you :)
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Azrael

  • Regular poster
  • ***
  • Karma: 9
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • View Profile
    • Mad Orange
Re: Scripting iteraction with response
« Reply #2 on: October 01, 2009, 12:09:56 PM »

Tnx Mnemonic, i think i will create some custom scripts and windows, thanks anyway ;)
Logged
 

Page created in 0.041 seconds with 19 queries.