• 0

    posted a message on Trigger Event issue

    @ImperialGood: Go

    The base variable is set at map init. And, the trigger is enabled about 30 seconds into the game. I was debugging the base variable is correct, the string is correct. However, for some reason, the unit ref is null. I am not enabling any triggers for players that arent playing.

    I found this thread http://www.sc2mapster.com/forums/development/galaxy-scripting-and-trigger-lib/40647-arrays-in-an-event-doesnt-work/ Seems it should interpret it correctly, unless structs aren't interpreted correctly.

    I am confused out of my mind... Is there anything else I can try? Would seeing more code help?( I don't want to bombard you with code xD )

    Posted in: Galaxy Scripting
  • 0

    posted a message on Trigger Event issue

    Okay I am having problems with some triggers executing when they are not supposed to. So I have this code here:

    	int p = 0;
    	int pp = 1;
    	int pE = 0;
    	int t = 0;
    	
    	for ( ; p < nPlayers; p += 1 )
    	{
    		pp = p + 1;
    	
    		player[p].trigs.defeatFFA = TriggerCreate("GameOverFFAPlayer" +  IntToString(pp) + "_Func");
    		TriggerEnable( player[p].trigs.defeatFFA, false);
    		TriggerAddEventUnitDied(player[p].trigs.defeatFFA, UnitRefFromVariable("player[" +  IntToString(p) + "].base.base"));
            }
    

    I was debugging through this code and it did execute. Something I noticed when debugging is that the trigger had no events after adding one. The player[p].base.base = Orbitial Command(player 1). However, for some reason whenever anything dies GameOverFFAPlayer1_Func executes. BTW I enable the trigger at about 30 seconds into the game after the mode is picked. I have no other code that is causing the issue, everything is executing in the correct order, I have already checked everything I would think to check. I feel it has something to do with UnitRefFromVariable... Any ideas?

    Posted in: Galaxy Scripting
  • 0

    posted a message on color class

    Yea just what I thought, just making sure. Thanks.

    Posted in: Galaxy Scripting
  • 0

    posted a message on String to Text?

    Thanks a ton, I was able to import a new locale file. I prefer doing everything the no-dialog way. It is much more dynamic and easier for me to do, due to what I am used to.

    Posted in: Galaxy Scripting
  • 0

    posted a message on String to Text?

    @ImperialGood: Go

    Thanks.

    I more have built frameworks and such. I would probably take a different approach to this, but I guess if that's how they do it. So how do I create an external string table in this setup? How do I declare entries? What file do I create to store them in( extension? )? How do I include the file?

    "That said text probably does have a class as part of its implementation as a type into the galaxy virtual machine. However only Blizzard has access to the source code for that." Yes that is why I used the term class. I'm sure they didn't write their data types in galaxy... Anyways, a class and struct are very similar anyways, the only difference is access rights outside the class.

    Posted in: Galaxy Scripting
  • 0

    posted a message on String to Text?

    I am not really seeing how text-string maps stored in text files are better than global/temp strings. StringExternal requires a table lookup and therefore, is less accessible and is more performance heavy(not that it really matters in this case). Another reason, why I am not doing it that way is, I am doing a lot of string concatenation( this would require serveral lookups to concatenate several "text" types); this reduces the amount of code needed to accomplish my task, to makes it more readable and more dynamic.

    Is there a way to convert text to string? Or even looking at the text class would be nice...

    Posted in: Galaxy Scripting
  • 0

    posted a message on String to Text?

    @ImperialGood: Go

    I suppose that is an option. However, for things that are only used ONCE, creating a text tag, displaying a welcome message and so on, I honestly feel is best to use "Magic Values". I do not and have not declared variables for a simple ONE use value that is self explanatory. It confuses the heck out of me reading Param/Value/SomeHexValue in my code. BTW, where and what is the name of this/these files for the standard map? I just saw, StringToText, guess I will use that.

    Posted in: Galaxy Scripting
  • 0

    posted a message on String to Text?

    For all my code it compiled this garbage... "Param/Value/SomeHexValue". This happened for things such as, TextTagCreate and so forth. Why does it do this? How can I convert a C string to text, so I can pass "" as an argument?

    Posted in: Galaxy Scripting
  • 0

    posted a message on color class

    What is the color type defined as? My guess would be an int_64( not sure what the equivilent in here is ). If so, how are they packing the bytes together into the integer?

    Posted in: Galaxy Scripting
  • 0

    posted a message on Function documentation

    @ImperialGood: Go

    Yea, I guess I just assumed since the first however many files were filed with garbage all of them would be.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Function documentation

    I thought I was looking in the right place, they were all named natives.galaxy. Anyways, thanks that helps a lot!

    Posted in: Galaxy Scripting
  • 0

    posted a message on Function documentation

    @ImperialGood: Go

    I tried all of them, all the files are filled with junk. Can you provide me with the native list?( dropbox/pastebin link? )

    Posted in: Galaxy Scripting
  • 0

    posted a message on Function documentation

    @ImperialGood: Go

    Thanks I have the file now. How am I supposed to read from it though? It is filed with garbage characters and such.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Function documentation

    @ImperialGood: Go

    Thanks for the reply. Which file do I need from the mpq?

    Posted in: Galaxy Scripting
  • 0

    posted a message on Function documentation

    @ImperialGood: Go

    Which mpq do I extract from? Can you give relative file path?

    Posted in: Galaxy Scripting
  • To post a comment, please or register a new account.