Hello again,
I'm trying to make my battle system to transition into a new scene and load a battle upon loading that scene. I have the scene setup with a Battle object that is set to auto start. However upon loading into the scene no battle menu UI loads in, nor does any prefabs load in or anything. Doesn't seem like the event is starting at all, I was wondering if anyone could provide any insight into why this may be.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I have the events setup like the tutorial you linked me, and have them set into the battle event. The battle event is placed in the main scene with a start type UI. I have a button that activates with the Battle event slotted in On Click() - BattleComponent.UIStart, but still nothing happens on click. The battle never seems to load. I wondered if a blocking event was causing this or something but I checked and didn't have any blocking events active.
Thanks for the help. I'm going to keep trying to tinker with it in the meantime.
EDIT: Wow literally as I post this it works. So it seems to be spawning in my combatants but I don't see any of my prefabs spawning for my combatants. Would this be a battle spot positioning issue? The menu also pops up for my options like skills, items, etc but it doesn't let me click on them accurately which I'm assuming is something I have to fix with my GUI boxes.
- either not using Scene ID or the defined ID wasn't used by another battle (i.e. marked as battle finished for that ID)
- the battle's combatants are in an enemy faction (i.e. enemies of the player)
- the variable/quest conditions are valid
Naturally, the used start type also has to work, e.g. Trigger Enter can only work if you've got a trigger attached to the battle and rigidbodies are involved to cause the trigger enter :)
Also, if the battle should start via the start type during blocked player controls, enable In Blocked Controls.
As for the spawning - that's something you need to do in the battle start event you're using, so I'd check there :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I was going through the battle event and taking a look at the battle spots and I did have some predefined but they still wouldn't spawn in the scene. I was hoping to use custom battle spots by using an object but since I will be loading my battle in a separate scene, would the only way to define my spawn points by object in the battle scene to define those spots as a global object?
I just can't seem to figure out how to setup the spawn points in the next scene by object since my battle will be taking place in another scene if that makes sense.
Alternatively, you can also have the battle set up in the scene and start it via Autostart start type - but you might need to use a short delay (Start After setting) or use the In Blocked Control setting to be able to start it when loading the scene. When using this, you need to load the scene from e.g. a scene changer or a game event, but not from another Battle component, as that'll already have a battle going on and prevent the one in the scene from starting.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
The other thing I figure I might as well ask here, is a couple GUI box related questions.
1. I'm setting up my GUI box for my battle menu, I want to be able to click on the separate buttons to activate them but it seems like no matter where I click on the screen it activates the same currently selected one and doesn't allow me to select others without using a input key on my keyboard.
2. Is there a way to activate a custom UI Image at the same time as these battle menus activate, and then deactivate it? I figured out a solution for this when it comes to dialogue in game but was wondering if you had an easy way to link the battle menu to it.
Thanks again so much really.
1) Hm, by any chance, did you set an input key with mouse click as your accept button?
2) You could use the potrait settings of the battle menu, but the portrait would be displayed the whole time and not go away after some time.
As an alternative solution, you can use turn start events to e.g. show a notification/auto close dialogue for your image. Turn start events are set up in Battle System > Battle Settings for all combatants and can be overridden by each combatant individually. They basically use a game event at the start of a combatant's turn.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
1. Yes I have a accept input tied to my Mouse click to advance dialogue in my scene. Would that be throwing it off? If so is there a particular setting I can change to fix this?
2. I think the battle turn start events are going to be the way to go messing around with it, appreciate it thank you lots.
Or, if your camera is part of the event object, that'll be carried over (while the event runs) to the next scene and destroyed after the event is finished.
Not starting could also be a timing issue, but that should be fixed when using a short delay (Start After) and/or enabling In Blocked Control in the battle component.
1) Yes, because every mouse click is handled as an accept input, so it'll accept the selected choice. You could override the menu controls in your battle menu's GUI box to use a different input key (e.g. a None key) as accept, or use cursor over selection to automatically select what's below the cursor.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I was messing around with it a bit and I found that the most likely reason why it was sometimes working and sometimes not is that because I was accidentally trying to spawn my player combatant in the battle event in the battle settings rather than it just spawning the combatant that was already in my party. Working 100% of the time now after numerous tests.
The cursor over selection works well thank you.
I had one more additional question that I may as well throw here rather than starting a new thread.
So I'm working on getting my GUI boxes setup with the UI elements I want. I've placed a PNG image in the GUI Base Skin that I want to be shown as the box around the content. For the most part this works extremely well but I ran into an issue.
Upon fading in and out the content box it seems like it works weird at certain times. I've added a video below for you to see exactly what I'm talking about, but basically it looks like after the first initial window fade it is repeatedly added the next UI box on instead of waiting for the next event to start before fading in again. I double checked all my settings and they all have the wait button checked. Another weird this is that it will wait to popup in this first scene here, but when it transitions to my next scene and has a dialogue event it will immediately show the box rather than waiting for the fade. This happens even when applying a "Wait" node with a time value.
Does this make sense how I'm explaining it? Do you know why it would be spawning those UI boxes before its dialogue event even happens?
Heres the video, thanks a lot gamingislove.
Vid: https://webmshare.com/play/wZow0
You can string multiple dialogues together by putting them into a single dialogue node and using the Page End text code (#>) between them.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I would use that string method but I have nodes I want to happen between the next dialogue showing in the event.
For reference here is the settings between the two dialogue nodes in the video above as well as my event settings: https://imgur.com/a/kegTq0T
They appear to have the exact same settings its just it shows the 2nd GUI box before the dialogue even appears meaning its seemingly constant on the screen until the last dialogue node is closed out in the event.
Edit: Hmm upon changing the event settings in that scene to a Blocking Event it appears to be working functionally fading in the boxes and out at the appropriate times. But when adding a Blocking event to my second scene that this one loads into, it doesn't start the scene event at all so hm I'm stumped kind of. Any solutions you can offer?
E.g. if in your 2nd scene there's an autostart event, but your scene transition is coming from a blocking event, that event will still be running when loading the scene. A little delayed start (Start After setting in the interaction) should solve that.
Otherwise, don't use blocking events if you don't really need them :)
Regarding the GUI boxes - check if your box close behaviour's fade is set up correctly, e.g. if you by accident set it up to fade out from alpha 0 to full alpha it'd fade in again instead of fade out (and be removed afterwards).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I've checked the GUI fades too. It works the right way for the first two GUI boxes of my entire game, and then it falls apart and displays a GUI box basically until all of my event nodes are finished like I described earlier. Messed around with the Fade Settings and Event ones to see if I can fix this but I can't. Do you need any other information from me in order to help? Really can't figure out why this is occurring like this.
Like I said before too, the 2nd scene that loads seemingly pops up a GUI box right away even though the dialogue node event is 5 nodes away from the start of the event , and even with a wait node placed too.