≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Some problems with coding
Posted by:
(you are not logged in)
Enter the missing letter in: "Intern?tional"
(you are not logged in)
Text:
[quote][b]dekon_17[/b] wrote: Well, now I am asking a questions here. So, I tried to script some stuff, but I got in three problems (by now probably): -My code makes character "slide" (not actually) only in a fixed direction, and not the one were I am looking at. -I don't really know how to make a real slide, not a teleportation (by that, I mean that the character does a simple repositioning, duh...). -I... I don't know how to make character slide only on a ground (without a "sliding to the sky", as it was with "Move Scene Node" action) And so, if there wasn't a source code, I wouldn't left this thread here, you know. So, here it is: [code]<action jsname="action_BSGslide" description="BSG slide"> <property name="Object" type="scenenode" /> <property name="Time" type="int" default="1000" /> <property name="Distance" type="vect3d" default="40.0, 0.0, 0.0" /> </action> action_BSGslide = function() { }; action_BSGslide.prototype.execute = function(currentNode) { var oldPos = ccbGetSceneNodeProperty(this.Object, "Position"); var newPos = oldPos.add(this.Distance); ccbSetSceneNodeProperty(this.Object, "Position", newPos) }[/code] As you can see, there is a "Time" property, but I didn't used it since I don't know how. So-o... Can someone... Help, I guess?[/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