≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
keycode events
Posted by:
(you are not logged in)
Enter the missing letter in: "Interna?ional"
(you are not logged in)
Text:
[quote][b][/b] wrote: actually, I did posted the whole code for you and yup I was explaining the usage to you. So in order to use the above code, simply attach a behavior "before first drawing do something" and to that behavior attach an action "Execute javascript" and inside that action copy paste the above code that I have sent in the earlier post. and now in your game when you press "F" key it will set the variable "F_down" to true, you can change the variable name to anything that you want. And if you want to check another key press rather than "F" then simply change the numeric value "70" in the code with ther keycode value for the key that you want to use. You don't need to use on Key pressed behavior then. I don't know what you really wanna do with the every few seconds do something. Do you want that when you press a key, then the object will start blinking, or start toggling its visibility state every few seconds? Above code that I sent you is same as using the when a key is pressed down do something, so if you don't wanna use the code then you can use that approach. And I mentioned to apply this on before first drawing do something, for easier usage, you can also use it however you want, like in on proximity or when reaching a specific level, or when a variable has a value and all. you need to register it once only. and then it will work continuously. The above example is just for KeyDown event, you probably also want to use KeyUp event along with it, if you are using this. You will get to know this, when I will start creating and pushing tutorial videos for javascript. It's hard to explain the usage in text.[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact