≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
changing 2doverlay variable from within click with custom js
Posted by:
(you are not logged in)
Enter the missing letter in: "Internatio?al"
(you are not logged in)
Text:
[quote][b][/b] wrote: Update: Rob is talking about this issue and offers a solution. Is this really the way of doing it? [url]https://steamcommunity.com/app/857350/discussions/0/1651045226217106261/[/url] [quote] I found this challenging - only took me like 5 hours to work out successfully... This is my javascript code to get the internal data you want to then save under another name using the general Save or Load variable method: var player=ccbGetSceneNodeFromName("Player1"); var curPos=ccbGetSceneNodeProperty(player,"Position"); var curTgt=ccbGetSceneNodeProperty(player,"Target"); var curFov=ccbGetSceneNodeProperty(player,"FieldOfView_Degrees"); var curHth = ccbGetCopperCubeVariable("Player1.health"); ccbSetCopperCubeVariable("savePosition",curPos); ccbSetCopperCubeVariable("saveTarget",curTgt); ccbSetCopperCubeVariable("saveHealth",curHth); ccbSetCopperCubeVariable("saveFov",curFov); You can now save the variables 'savePosition' etc etc and reload them, then update to the new loaded variables with this javascript: var player=ccbGetSceneNodeFromName("Player1"); var savePosition =ccbGetCopperCubeVariable("savePosition"); var saveTarget =ccbGetCopperCubeVariable("saveTarget"); var saveHealth =ccbGetCopperCubeVariable("saveHealth"); ccbSetSceneNodeProperty(player,"Position", savePosition); ccbSetSceneNodeProperty(player,"Target", saveTarget); not sure the correct javascript for updating health so I just used standard variable menu: Player1.health Set to variable 'saveHealth' [/quote][/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