≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Weapon change
Posted by:
(you are not logged in)
Enter the missing letter in: "Intern?tional"
(you are not logged in)
Text:
[quote][b]DeltaXGames[/b] wrote: No it's not a behavior. Here's how I added it to my project. Click on the root scene node and add a "on first drawing do something" behavior . Then click that and add an "Execute Javascript" action, paste the code there. Rename the weapons in my weapon array to be the same with the weapons you used in your game. Make sure all the weapons are not visible, uncheck this attribute in all the guns. Now you need to add two "when a key is pressed do something" behavior,one for switching forward and and another for switching back between weapons. Just execute this JS when someone clicks the next weapon key nextWeapon(); and previousWeapon(); for when the player clicks the previous weapon key. And please by all means change it, it's very sloppy code and it includes a lot of things that are very specific to my game and may not be needed in your project. I didn't have time to trim out those parts.[/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