我想制作一个金币系统该怎么办呢?

Post all technical issues and questions here. We'll gladly help you wherever we can.
Post Reply
Y1Y1
Curious Newbie
Curious Newbie
Posts: 1
Joined: Mon Jan 26, 2026 4:35 am

我想制作一个金币系统该怎么办呢?

Post by Y1Y1 »

我是一个新手,完全没有代码基础,想制作金币形态,尝试了ai教的代码,无法使用
kerkersklave
Explorer At Heart
Explorer At Heart
Posts: 709
Joined: Sun Jul 06, 2014 2:11 pm
Gender: Male
Sexual Orientation: Open to new ideas!
I am a: Slave

Re: 我想制作一个金币系统该怎么办呢?

Post by kerkersklave »

Is this some kind of spam?
User avatar
PlayfulGuy
Experimentor
Experimentor
Posts: 1068
Joined: Sat Jul 07, 2012 10:08 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): No domme
Sub/Slave(s): No sub
Location: British Columbia, Canada

Re: 我想制作一个金币系统该怎么办呢?

Post by PlayfulGuy »

kerkersklave wrote: Tue Jan 27, 2026 9:57 pm Is this some kind of spam?
It's hard to tell.

Translating the subject line using Google it's asking how to make a "gold coin system".
The description says they tried some AI generated code but it didn't work.

Could be a legit question about implementing something in an EOS tease, or not.

We'll need a Chinese speaker to tackle this one...

PG
User avatar
StellaRack
Explorer At Heart
Explorer At Heart
Posts: 228
Joined: Wed Jan 03, 2024 9:13 pm
Gender: Femboy
Sexual Orientation: Straight
I am a: Submissive

Re: 我想制作一个金币系统该怎么办呢?

Post by StellaRack »

I'll bite. I don't speak Chinese. So I will leave in English

To make a coin system there is 3 key bits of code you need

Setup
Under options -> Init Script
You would want to add this
Start coins at 0. Will reset each time you load the tease

Code: Select all

var coins = 0;
To give coins
add an "Eval" action
Note that the number is how much to add. It could be any number

Code: Select all

coins = coins + 1
Check for coins
To react to how many coins you have add a "If" action
This will do the "then" actions only if you have 10+ coins
It will do the "else" actions if have 9 or less coins

Code: Select all

coins >= 10
Show how many coins you have
In a "Say" action
Press the "<>" button
Put in "coins"
This will be replaced with the number of coins

In a "Choice" action
at the bottom if you tick "Visible"
You can show a button only if you have coins
EG only show if you have 3+ coins

Code: Select all

coins >= 3
Also
> < >= <= all work.
So you can check you have less then a number of coins if needed

I have made a quick demo project with a coin system added
coin-demo-2026-01-28.zip
(597 Bytes) Downloaded 49 times
Post Reply