Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
javascript language tutorials or examples

samehhelaly
Registered User
Quote
2013-03-22 03:50:42

hi all .. i have downloaded the coppercube and iam asking about the javascript language and the actionscript tutorials and examples?the API.... so that i can understand more of the game engine also if i want access the code created from assigning behavior to object mesh ...thanks


niko
Moderator
Quote
2013-03-22 07:52:56

There are two actionscript and two javascript scripting tutorials in the documenation here: http://www.ambiera.com/coppercub.... The full Actionscript API can be found here: http://www.ambiera.com/coppercub...
And it you are targeting WebGL, you can use CopperLicht (http://www.ambiera.com/copperlic...) which has a similar API as the Irrlicht 3D engine.


samehhelaly
Registered User
Quote
2013-03-25 22:02:04

hi nicko
i have start working on a test game and i want ask about somethings i think it is easy on this engine but i do not know /// is there a javascript ,action script examples . or tutorials to stop bothering you by my questions

questions
1- suppose i want change a bullet after collusion with something to another texture or another model
2- how can i tell the engine that this is enemy and he shauld shout on the player ?
3-how can i change the up and down and left and right keys on keyboard actions to 4 pictures (2d overlay) to act like those keys? ..
4how can i create instance of the enemy when the alive enemies reach a specific number ?


niko
Moderator
Quote
2013-03-27 08:38:35

1: Hm, usually the bullet gets destroyed after collision, so there isn't anything to change. You can create a new object at the place of the collision, though.

2: Use the 'AttacksActorsWithTags' property for this. From the behaviors docs: http://whttp://www.ambiera.com/c... AttacksActorsWithTags: Set it to 'enemy' or similar. Attacks any actor which has a 'Tags' section with the text set in here. There is a 'tags' property where you can mark the object with.

3: You can use the 2D touch screen input overlay for this, set its "input mode" to "emulate specific key".

4: Use a coppercube variable for this, to count down the enemies. In a timer (some object with a "every few seconds do something"), check for this variable and create the instance then. Or, alternative, you can create the instance also where you are changing the counter.


samehhelaly
Registered User
Quote
2013-03-27 14:23:11

hi niko
first of thanks for your reply
for the last answer about the instances ... how to create instance? using version 3


erik
Registered User
Quote
2013-03-28 12:14:25

I think this is the "clone a scene node" action. But it only is available since CC4.


ajay
Registered User
Quote
2019-10-20 12:25:52

Hii
How to Get Keyboard For user To Enter Name..and other information...in Android target


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

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