Adventure Creator Wikia
Explore
Main Page
Discuss
All Pages
Community
Interactive Maps
Recent Blog Posts
Popular pages
Most visited articles
Custom Action - Variable: MultiBoolCheck
General
Scrolling text and Scrolling text audio.
Cancel Interaction Menus
Adding image effects
Custom trigger (triggers one actionlist when entering and another when exiting)
Randomize speech audio (Random Syllables)
Use items on an AC Character
Running Animations when game is paused
Integrations
CNControls Integration (Virtual Joystick)
Rewired integration
Unity analytics Integration (AC Action)
FinalIK Interactions Integration (AC Action)
Rogo Lipsync (No audio) 01 - Play Action
Rogo Lipsync (No audio) 02 - Stop Action
Rogo Lipsync (No audio) 03 - Set Emotion Action
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Adventure Creator Wikia
192
pages
Explore
Main Page
Discuss
All Pages
Community
Interactive Maps
Recent Blog Posts
Popular pages
Most visited articles
Custom Action - Variable: MultiBoolCheck
General
Scrolling text and Scrolling text audio.
Cancel Interaction Menus
Adding image effects
Custom trigger (triggers one actionlist when entering and another when exiting)
Randomize speech audio (Random Syllables)
Use items on an AC Character
Running Animations when game is paused
Integrations
CNControls Integration (Virtual Joystick)
Rewired integration
Unity analytics Integration (AC Action)
FinalIK Interactions Integration (AC Action)
Rogo Lipsync (No audio) 01 - Play Action
Rogo Lipsync (No audio) 02 - Stop Action
Rogo Lipsync (No audio) 03 - Set Emotion Action
Editing
Limit a Hotspot to specific Players
Back to page
Edit
Edit source
View history
Talk (0)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
When Player-switching is enabled, this script allows you to limit a Hotspot's interactivity to specific Players characters. To use it: # Create a new C# script named PlayerSpecificHotspot.cs, and paste in the code below # Add the new Player Specific Hotspot component to a Hotspot, and add the IDs of all Players that can interact with it. (A Player's ID is listed next to their prefab field in the Settings Manager) PlayerSpecificHotspot.cs:<syntaxhighlight lang="csharp"> using UnityEngine; using System.Collections.Generic; using AC; public class PlayerSpecificHotspot : MonoBehaviour { public List<int> enableForPlayerIDs; private Hotspot hotspot; void OnEnable () { hotspot = GetComponent<Hotspot> (); EventManager.OnSetPlayer += SetNewPlayer; EventManager.OnAfterChangeScene += OnAfterChangeScene; } void OnDisable () { EventManager.OnSetPlayer -= SetNewPlayer; EventManager.OnAfterChangeScene -= OnAfterChangeScene; } void SetNewPlayer (Player player) { ReactToID (player.ID); } void OnAfterChangeScene (LoadingGame loadingGame) { if (KickStarter.player) ReactToID (KickStarter.player.ID); } void ReactToID (int playerID) { if (enableForPlayerIDs.Contains (playerID)) { hotspot.TurnOn (); } else { hotspot.TurnOff (); } } } </syntaxhighlight> [[Category:General]]
Summary:
Please note that all contributions to the Adventure Creator Wikia are considered to be released under the CC-BY-SA
Cancel
Editing help
(opens in new window)
Follow on IG
TikTok
Join Fan Lab