MODULE: UltraVariables (formerly DeNGVaT) v1.10

Started by SSH, Tue 12/12/2006 17:48:08

Previous topic - Next topic

EnterTheStory (aka tolworthy)

Quote from: tolworthy on Mon 14/04/2008 14:50:15
Hi SSH! Is there a simple way to copy ALL the variables saved by Global.Gets() and Global.Get() ?
I'll take that as a "no" then. Oh well, guess I'll do it the long way.

SSH

27 hour response too slow for you, eh?

You could add a function to the Dengvat module to iterate over the array(s) and write them to a file. I won't have time to do this in the near future, though.
12

EnterTheStory (aka tolworthy)

Quote from: SSH on Tue 15/04/2008 17:20:48
27 hour response too slow for you, eh?
Last time you replied in 27 MINUTES! I thought you must be dead or in hospital or something. Really, I was beginning to wonder why I pay you that generous salary for 24/7 service.

Seriously though, thanks for the idea. I'm just being lazy. DeNGVaT is the by far the most useful thing to ever be added to AGS, and I am forever in your debt.

Gilbert

This is a forum, not a chatroom, so be patient to wait for replies, as people are not always online and are standby for your service. Sometimes it may cost days for a reply and that is normal.

Please don't do that again.

SSH

Well, this has been updated so that the GUI will import into AGS 3.0+ and renamed so that people have a better idea what it does!

Also added:

Global.Dump function to dump all variable and timer values to a file
max setting for Global.Inc to allow increments to automatically stop when they reach the top...
12

EnterTheStory (aka tolworthy)

#25
Question: any plans for allowing wildcards? I have a couple of thousand globals, grouped into names like
Code: ags
Global.Set("1_person6_object23",1);
or
Global.Set("1_person7_object99",2);


I frequently reset groups of globals, depending on their initial number. At present I search every global, use 'Contains" and hope that the initial number is not repeated elsewhere in some other global. but it would be nice to be able to write
Code: ags
Global.Set("1_*",0); 
or 
Global.SetGroup("1_",0);


Any chance...? :)

EDIT: if you're wondering why I don't just use arrays, it's because I pass a lot of data between different games. I have fewer bugs if I stick to one data type. Using SSH's globals is the most flexible option.

EnterTheStory (aka tolworthy)

#26
I think I found a minor bug in the original DeNGVaT code. It's probably fixed in the enwer version (I'm sticking weith the old version for various reasons) but thought I'd mention it for the record.

Code: ags

String test = Global.Gets("cutscene_waiting"); Display("1 waiting:'%s'",test);	
String what = Global.Gets("rightClickedObject"); 				
String test2 = Global.Gets("cutscene_waiting"); Display("2 waiting:'%s'",test2);	


result: the second line ERASES the content of 'cutscene_waiting'

workaround: this only happens if 'rightClickedObject' has not been defined. Adding Global.Sets("rightClickedObject",""); at an earlier stage fixes it.

EDIT:
It seems I spoke too soon. On further examination, it appears that, in some circumstances, TWO globals can be stored with the same name. So when you then search for that global, you may access the wrong value. Any suggestions would be much appreciated!

LATER EDIT:
It's possible that the previous problem was caused by a line in the 'find' function. If anyone's interested I'll post more details.

SSH

As the changelog in the latest version says, this bug was fixed in v1.01.
12

SMF spam blocked by CleanTalk