Jump to content




os.pullevent while thing?


  • You cannot reply to this topic
5 replies to this topic

#1 Crowdy199

  • Validating
  • 34 posts

Posted 26 January 2013 - 09:16 AM

question i use os.pullevent all the time for cursor and bottons how do i make it so if they press e do this but dont wait for them to press e let them use the computer regulary but if they press e do this?

#2 TheOddByte

    Lazy Coder

  • Members
  • 1,607 posts
  • LocationSweden

Posted 26 January 2013 - 09:20 AM

What..?
event, p1 = os.pullEvent()
if event == "char" and p1 == "e" then
--Do Something
end
This What you want?

#3 TheOddByte

    Lazy Coder

  • Members
  • 1,607 posts
  • LocationSweden

Posted 26 January 2013 - 09:21 AM

Just some weird grammar you had there..

EDIT: Grammar Nazi On Duty! :P

#4 ikke009

  • Members
  • 224 posts
  • LocationSliding between sunbeams

Posted 26 January 2013 - 10:46 AM

What he means is that you can use the computer like you normally would but if "e" is pressed then something happens..
Good question though.. I dont know how to do that and the script hellkid98 posted wont work, that would freeze the computer untill "e" is pressed...

#5 Eric

  • Members
  • 92 posts
  • LocationUK

Posted 26 January 2013 - 10:52 AM

What do you mean by "let them use the computer regulary"?

#6 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 26 January 2013 - 10:56 AM

You will need a big while true do loop or use parallel.waitForAny().





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users