Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Can I extend the: "Game Actor with Health (AI, Player)" thingy with my own methods ? because i cant find its object / class name its also not in the copperlight class listing. |
||||
|
No, you can only adjust the movement speed during the game and camera angle. Other functions are not available. |
||||
|
Hi robo and others Let me clarify my question: For example, if you use the CC action: "Drag 3D Object with constraints" You get to fill in the properties panel but also the code to look at. And there in the code you wil see the objects name: "action_Drag3DObject" This action although a bit simple is very suitable to be turned into some sort of player avatar. And because you want your player avatars to be universal you woud give it usercontrol functions. And pathfinding routines so it also can be used as an enemy avatar. And you can do that; because you know its Object name, you can extend that script with your own functions, like so: functions usefull for an enemy node: "action_Drag3DObject".prototype.findPathToPlayer = function() {} "action_Drag3DObject".prototype.followPathToPlayer = function() {} and the functions usefull for an player node: "action_Drag3DObject".prototype.movePlayerTo = function() {} etc. etc. Now why reinvent the wheel if it is already largely there? thats why I want to know the name of the inbuild object "Game Actor with Health (AI, Player)" so that I can extend it with my own custom functions But only Niko knows them ? |
||||
|
The drag 3D object is an external scripted action so you can read the source in javascript. All the internal extension ( behaviors and actions) are coded in C++ internally and don't have a javascript source. So you can't really use the parameters. However, for the webGL part you might be able to use it as the game source is completely open and is in javascript. what you can do is you can attach the inbuilt behavior or action to an object and then publish it as webGL and then run it on the browser now while the game is running open the developer console of the browser and you probably can traceback the functions (classes) the game is using. hope that bit of information helps. |
|