Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
How to use these functions?

Danila
Guest
Quote
2020-01-25 08:06:41

How to use these functions?

ccbReadFileContent(filename)

Note: This function may not do anything depending on the target it runs on (websites for example have no access to the file system).

reads a full (text) file into a string


ccbWriteFileContent(filename, content)

Note: This function may not do anything depending on the target it runs on (websites for example have no access to the file system).

writes a full (text) file from a string


Can I have an example?


just_in_case
Moderator
Quote
2020-01-25 15:19:17

It reads text from a file and then can be used with variables and to display them on a 2D overlay.

Can also be used to create a load and save game type feature you can save curent position of the player and all other object to a text file when save button is pressed write them to a text file using the command ccbwritefilecontent(filename) and when lad button is pressed you can load those values from the text file and can then assign them to each object.

According to me this is a very powerfull command if used wisely.

An action read a specific line from a text file action was created by me using the same command ccbreadfilecontent which read specified line from a text file then displays that text on a 2D overlay. Which is usefull in creating dialogue system


danila
Guest
Quote
2021-01-18 23:08:53

Thanks


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internationa?" (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