3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: 2 scripts and a string variable  (Read 1326 times)

« on: December 26, 2009, 01:30:10 AM »
Is it possible for 2 scripts to share a single string variable? Let's say i have a string variable myName="nochi" in script 1. Is it possible for me to output myName in script 2? thank you for your help. :)
« Reply #1 on: December 26, 2009, 04:19:16 AM »
A former 3DRad Guru and a great contributor to the 3DRad Community Forum produced a plugin dll which accomplished the very thing that you're asking. Unfortunately, he (resigned?) from the Forum, taking all his contributions and posts with him.
AKA: The 3D Raddict http://www.3draddict.com/
« Reply #2 on: December 26, 2009, 05:08:46 AM »
oh.... :( that's too bad....anyway...incase it's not possible....is it possible for me to extract a text from a textprint object and store it in a string variable? thank you for replying btw... ;D i really need to use a string in 2 scripts.... :(

psikotropico

« Reply #3 on: December 26, 2009, 06:12:42 AM »
still there's AllanF's resource here:

http://www.3drad.com/forum/index.php?topic=2130.0

maybe can help you
« Reply #4 on: December 26, 2009, 07:48:26 AM »
Oh yes.......I should have given you that link......my apologies.

I think that MH improved on my attempt by enabling the transfer of any number of strings........with my dll only one string can be transferred and only once. Anyway.....try it out......see if it helps.
AKA: The 3D Raddict http://www.3draddict.com/
« Reply #5 on: December 26, 2009, 09:21:58 AM »
Other way (but more ugly :P) is create a text file and store there the variables. Then you can read them (or rewrite) from anywhere.
Here Fernando shows how to use it to debug code but it can be easily adapted for your purpose.

psikotropico

« Reply #6 on: December 26, 2009, 12:43:33 PM »
Here is the Global Strings resource...
get it before it will be censured or deleted!!
« Reply #7 on: December 26, 2009, 10:58:59 PM »
i think this info is enough ;D thank you very much to: AllanF, psikoT and Fred123.
i tried downloading the dlls provided by AllanF and psikoT..but i'm examining these dlls and examples as for now..
i also considered Fred123's solution, same as what AllanF posted on psikoT's topic..by saving the string in a text file and reading it again in the other script...easy and simple...but as for now i'll try to figure out which of the 2 solutions will be less bulky for my project...anyway, thank you very much again for your help guys.. ;D
« Last Edit: December 26, 2009, 11:01:16 PM by nochi »
Pages: [1]