• 0

    posted a message on "X" Amount of "unit A" go to "Region B". Remove "X" amount of "unit A" in "region B", make "Unit C" In "Region B"

    Oh like a TD? I don't have my editor handy to make a trigger for you (I can latter if you want) but its basically your event will be game time expired = 120 second then your events will be to spawn however many units you want and order them to attack move to the target (or just to move if you don't want them to stop and kill units on the way) You need some more complicated stuff for an Anti block system (if they don't attack defenders you will want one of these) You can find a system for that here link But it is not really related to what Keyafay was asking for IMO anyway.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Spawning units for "playing" players

    You could do it like this

    Spawn Units for Active Players
        Events
            Game - Map initialization
        Local Variables
        Conditions
        Actions
            General - If (Conditions) then do multiple (Actions)
                If Then Else
                    General - Else if (Conditions) then do (Actions)
                        Else If
                            (Status of player 1) == Playing
                        Then
                            Unit - Create 1 SCV for player 1 at (Center of Example Region) facing 270.0 degrees (No Options)
                    General - Else if (Conditions) then do (Actions)
                        Else If
                            (Status of player 5) == Playing
                        Then
                            Unit - Create 1 Zealot for player 1 at (Center of Example Region) facing 270.0 degrees (No Options)
    

    Whereas the SCV represents a Runner Unit and the Zealot represents a Hunter unit. You can copy and paste the If then's and do it for every player in the game. You might want to change it so that hunters are spawned in a different region or later than the Runners (to make it later just put it in a different trigger that happens say after 5 mins or whatever)

    Hope that helps, I can attach the example map if you need but its pretty simple to replicate.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Saving in-game typed text into on-screen text tags

    No offence meant but LinkD's trigger looks to me like it should properly work except for the fact that the text tag wont go anywhere (its being spawned at a nonexistent point because that event doesn't have a triggering unit) If you want it to attach it to the structure selected then you can use these events.

    If you want it to attach the text tag to the unit you selected add this action to the bottom of LinkD's trigger

    Text Tag - Attach (Last created text tag) to (Random Living unit from (Selected units for player (Triggering player))) with height offset 1.0

    If you add My event you might want to add the fallowing conditions

    (Number of Living units in (Selected units for player (Triggering player))) == 1 ((Unit type of (Random Living unit from (Selected units for player (Triggering player)))) has Structure attribute) == true

    The first makes sure you only have 1 unit selected (if you don't add this it will attach the tag to a random unit you selected and may crash if you have nothing selected)

    The second makes sure its a structure (you said attach to building so I assume your not supposed to be allowed to attach it to a unit as well, if you are supposed to be just leave this out)

    Hope that helps and I am not trying to hijack your advice LinkD just trying to help

    Posted in: Miscellaneous Development
  • 0

    posted a message on "X" Amount of "unit A" go to "Region B". Remove "X" amount of "unit A" in "region B", make "Unit C" In "Region B"

    @Keyafay Is this what you are looking for?

    Convert
        Events
            Unit - Any Unit Enters Example Region
        Local Variables
        Conditions
            (Unit type of (Triggering unit)) == Marine
            (Number of Living units in (Marine units in Example Region owned by player (Owner of (Triggering unit)) matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) >= 5
        Actions
            Unit Group - Pick each unit in (Marine units in Example Region owned by player (Owner of (Triggering unit)) matching Excluded: Missile, Dead, Hidden, with at most 5) and do (Actions)
                Actions
                    Unit - Kill (Picked unit)
            Unit - Create 1 Ghost for player (Owner of (Triggering unit)) at (Center of Example Region) facing 270.0 degrees (No Options)
    

    Example Map is attached (It has some other triggers in it that are not related to this ignore everything except the trigger called "Convert")

    @KardofFaces I am afraid I don't quite understand your request. Are you asking that say 50 zerglings can sacrifice themselves in a region to destroy the opponents command center? You might be able to figure it out by examining what I did for Keyafay if you can't please clarify your request.

    Hope that helps

    Posted in: Galaxy Scripting
  • 0

    posted a message on Typing in the wrong code.....

    Here is the example map. Glad it helps

    Posted in: Miscellaneous Development
  • 0

    posted a message on New to map editing; have a few conceptual questions

    Judging by the fact that the entire campaign (including the Hyperion) was done in the Galaxy editor I would assume that all the things you talk about would be possible in a single player campaign (not sure about a multi player map). Transitioning between maps and storing data between them is definetly possible via banks there are several tutorials on how to use them on this site.

    Hope that helps

    Posted in: Miscellaneous Development
  • 0

    posted a message on Spawn a unit via button?

    I assume you removed the marauders dependencies (when I tried this it said I needed an attached tech lab so I just used build marine instead) and have enough minerals and vespian gas to build one. (if any of those conditions were not met it would give you a warning message). When I tried it with a marine it built fine, note that it still take like 20 seconds (I don't remember marine build time off the top of my head) to construct and if the SCV takes any action (moves builds something else attacks ect) during that time the build will cancel.

    If you want it to take time to train you can just leave it as it is and if you want it to show a build queue and disable actions during build (like a normal barracks) add the ability Build in progress and Queue(5) to the SCV. If you want it to just build instantly ether base it off of a spawn ability not a train ability or set marauders build time to 0.

    Hope that helps

    Posted in: Miscellaneous Development
  • 0

    posted a message on Typing in the wrong code.....

    Its not as complicated as you might think. Really quite simple actually (although you might invest extra work making it more pretty than this).

    First we have a trigger that allows the Player to record something in a global variable (you might use an Array if you plan to have multiple recordings/Multiple players)

    At this point make a global string variable called Book

    Record Message
        Events
            Game - Player Any Player types a chat message containing "-record", matching Partially
        Local Variables
        Conditions
        Actions
            Variable - Set Book = (Substring((Entered chat string), 8, 30))
    

    That will record Anything said after -record up to 22 characters (30 - 8 = 22) if it needs to be more than that you can just set 30 to something higher

    Then we use a second trigger to display the message when desired

    Display Message
        Events
            Game - Player Any Player types a chat message containing "-book", matching Exactly
        Local Variables
        Conditions
        Actions
            UI - Display (Text(Book)) for (Player group((Triggering player))) to Subtitle area
    

    And there you have it a simple recording system.

    Now for the Testing if its correct. As I have no idea what your character will be I used a battle-cruiser because they are cool and I assumed by a certain location you meant a region (just put a region where you want it in the region layer) Note if this game is multi player you should have it filter to make sure that the player who owns the unit is the one typing the message (I set it to player 1)

    Test Message
        Events
            Game - Player 1 types a chat message containing "-", matching Partially
        Local Variables
        Conditions
            (Battlecruiser [120.17, 125.96] is in Example Region) == true
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Entered chat string) == "-4352"
                Then
                    ------- Let the Unit pass (howerver you plan to do that, Teleport, kill blocker, whatever)
                Else
                    ------- Spawn whatever Units/effects you want and kill the unit
    

    And there you have it

    Hope that helps. I can upload my example map if you want

    Posted in: Miscellaneous Development
  • 0

    posted a message on Region help

    Not sure if its the most efficient way to do it but this sounds like what your looking for

    Example Trigger
        Events
            Unit - Any Unit Enters Example Region
        Local Variables
        Conditions
            Or
                Conditions
                    (Owner of (Triggering unit)) == 1
                    (Owner of (Triggering unit)) == 2
        Actions
            ------- Whatever acctions you need to spawn your ambush go here
    

    If you want the ambush to only fire once make it so that the trigger is turned off at the end of the actions

    Hope that helps

    Posted in: Miscellaneous Development
  • 0

    posted a message on Need help mini-games

    I'm not certain exactly what you are asking for but I think you asking how to make a system for wining or losing the entire game based on which player won the most mini games? Basically just make a global array integer variable called "Wins" or something like that make it as big as you have players so if you have 12 players it should be size 12. Then go to whatever triggers control your mini-game win conditions (if those are the triggers your trying to make please clarify and tell me the rules of the mini-games well) and set Wins[player number of the player who just won the mini-game] + 1 then check if there score is enough to win the game (I don't know what your final victory condition is but I imagine you just have to win a certain amount of games which you can just do with an if then else and an integer comparison). I know thats all a bit vague but your description is also very vague you will need to clarify it if you want better instructions.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Need help mini-games

    To know exactly how to do it you would need to tell us how you plan to start your minigames (Are they run by triggers? or just already set up on the field. If they are run by trigger at the insert points have an action that runs the desired trigger. If they are already set up on the field just make an action that teleports the players there. Note if you have a large amount of different possible minigames you might want to use a loop rather than copying and pasting over and over

    (general idea of how to do it without a loop)

    Random minigame
        Events
        Local Variables
            Rnd = 0 <Integer>
        Conditions
        Actions
            Variable - Set Rnd = (Random integer between 0 and 5)
            General - If (Conditions) then do multiple (Actions)
                If Then Else
                    General - Else if (Conditions) then do (Actions)
                        Else If
                            Rnd == 1
                        Then
                            ------- Insert whatever actions you need to start the first minigame here
                    General - Else if (Conditions) then do (Actions)
                        Else If
                            Rnd == 2
                        Then
                            ------- Insert whatever actions you need to start the second minigame here
            ------- Continue in this fassion for as many Minigames as you have
    

    (general idea of how to do it with a loop)

    Random minigame
        Events
        Local Variables
            Rnd = 0 <Integer>
            Loop (int) = 0 <Integer>
        Conditions
        Actions
            Variable - Set Rnd = (Random integer between 0 and 5)
            General - For each integer Loop (int) from 1 to 10 with increment 1, do (Actions)
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            Rnd == Loop (int)
                        Then
                            ------- Run a minigame corisponding with the number of loop (int)
                        Else
    

    Thats how I would do it anyway. Hope it helps

    Posted in: Miscellaneous Development
  • To post a comment, please or register a new account.