Comments (3)
Very nice. Would it be possible to expose the variable system enough to
link up a uGUI text input field?
[email protected]
+353 87 935 0483
On Thu, Oct 30, 2014 at 3:11 PM, chrisgregan [email protected]
wrote:
It should be possible to embed variable values in Say & Choose story text,
like this.
"She glanced through the window and saw {$FriendName} approaching.", where
FriendName is a previously populated string variable.—
Reply to this email directly or view it on GitHub
#48.
from fungus.
I think you could almost do this now. You could add an event handler to the input field and have it call the SetStringVariable() method on the Fungus Script. Not sure if you could pass the actual value of the input field without a bit of custom c# code though.
Anyway, that's probably how I'd handle it - have a component handle the input field events and then set the variable via the methods in the FungusScript class.
from fungus.
Relate request from Daniel Nascimento:
So, giving an option for the player to input it's name and saving it to a string variable, and being able to call that name in dialog.
I made a Choice Dialog prefab with an input text, made the option button call OnClick a script that would set the global variable with the current inputtext.text.text and that solved the first part. Then I went into the parser in the dialog and made a new Glyph.Name so whenever I input {name} on a text I show that string from the global variable instead. Lastly I went into the characters part of the dialog, and added an elseif that if the character name is {name} it'll show the string recorded in the global variables.
That's something that could be somehow implemented already, right? XD
The other thing is Stats, which was pretty easy to implement using the global variables and is kind of specific so wouldn't be really useful to have already implemented in the package. I just made a Text in canvas that keeps updating every 0.5f based on the global variables that we defined for stats.
from fungus.
Related Issues (20)
- Access "Story Text" in a Say command by editing the Say command script? HOT 2
- PortraitController.Show tries to access a null portrait HOT 2
- Access An Action/Command Via Script? HOT 1
- execute event isn't work(on mouse click) HOT 1
- Fungus in Unity3d 2022.1 Ton of Errors due to LeanTween HOT 1
- Comma as a separation character messes with some localized float representation. HOT 1
- Ui-Toolkit Will be the default Editor and Inspector in Unity 2022.2+ HOT 1
- FlowcharWindow causes GUI Layout error in the Unity 2021 LTS (Severe BUG!) HOT 6
- "Write Whole Words" is ignored in TextMeshPro say dialogues
- When a Menu leads to a block that starts with Menu commands, you submit the next Menu with the same click HOT 1
- [FEATURE SUGGESTION] Custom blockname tint
- Global Variables Null Reference After Working correctly for a first run-through. HOT 1
- Unity 2020.3.xx Lua Script Bug
- fungus live2d import?
- MusicManager properties
- If you run the editor in pause mode, the say command cannot be executed! HOT 1
- CRITICAL ERROR: Save system "drops" flowcharts (CG-Tespy)
- Lua Conversation
- Fungus websites’ forum isn’t loading
- How To Add Fungus Branching Paths to fighting game HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fungus.