View Single Post
  #5  
Old 09-13-2017, 02:19 AM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,745
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
I'm trying to what you suggested, but I am still having issues with the keydown repeating. Maybe showing exactly what I'm doing will shine more light on my problem.

PHP Code:
//this.isDestroyed is set to false inside of say3_options_object
//say3_options_list is set to be the first responder
function say3_options_list.onKeyDown(keycodekeytextscancode) {
  if (
keytext == "d") {
// say3_options_list is inside say3_options_object
    
if (say3_options_object.isDestroyed == true) return; 
    
say3_options_object.isDestroyed true
    
this.option say3_options_list.getselectedrow(); // get row value
    
DestroySay3(); // function to destroy all GUI objects
  
}

After I added your suggestion it only loops twice (before it looped three times). I still don't understand why it loops at all.

Also after testing a little bit it doesn't look like onPlayerLeaves is called, at least if the player uses "unstick me". I am going to look into that a bit more.
__________________
Save Classic!

Last edited by maximus_asinus; 09-13-2017 at 04:39 AM..
Reply With Quote