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.
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:
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 :-\
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.
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:
Import sounds, create "sounds" for each of them under data editor, import all as cues into soundtrack (and unflag "continuous" in that soundtrack)
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:
PlaySoundtrackEventsLocalVariablesConditionsActionsGeneral-Repeat(Actions)foreverActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If------- If someone is trying to get to a cue that is a negative number, set them to the first track.currentSoundtrack<=0ThenVariable-SetcurrentSoundtrack=0ElseGeneral-If(Conditions)thendo(Actions)elsedo(Actions)IfcurrentSoundtrack>maxSoundtrackIndexesThen------- If we are at the end of the soundtrack, start from beginning.Variable-SetcurrentSoundtrack=0Else------- Play the soundtrack "MyMusic" with the cue number (aka track number) "currentSoundtrack"Sound-PlayMusicMyMusic(AnySoundtrackIndex)for(Allplayers)(withcuecurrentSoundtrack)andDoNotmakedefaultSound-WaitforMyMusicplaybacktoend------- 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)thendo(Actions)elsedo(Actions)Ifclicked>=1ThenVariable-Setclicked=0ElseVariable-ModifycurrentSoundtrack:+1
Here's the dialog code:
DialogButtonHandlerEventsDialog-AnyDialogItemisusedbyPlayerAnyPlayerwitheventtypeClickedLocalVariablesConditionsActions------- Actions for "Pause" Btn:General-If(Conditions)thendo(Actions)elsedo(Actions)If(Useddialogitem)==PauseBtnThenGeneral-If(Conditions)thendo(Actions)elsedo(Actions)IfPauseValue==0ThenVariable-SetPauseValue=1Dialog-SetPauseBtntextto"Resume"for(Allplayers)Dialog-SetPauseBtntooltipto"Resume Soundtracks"for(Allplayers)Sound-PauseMusicsoundtrackfor(Allplayers)(AfterFading)General-SkipremainingactionsElseVariable-SetPauseValue=0Dialog-SetPauseBtntextto"Pause | |"for(Allplayers)Dialog-SetPauseBtntooltipto"Pause Soundtrack"for(Allplayers)Sound-UnpauseMusicsoundtrackfor(Allplayers)(AfterFading)General-SkipremainingactionsElse------- Actions for "Next" Btn:General-If(Conditions)thendo(Actions)elsedo(Actions)If(Useddialogitem)==nextBtnThenVariable-Modifyclicked:+1Variable-ModifycurrentSoundtrack:+1Else------- Actions for "Previous" Btn:General-If(Conditions)thendo(Actions)elsedo(Actions)If(Useddialogitem)==previousBtnThenVariable-Modifyclicked:+1Variable-ModifycurrentSoundtrack:-1ElseTrigger-StopallinstancesofPlaySoundtrackTrigger-RunPlaySoundtrack(CheckConditions,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!
Here is the (updated) code I'm using (same problem) in non-image format:
(Trigger for Dialog)
CreateOpen/NewDialogEventsLocalVariablesConditionsActionsDialog-CreateaNon-modaldialogofsize(600,400)at(0,0)relativetoCenterofscreenVariable-SetSaveDialog=(Lastcreateddialog)Dialog-HidethebackgroundimageofSaveDialogDialog-Createanimagefordialog(Lastcreateddialog)withthedimensions(300,300)anchoredtoTopRightwithanoffsetof(5,0)settingthetooltipto"Create New Save"usingtheimageEditorData\Images\ToolbarNew.tgaasaNormaltypewithtiledsettofalsetintcolorWhiteandblendmodeNormalDialog-CreateabuttonfordialogSaveDialogwiththedimensions(300,100)anchoredtoBottomRightwithanoffsetof(0,0)settingthetooltipto""withbuttontext"New Game "andthehoverimagesetto""Variable-SetNewBtn=(Lastcreateddialogitem)Dialog-Createanimagefordialog(Lastcreateddialog)withthedimensions(300,300)anchoredtoTopLeftwithanoffsetof(5,0)settingthetooltipto"Open Previous Save "usingtheimageAssets\Textures\ui-editoricon-general_open.ddsasaNormaltypewithtiledsettofalsetintcolorWhiteandblendmodeNormalDialog-CreateabuttonfordialogSaveDialogwiththedimensions(300,100)anchoredtoBottomLeftwithanoffsetof(0,0)settingthetooltipto""withbuttontext"Load Previous"andthehoverimagesetto""Variable-SetLoadBtn=(Lastcreateddialogitem)Dialog-DisableLoadBtnfor(Allplayers)Dialog-ShowSaveDialogfor(Allplayers)Dialog-ShowNewBtnfor(Allplayers)General-If(Conditions)thendo(Actions)elsedo(Actions)If(BankcBnakhas"ZeeLocation"insection"one")==trueThenDialog-EnableLoadBtnfor(Allplayers)ElseDialog-ShowLoadBtnfor(Allplayers)
And here is the result of that trigger on the "on Load" click:
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.
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.
0
@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.
0
@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:
[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.
0
@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.
0
@trentonx: Go
... what?
0
@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 :-\
0
@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:
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.
0
@Tekaichi: Go Click on the line in the red circle and drag to the right about three-four inches, that should reveal everything else.
0
@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.
0
@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:
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:
Here's the dialog code:
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!
0
Here is the (updated) code I'm using (same problem) in non-image format:
(Trigger for Dialog)
Trigger for (Detect Button Pressed)
And here is the result of that trigger on the "on Load" click:
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.
0
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 this image/View Image in Same Window
Open this image/View Image in Same Window
I appreciate any help - Thanks :)