• 0

    posted a message on I have 12 starting locations. How do I pick a specific location?

    @DerNalia: Go

    Create points on your map where you would normally utilize your start locations, then reference those points in a variable, then reference that variable when players are picking their points and their start locations are started on the map.

    Posted in: Triggers
  • 0

    posted a message on I have 12 starting locations. How do I pick a specific location?

    @DerNalia: Go

    My solution would be to create a dialog when the map initializes, have each player pick a race there and then a location (the location could only be chosen by one player, obviously) and then (say, when a time runs out) run the following:

            Melee - Create [Race] melee starting units for [player 1] at [Position]
            Melee - Set [Race] melee starting resources for [player 1]
            Melee - Start the melee AI for all computer players
            Melee - Set default melee options for all players
    

    [Race] and [player 1] would each clearly have to be stated in a variable, alongside the [Position]. (Game Link/Integer/Point, respectively)

    Hope that little bit can help.

    Posted in: Triggers
  • 0

    posted a message on Camera Centered on Unit or Structure

    @trentonx: Go

    Your event would be "Every time 'Any Unit' enters 'Region 1': and action would be "Issue order (triggering unit) to attack (point 1)"

    Your English was iffy so I wasn't sure what you were talking about.

    Posted in: Triggers
  • 0

    posted a message on Camera Centered on Unit or Structure

    @trentonx: Go

    ... what?

    Posted in: Triggers
  • 0

    posted a message on Soundtrack Variable

    @HeroLief: Go

    What I've done is put your audio in a soundtrack file itself and I'm still coming up with the triggers... It might already work, the only problem I think I have now is it won't auto-play, and if you try to make it, it gets angry :-\

    Posted in: Triggers
  • 0

    posted a message on Camera Centered on Unit or Structure

    @Maxwell55555: Go

    Convert the unit wished to a unit group, then do an action for the camera to "follow a unit group" or do it all in one trigger:

                    Camera - Follow for player 1 (Unit group(( SELECT YOUR UNIT HERE ))) with the camera and Clear Current Target
    

    More than likely you'll want to do a loop to do this for each player. If I were doing this I'd create the units in the trigger at certain points, to me that would be easiest.

    Note, If you do this "follow a unit group" action, the minimap will not be usable and I'd also recommend using the "lock camera input" under the camera section too, so the player cannot change the viewing angle of your perspective.

    Posted in: Triggers
  • 0

    posted a message on Triggers Name's not showing

    @Tekaichi: Go Click on the line in the red circle and drag to the right about three-four inches, that should reveal everything else.

    Click on the line in the red circle

    Posted in: Triggers
  • 0

    posted a message on Soundtrack Variable

    @HeroLief: Go

    lol I had mine playing two songs at once too - and I'll take a look, let you know if I figure anything out.

    Posted in: Triggers
  • 0

    posted a message on Soundtrack Variable

    @HeroLief: Go

    As long as your soundtrack is not flagged as "continuous" and all of your sound tracks for your soundtrack is in that one soundtrack (cues) you can try this method:

    1. Import sounds, create "sounds" for each of them under data editor, import all as cues into soundtrack (and unflag "continuous" in that soundtrack)
    2. Trigger time!

    The way I did it, I created four variables (besides my dialog buttons for the media player): "currentSoundtrack", "maxSoundTrackIndexes", "PauseValue" and "clicked." The soundtrack in my sample is called "MyMusic." (if you download and utilize my map to test, the soundtracks are two back-and-forth dialogues for some of my other maps, clearly not musical soundtracks)

    Besides the map initialization (wherein the dialog is created and I call the trigger "Play Soundtrack") there are two triggers: one to handle the soundtrack, the other to handle your dialog buttons.

    The "Play Soundtrack" trigger looks like this:

    Play Soundtrack
        Events
        Local Variables
        Conditions
        Actions
            General - Repeat (Actions) forever
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            ------- If someone is trying to get to a cue that is a negative number, set them to the first track.
                            currentSoundtrack <= 0
                        Then
                            Variable - Set currentSoundtrack = 0
                        Else
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            currentSoundtrack > maxSoundtrackIndexes
                        Then
                            ------- If we are at the end of the soundtrack, start from beginning.
                            Variable - Set currentSoundtrack = 0
                        Else
                     ------- Play the soundtrack "MyMusic" with the cue number (aka track number) "currentSoundtrack"
                    Sound - Play Music MyMusic (Any Soundtrack Index) for (All players) (with cue currentSoundtrack) and Do Not make default
                    Sound - Wait for MyMusic playback to end
                     ------- The following is a condition to alleviate a "skip" issue due to a "trigger calling a trigger" and the programming doing some funny things.
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            clicked >= 1
                        Then
                            Variable - Set clicked = 0
                        Else
                            Variable - Modify currentSoundtrack: + 1
    

    Here's the dialog code:

    Dialog Button Handler
        Events
            Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
        Local Variables
        Conditions
        Actions
            ------- Actions for "Pause" Btn:
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Used dialog item) == PauseBtn
                Then
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            PauseValue == 0
                        Then
                            Variable - Set PauseValue = 1
                            Dialog - Set PauseBtn text to "Resume" for (All players)
                            Dialog - Set PauseBtn tooltip to "Resume Soundtracks" for (All players)
                            Sound - Pause Music soundtrack for (All players) (After Fading)
                            General - Skip remaining actions
                        Else
                            Variable - Set PauseValue = 0
                            Dialog - Set PauseBtn text to "Pause | |" for (All players)
                            Dialog - Set PauseBtn tooltip to "Pause Soundtrack" for (All players)
                            Sound - Unpause Music soundtrack for (All players) (After Fading)
                            General - Skip remaining actions
                Else
            ------- Actions for "Next" Btn:
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Used dialog item) == nextBtn
                Then
                    Variable - Modify clicked: + 1
                    Variable - Modify currentSoundtrack: + 1
                Else
            ------- Actions for "Previous" Btn:
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Used dialog item) == previousBtn
                Then
                    Variable - Modify clicked: + 1
                    Variable - Modify currentSoundtrack: - 1
                Else
            Trigger - Stop all instances of Play Soundtrack
            Trigger - Run Play Soundtrack  (Check Conditions, Don't Wait until it finishes)
    

    If any of this doesn't make sense, let me know, I'll explain why - hopefully you can edit this to your needs. I thought this was an easy five-minute answer, and I've spent nearly three hours arguing with the triggers to get it to work right! :D

    PS, the fourth "soundtrack" / cue does have a swear word in it, you are warned! Good luck!

    Posted in: Triggers
  • 0

    posted a message on Loading Banks - "End of Campaign" Preview??

    Here is the (updated) code I'm using (same problem) in non-image format:

    (Trigger for Dialog)

    Create Open/New Dialog
        Events
        Local Variables
        Conditions
        Actions
            Dialog - Create a Non-modal dialog of size (600, 400) at (0, 0) relative to Center of screen
            Variable - Set SaveDialog = (Last created dialog)
            Dialog - Hide the background image of SaveDialog
            Dialog - Create an image for dialog (Last created dialog) with the dimensions (300, 300) anchored to Top Right with an offset of (5, 0) setting the tooltip to "Create New Save" using the image EditorData\Images\ToolbarNew.tga as a Normal type with tiled set to false tint color White and blend mode Normal
            Dialog - Create a button for dialog SaveDialog with the dimensions (300, 100) anchored to Bottom Right with an offset of (0, 0) setting the tooltip to "" with button text "New Game " and the hover image set to ""
            Variable - Set New Btn = (Last created dialog item)
            Dialog - Create an image for dialog (Last created dialog) with the dimensions (300, 300) anchored to Top Left with an offset of (5, 0) setting the tooltip to "Open Previous Save " using the image Assets\Textures\ui-editoricon-general_open.dds as a Normal type with tiled set to false tint color White and blend mode Normal
            Dialog - Create a button for dialog SaveDialog with the dimensions (300, 100) anchored to Bottom Left with an offset of (0, 0) setting the tooltip to "" with button text "Load Previous" and the hover image set to ""
            Variable - Set Load Btn = (Last created dialog item)
            Dialog - Disable Load Btn for (All players)
            Dialog - Show SaveDialog for (All players)
            Dialog - Show New Btn for (All players)
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Bank cBnak has "ZeeLocation" in section "one") == true
                Then
                    Dialog - Enable Load Btn for (All players)
                Else
            Dialog - Show Load Btn for (All players)
    

    Trigger for (Detect Button Pressed)

        Events
            Dialog - Any Dialog Item is used by Player 1 with event type Clicked
        Local Variables
        Conditions
        Actions
            ------- Load Previous Game
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Used dialog item) == Load Btn
                Then
                    Dialog - Hide SaveDialog for (All players)
                    Camera - Lock camera input for player 1
                    Camera - Apply (Default game camera) for player 1 over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Include Target
                    Camera - Follow for player 1 ug with the camera and Clear Current Target
                    Unit Selection - Select Zee (Prisoner) [110.11, 90.15] for player 1
                Else
    { Code for New Game}
    

    And here is the result of that trigger on the "on Load" click:

    Stupid Screen

    I attached the actual file, maybe someone can help me? I appreciate any help, thanks :) I'm kind of anal when it comes to testing out new functions so this map is getting quite annoying when I'm trying to save my progress at a certain point and then upon trying to check out a new implemented action/element of the game I have to start from square one all over again lol.

    Posted in: Triggers
  • 0

    posted a message on Loading Banks - "End of Campaign" Preview??

    I'm pretty new at programming within the Galaxy Editor... I'm just experimenting with lots of different functions and have created a basic one-player RPG and I'm experimenting with banks. When the map initializes, a dialog pops up asking to start a new game or if there is a previous save, to load said previous save if one exists. The dialog works fine.

    However, whenever I choose to "load" my saved hero & some basic variables, the "end of campaign" screen pops up and there's no way to remove it. I believe my map is still active in the background, however I can't access it. I've spent hours staring at the few actions that are utilized when loading and I can't figure out why that damn screen keeps popping up! Can anybody review my code and let me know if I screwed up or something?

    PS - There are no triggers that enact following the conclusion of the pasted trigger except one that enables/disables UI stuff (that trigger is shown also). PS 2 - even if I take out all the events within the "load" trigger, I still receive the screen.

    Open Previous Game Trigger Open this image/View Image in Same Window

    DisableUI Trigger Open this image/View Image in Same Window

    I appreciate any help - Thanks :)

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