AC and Bolt are both very complex assets, and can be used to do a great number of things. An answer to a question like this would largelt depend on how they are used together. What is it specifically you're looking to do with them as a pair?
Hi, Chris. I have the same question but in more detail.
1. What is the best way of hijacking movement from AC to control character only with Bolt while fully retaining all other AC features like interactions? I have a platformer-like character controller done in Bolt that would let me achieve something similar to Night in the Woods. http://www.nightinthewoods.com/
2. Can Bolt be used for minigames? Let's say there's a door. The door is unlocked via a minigame done completely in Bolt. To do this I'd need Bolt to communicate with AC to some extent. I guess it could be done with the variable link script?
AC interacts with the door which then sets AC global variable boltMinigame=true
boltMinigame=true is synced with Bolts application variable
Every frame Bolt checks if boltMinigame=true (definitely not efficient but it should work, right?)
If boltMinigame=true the actual minigame is instantiated on screen.
Successfully finish the minigame which sets doorOpen=true and syncs it with AC making the door openable. If failed, nothing changes. Well, maybe you lose a lockpick or something.
1. What's the best way of hijacking/stopping AC movement controller in favor of Bolt only movement controller? I have a platformer-like movement controller made with Bolt to achieve something similar to Night in the Woods http://www.nightinthewoods.com/ ie the character can jump and therefore "platform".
2. If point one is achievable can I then extend the controller to a full-blown Bolt only combat system? Technically AC does not take any part in combat. But I could have AC interactable objects like openable containers in moments of respite from combat when exploring the world. Are there any foreseeable downsides to this idea?
3. Is there a way for me to create Bolt only minigames and link them with AC? Does the variable link script above can possibly enable me to do that? Let's say there is a locked door with doorOpen=false bool and lockpicking minigame that's made with Bolt.
On each update Bolt looks for lockpickingMinigame=true bool (definitely not efficient but whatever works is fine by me)
First I interact with the door via AC interaction system.
AC interaction sets lockpickingMinigame bool to "true" which then is synced via the variable sync script
Bolt detects lockpickingMinigame=true and shows me the minigame
If successful, Bolt sets doorOpen bool to "true" and variable script then syncs that with AC. The player can now open the door.
If minigame failed, Bolt sets lockpickingMinigame=false and disables it. The door remains locked.
Does this scenario makes sense or is it just wishful thinking?
Hi, Chris. I have the same question but in more detail.
1. What is the best way of hijacking movement from AC to control character only with Bolt while fully retaining all other AC features like interactions? I have a platformer-like character controller done in Bolt that would let me achieve something similar to Night in the Woods. http://www.nightinthewoods.com/
2. Can Bolt be used for minigames? Let's say there's a door. The door is unlocked via a minigame done completely in Bolt. To do this I'd need Bolt to communicate with AC to some extent. I guess it could be done with the variable link script?
AC interacts with the door which then sets AC global variable boltMinigame=true
boltMinigame=true is synced with Bolts application variable
Every frame Bolt checks if boltMinigame=true (definitely not efficient but it should work, right?)
If boltMinigame=true the actual minigame is instantiated on screen.
Play the minigame which sets doorOpen=true and syncs it with AC making the door enterable
Welcome to the community, @TowerCrow. Apologies for the automatic spamfilter.
1. If you don't want any AC control over your character during gameplay, you can set your Settings Manager's Movement method to None.
So far as control during Cutscenes goes (i.e. whether or not the player moves to points pre-set in the Character: Move to point Action), that's set via the Motion control field in the Player's Inspector. When set to Automatic, AC will assume control over your player at this time - which may or may not be appropriate for your needs. One option is to swap control between AC and your own whenever the "game state" changes to/from Cutscene mode. I can advise with a sample script if that's what you're looking for.
Alternatively, it can be set to Manual - and you can read the Player script's GetTargetPosition method to implement your own way of moving to his cutscene-driven destination if you wish. More on this topic can be found in the Manual's "Custom motion controllers" chapter.
2. If you're taking control of the player's controller then you're free to do with it as you like - The Interaction system can be disabled using the Engine: Manage systems Action (so that it's disabled during "combat mode"), or through scripting:
It's true that AC is indeed geared for non-combat, traditional adventure games. Certainly it can be added on with careful coding / integration, but I recommend that you first become familiar with how AC works by itself before attempting to add more mechanics via other assets.
3. You're referring to this script? That sounds feasible - you can also use the Engine: Manage systems Action to disable any/all of AC's systems, to avoid conflict with interactions etc.
It may be that variable linking isn't even necessary, here. You can also use the Object: Call event / Object: Send message Actions to trigger a Bolt sequence, and AC's ActionLists (scene and can be run externally via their Interact() method - so if Bolt can trigger this you can just have Bolt run AC "WinGame" / "LoseGame" ActionLists that re-enable AC and react accordingly.
Apologies for spamming the same message multiple times. I guess the forum does not like my tendency to go back and do minor edits to my posts. And thank you for the in-depth answer. AC is just what I need.
Hi, folks! I want to use a hotspot to trigger a bolt visual script sequence. Does someone know an easier way to make this than using Object>Call event>Trigger unity event?
I tried using hotspot with custom script set as interaction source, but seems that I can't "intercept" the message that is send in bolt with neither unity event or custom event unit (and get a send message has no receiver error).
Which aspect are you looking to simplify? The need for an ActionList to trigger the event?
If you switch your Source back to In Scene, but unset the Interaction ActionList, the OnHotspotInteractcustom event should still trigger. You can move your event to here to avoid the need for an ActionList:
using UnityEngine;
using UnityEngine.Events;
using AC;
public class HotspotRunEvent : MonoBehaviour
{
public UnityEvent unityEvent;
private void OnEnable () { EventManager.OnHotspotInteract += OnHotspotInteract; }
private void OnDisable () { EventManager.OnHotspotInteract -= OnHotspotInteract; }
private void OnHotspotInteract (Hotspot hotspot, AC.Button button)
{
if (hotspot == GetComponent <Hotspot>() && hotspot.GetButtonInteractionType (button) == HotspotInteractionType.Use)
{
unityEvent.Invoke ();
}
}
}
Paste this into a C# file named HotspotRunEvent, and attach the new "Hotspot Run Event" component to your Hotspot. You'll be able to set your event there, which will be triggered when the Hotspot is interacted with.
Comments
http://adventure-creator.wikia.com/wiki/Linking_AC_and_Bolt_variables
1. What is the best way of hijacking movement from AC to control character only with Bolt while fully retaining all other AC features like interactions? I have a platformer-like character controller done in Bolt that would let me achieve something similar to Night in the Woods. http://www.nightinthewoods.com/
2. Can Bolt be used for minigames? Let's say there's a door. The door is unlocked via a minigame done completely in Bolt. To do this I'd need Bolt to communicate with AC to some extent. I guess it could be done with the variable link script?
@ChrisIceBox I have the same question as starfugger but with more specifics.
1. What's the best way of hijacking/stopping AC movement controller in favor of Bolt only movement controller? I have a platformer-like movement controller made with Bolt to achieve something similar to Night in the Woods http://www.nightinthewoods.com/ ie the character can jump and therefore "platform".
2. If point one is achievable can I then extend the controller to a full-blown Bolt only combat system? Technically AC does not take any part in combat. But I could have AC interactable objects like openable containers in moments of respite from combat when exploring the world. Are there any foreseeable downsides to this idea?
3. Is there a way for me to create Bolt only minigames and link them with AC? Does the variable link script above can possibly enable me to do that? Let's say there is a locked door with doorOpen=false bool and lockpicking minigame that's made with Bolt.
- On each update Bolt looks for lockpickingMinigame=true bool (definitely not efficient but whatever works is fine by me)
- First I interact with the door via AC interaction system.
- AC interaction sets lockpickingMinigame bool to "true" which then is synced via the variable sync script
- Bolt detects lockpickingMinigame=true and shows me the minigame
- If successful, Bolt sets doorOpen bool to "true" and variable script then syncs that with AC. The player can now open the door.
- If minigame failed, Bolt sets lockpickingMinigame=false and disables it. The door remains locked.
Does this scenario makes sense or is it just wishful thinking?1. What is the best way of hijacking movement from AC to control character only with Bolt while fully retaining all other AC features like interactions? I have a platformer-like character controller done in Bolt that would let me achieve something similar to Night in the Woods. http://www.nightinthewoods.com/
2. Can Bolt be used for minigames? Let's say there's a door. The door is unlocked via a minigame done completely in Bolt. To do this I'd need Bolt to communicate with AC to some extent. I guess it could be done with the variable link script?
1. If you don't want any AC control over your character during gameplay, you can set your Settings Manager's Movement method to None.
So far as control during Cutscenes goes (i.e. whether or not the player moves to points pre-set in the Character: Move to point Action), that's set via the Motion control field in the Player's Inspector. When set to Automatic, AC will assume control over your player at this time - which may or may not be appropriate for your needs. One option is to swap control between AC and your own whenever the "game state" changes to/from Cutscene mode. I can advise with a sample script if that's what you're looking for.
Alternatively, it can be set to Manual - and you can read the Player script's GetTargetPosition method to implement your own way of moving to his cutscene-driven destination if you wish. More on this topic can be found in the Manual's "Custom motion controllers" chapter.
2. If you're taking control of the player's controller then you're free to do with it as you like - The Interaction system can be disabled using the Engine: Manage systems Action (so that it's disabled during "combat mode"), or through scripting:
AC.KickStarter.stateHandler.SetInteractionSystem (false);
It's true that AC is indeed geared for non-combat, traditional adventure games. Certainly it can be added on with careful coding / integration, but I recommend that you first become familiar with how AC works by itself before attempting to add more mechanics via other assets.
3. You're referring to this script? That sounds feasible - you can also use the Engine: Manage systems Action to disable any/all of AC's systems, to avoid conflict with interactions etc.
It may be that variable linking isn't even necessary, here. You can also use the Object: Call event / Object: Send message Actions to trigger a Bolt sequence, and AC's ActionLists (scene and can be run externally via their Interact() method - so if Bolt can trigger this you can just have Bolt run AC "WinGame" / "LoseGame" ActionLists that re-enable AC and react accordingly.
Hello,
I tried the script to link the two assets but got some issues with it.
Here is the console log : https://imgur.com/a/04zybgk
Can someone help me?
I managed to resolve the issue concerning the ambiguous references but the OnDownload/OnUpload one must be a bit too hard for me to understand.
A good friend helped me updating the script.
Here it is:
Thanks for the feedback, I'll amend the wiki.
Hi, folks! I want to use a hotspot to trigger a bolt visual script sequence. Does someone know an easier way to make this than using Object>Call event>Trigger unity event?
I tried using hotspot with custom script set as interaction source, but seems that I can't "intercept" the message that is send in bolt with neither unity event or custom event unit (and get a send message has no receiver error).
Which aspect are you looking to simplify? The need for an ActionList to trigger the event?
If you switch your Source back to In Scene, but unset the Interaction ActionList, the OnHotspotInteract custom event should still trigger. You can move your event to here to avoid the need for an ActionList:
Paste this into a C# file named HotspotRunEvent, and attach the new "Hotspot Run Event" component to your Hotspot. You'll be able to set your event there, which will be triggered when the Hotspot is interacted with.
Thanks, that's exactly what I meant!