inkle / inkle/ink

Accessing outer script variables within an .ink

Open
#379 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.9k
Forks
540
PR merge metrics
No merged PRs in 30d

Description

Hey guys, I'm a complete noob to this but I had a few questions.

I've created some player stats in a script called PlayerStats which looks like this:

public class PlayerStats : MonoBehaviour {

public static string PlayerName;
public static float MaxSkill, CurSkill, MaxStam, CurStam, MaxLuck, CurLuck, Gold;
public static int a1d6, a2d6, AddDice;

I want to be able to display these within my .ink file and use them to do equations for combat (which will require a few more variables which I haven't setup yet).

Is this possible? How do I go about getting access to these variables within my .ink story?

Thank you for any advice and help!

PS. I tried using RANDOM(1,6) and storing that in a variable within Inky but for some reason that didn't work, which is why I have turned to using an outer script.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.