Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] I want to manage the player stat. #892

Open
littleSnailSong opened this issue Mar 4, 2024 · 2 comments
Open

[Question] I want to manage the player stat. #892

littleSnailSong opened this issue Mar 4, 2024 · 2 comments

Comments

@littleSnailSong
Copy link

Hi! i'm noob indie game developer. i'm using unity(2D) to make text-based game. (with awwwesome ink)

first, I say sorry for my strange English skills.

anyway! in my game, player have several status. like power, health, intelligence...etc.

question is, in the story, if player drink poison tea, how can i down player's health status?

[player drink tea. oops. it's poison.

health -20] << if this line come out, i want to down 20 health point in my player's 100 health point that already defined in c# script.
image

i tried but...sorry for my bad english. have a nice day!

@Selsynn
Copy link

Selsynn commented Mar 4, 2024

To integrate gameplay via variable and ink, you have two major solutions. Which one you choose depends of your use case:

  1. have Ink be the master of the logic. Technically, that means the "true" variable is staying in ink. The rest of the game is reading the value in ink to know it and act on it.

  2. have the master of the logic outside ink. It means you need an external function each time you want to read the variable in ink (that will ask the "true" value).

There is no way that is better or worse than the other, it's mostly depending of what you want your code to do.
Points to know:

Let me know if there is a specific point where you need more info, as I just redirect you with an overview and the documentation (there is a ton of things that is possible in ink, you just have to get the keys on how to use it to be able to create neat game.)

@littleSnailSong
Copy link
Author

thank you for your kindness. i checked all of your informations!
It's sad news, but I haven't solved my problem yet. i will try again. thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants