• 0

    posted a message on Region/Point Spawn Handling
    Quote from 797785 »

    Run a counter variable to keep track of the currently highest index. Also, you don't need to clear the higher non-used array members, they will be overwritten anyway, once you add new active rooms again. Somewhat like this: <<code galaxy>> add active room ViableSpawnCounter = ViableSpawnCounter + 1 ViableSpawnArray[ViableSpawnCounter] = (opened room) remove active room ViableSpawnArray[RoomToRemoveIndex] = ViableSpawnArray[ViableSpawnCounter] ViableSpawnCounter = ViableSpawnCounter - 1 <</code>>
    I already have a counter setup this way.
    Quote from Kueken531: GoTo get the index of the room, store the index in the room when activating it, maybe using another array or your record, depending on your setup.
    I'm not sure what you mean here. Could you elaborate?
    Quote from Kueken531: GoCould also use the data table for this.
    I thought of doing this, but I don't know how to use data tables or how well it would work so I decided not to. Could you explain what these are used for, what an obvious use would be, and maybe how to do something with it so I can understand better? Or just link me to a tutorial :)
    Posted in: Triggers
  • 0

    posted a message on Region/Point Spawn Handling
    Quote from Kueken531: Go

    Quote:
    You don't need to rebuild the entire array. You can simply put the last array member to the position of the removed member and leave the rest of the array as it is.

    There is no way to take the highest non null(or in this case non 0) value from the array without running a loop to find it, then I will have to run a second loop to find the index needing to be replaced and overwrite it and then erase the highest.

    Currently this seems better than what your suggesting:

            General - For each integer i from 1 to 19 with increment 1, do (Actions)
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            ViableSpawnArray[i] == EntryToRemove
                        Then
                            General - For each integer i from i to 19 with increment 1, do (Actions)
                                Actions
                                    Variable - Set ViableSpawnArray[i] = ViableSpawnArray[(i + 1)]
                            General - Break
                        Else
    
    Posted in: Triggers
  • 0

    posted a message on Region/Point Spawn Handling
    Quote from Kueken531: Go

    @Grimshad: Go

    = line break in WikiCreole, or you could just select a different markup like BBCode.

    So you want to spawn in one of the opened rooms at a time. Why not add an array to keep track of all currently open rooms? Whenever a room is opened, add the room to the array and increment a counter variable. When a room is closed, remove the room from the array, add the last room in the array to the position of the removed one and decrement the counter. Then on spawning, spawn in a random room of this array from 1 to counter. Size of the array would need to cover the biggest possible number of open rooms, or just the maximum room count.

    First: Thanks, and where do I change it to bbcode?

    Second: That's exactly what I'm already doing. The problem is that rebuilding the array every time someone leaves a region is very inefficient. It's also very inefficient to rely on enter/exit region events, but I don't think there is a way around that.

    Posted in: Triggers
  • 0

    posted a message on Region/Point Spawn Handling

    So I started working on a new map. In this map enemy units will spawn in rooms near players in the game and after a few hours of trying different methods of doing this, nothing is working efficiently. Can anyone give me some more ideas?

    My current setup:

    I have a record containing the vars:

    • Region

    • Open

    • numPoints

    • Points[numPoints]

    So each room has a region, a bool for if the room is open or closed, a number of spawn points in the room, and an array holding the points.

    • If a player opens the door to a room or is in a room with a closed door, the room is marked as open.

    • Every time a player enters a room (region) the regions index id is added to an array (viablespawns[20]). This adds the id to next empty index in the array.

    • Every time a player leaves a room (region) and there are no other players in it the regions index id is removed from the array (viablespawns[20]). This rebuilds the array without the removed id.

    • Every 2 seconds the game counts the number of integers in the array, then does a random 1-count to get a random region from the current viable spawns, it checks if the room is open and if not rerolls until it has an open room.

    • Then it randoms 1-numPoints for that region and spawns an enemy in the random region at the random point in the region.

    In the end, I want to spawn enemies at random points in random regions and adjacent regions to the ones the players are located in. The current hacked "dynamic" array is very inefficient. Does anyone have any other ideas on how I could do this?

    And WTF is there seriously no way to do line breaks on this forum?

    Posted in: Triggers
  • 0

    posted a message on Dialog Item Styles Bug SOLUTION

    So there is a bug that happens when you use the trigger action "Set dialog item style" in where after the action is run, your dialog item will reposition itself down and to the right of where it is supposed to be.. Here is the solution.

    I found a work around to the Set Dialog Item style bug that just applies a style to anything all in the same action.

    SOLUTION: For the text field in "Set Dialog Item Text" use:
    Combine Text(<s val="stylename">,Combine Text(Your text or function,</s>))

    So the solution is to wrap the text you want to set as a style in the style wrapper code using 3 text fields, the first is the style opener, the second is your actual text you want to change the style of, it can be anything ,even a function, then the third is the style closer.

    Hope this helps some people!

    Posted in: Triggers
  • 0

    posted a message on [Outdated] SC2Layout Files: How to adjust them

    Messing with the Info Panel again, I found that the override works fine as long as I only override the position. If I try to touch anything inside the other file nothing works.

    Works: http://pastebin.com/sdGLN8uX

    Doesn't work: http://pastebin.com/Ezhv1W3R

    NOTE: Ignore that the tabs in pastebin don't look right, pastebin isn't displaying it correctly, they are correct in my file.

    Posted in: Tutorials
  • 0

    posted a message on [Outdated] SC2Layout Files: How to adjust them

    @Builder_Bob: Go

    If you check the pastebin I posted, I did use the method you posted and It doesn't work... I will post it again: http://pastebin.com/03apPtxK

    Can someone please try to edit the Infopanel and have it work before they post solutions that don't work?

    Posted in: Tutorials
  • 0

    posted a message on [Outdated] SC2Layout Files: How to adjust them

    I've tried everything I can think of and it seems that you can only change things in the GameUI file. After over 20 hours of trying different things I still can't get this to work. I can override any values I want in the GameUI just fine, but if I try to touch any other file nothing happens.

    Here is my attempt to override the InfoPanel file, Just for verification that it worked, I changed the offsets of the behavior frame to 50 50 and I swapped the locations of the life and energy text. Nothing happens in game though (as usual). Here is my xml: http://pastebin.com/03apPtxK

    Someone please tell me i'm doing something horribly wrong and that I can make it work fine by simply adding an = sign somewhere :)

    Posted in: Tutorials
  • 0

    posted a message on SC2 Dialog Designer (Map) [Beta 3.5]

    @Doubotis: Go

    I think the rotation not working was caused by the image I was using. Your rotation setting probably works fine.

    For exporting text, you should probably make a map version for each language, because this is an important aspect, especially for dialogs that are meant to be static or story telling.

    I also noticed there is a pretty small limit on the # of characters allowed per label, I don't know if its your tool or blizzards restriction, but it sucks.

    Posted in: Project Workplace
  • 0

    posted a message on SC2 Dialog Designer (Map) [Beta 3.5]

    I had very high hopes for this tool. But I noticed a few bugs:

    1. When changing the name of a object it sometimes won't let you change the name because it's trying to prevent there from being duplicate names, you should make it only check for the duplicate name after unfocusing the text box.

    2. When you duplicate an object, It doesn't save its relativity to other objects.

    3. After about 40 objects I could no longer edit any objects because the drop down menu went up instead of down.

    4. Rotating an image doesn't not work at all

    5. If you remove an object, the names of every object will cascade. meaning if you have object 1 2 3 4 and 5, then you delete object 3, You will now have object 1 2 3 and 4.. when you delete 3, it will remove the name of 5 and move each name down 1 so the object named 3 will now be named 4 and the object named 4 will now be named 5. It's very confusing and a really bad bug :\

    6. When I saved and re-imported my dialog, 3 of the dialog items lost their relativity, and the dialog itself was reset to top anchor instead of bottom anchor.

    I'm also a little stumped as far as how to go about getting my dialog in my map. I copied and pasted a full dialog into create full dialog using a macro. only 50% of my dialog showed up in game, and in the wrong spot too and with tons of mission elements. Then I did up the dialog and each item individually, because I figured if I did it that way I could assign the dialog items to variables and change their texts. Unfortunately, this is not the case either.

    I am using my dialog as a leaderboard, so I need to access my dialog items individually to change their content. There is no way that I have found to do this using the dialog designer. I know this tool is supposed to save you time, but it turns out to waste time since you just have to redo everything using triggers again anyway.

    Here are some screenshots of what i'm talking about:

    Here you can clearly see what I WANT, you can also see the too many objects pulldown bug in the top right. Notice also that it is anchored to the bottom, and full of text. Note: The blue images are supposed to be upside-down so their flat edge fits up with the red ones, but this tool did nothing when I changed the image rotation. https://picasaweb.google.com/Grimshad/Mar252011#5588072882926817698

    Here you can see how it was moved over to my map, notice it's now on the top, not lined up, and missing all text. NOTE: The same thing on the bottom was made with triggers, just ignore that one. https://picasaweb.google.com/Grimshad/Mar252011#5588072897049060610

    Posted in: Project Workplace
  • 0

    posted a message on [Outdated] SC2Layout Files: How to adjust them

    Solved

    Posted in: Tutorials
  • 0

    posted a message on Some questions:

    I just had a few questions if anyone knows the answers that would be great :)

    1. While I have been able to get my custom game sounds to work more so the way I want them to I still can't get it exact(previously all other game sounds played over my sounds, now my sounds play over almost all other game sounds). My question is: Does anyone know a way to queue up sounds (if 2 play at the same time, put the second in a queue so it plays directly after the first)? Also does anyone know how to stop any other sounds that are playing and play a specific sound of my choosing? There is a very important sound I need played, but it doesn't play if other sounds are playing, It needs priority over everything else.

    2. Is there a way to create your own filter? For example, in the data editor you can mark a unit as "Armored". Is there a way to create a custom filter to tag a unit as?

    3. With the new update I am getting 3 errors I can't find any information on:

    WARNING: Can only create one CActorAction per effect [ClaimTurret].

    WARNING: Can only create one CActorAction per effect [PhotonCannonLM].

    WARNING: Data configuration error; ActionImpact message arrived before commenced.

    Anyone know anything about this?

    Posted in: Data
  • 0

    posted a message on Precinct Assault[Alpha] + Video Trailer

    @DuckyTheDuck
    I don't have an EU account so as far as i know that is impossible. Sorry :(

    I will be adding an AI. The AI can already play it, but isn't optimized for the map. Right now versus is the main focus though because everyone that does play it wants competitive multiplayer.

    @johnnythewolf
    Yes, thats because the narration is professional :) The audio was taken from the original how-to-play video which you can find on youtube

    Now that blizzard has updated the popularity system and fixed a bunch of stuff in the editor that was holding me back before, expect a bunch of updates and new content! :)

    Posted in: Map Feedback
  • 0

    posted a message on Precinct Assault[Alpha] + Video Trailer

    Lovely, 3 months and no one checked out my map :)

    Posted in: Map Feedback
  • To post a comment, please or register a new account.