≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
scripted rotation
Posted by:
(you are not logged in)
Enter the missing letter in: "Internationa?"
(you are not logged in)
Text:
[quote][b][/b] wrote: this is what I've come up with so far and it seems to work: [code] action_lock = function () { }; action_lock.prototype.execute = function (currentNode) { var node = ccbGetSceneNodeProperty(currentNode,"Name"); var rot = ccbGetSceneNodeProperty(currentNode,"Rotation"); var rotnew = rot.x+36; if (rotnew >=360) { ccbSetSceneNodeProperty(currentNode, "Rotation", rot.x =0); } else { ccbSetSceneNodeProperty(currentNode, "Rotation", rotnew ); print(rot) } var chx1 =ccbGetSceneNodeFromName("dial1"); var chxr =ccbGetSceneNodeProperty(chx1,"Rotation"); var chx2 =ccbGetSceneNodeFromName("dial2"); var chxr2 =ccbGetSceneNodeProperty(chx2,"Rotation"); var chx3 =ccbGetSceneNodeFromName("dial3"); var chxr3 =ccbGetSceneNodeProperty(chx3,"Rotation"); var chx4 =ccbGetSceneNodeFromName("dial4"); var chxr4 =ccbGetSceneNodeProperty(chx4,"Rotation"); //code 2436 if (chxr.x==36 && chxr2.x==108 && chxr3.x==72 && chxr4.x==180) { print ("unlocked"); } else { print("locked"); } } [/code][/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