Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
That's something hard to accomplish on it's own.
Making the script to count the cards is easy, however, you need to make it on your own save, since it will need to reference your deck
Have any idea how i would write that? im not the best at scripting.
Like I said on my previous reply, context is important to make this work, so, I created an example mod for you.
http://steamcommunity.com/sharedfiles/filedetails/?id=719613138
First of all, there's two things you need to understand:
First: There's no way for the game to know the actual value of the cards. What I did here was to type the actual value of the cards into their name, and then have the script check the card name whenever it enters/exit the script zone.
Second: I've made a mod to show, because there's two things you need in place for this to work. A counter object (with the ID value saved on the script) and a scripting zone (you can create those with the zone tool in game)
Although in theory it would be possible to have several zones, each with its own counter, for this script, I've assume there will be only one script zone. If you create more than one, the behaviour will be kind of weird.
In any case, whenever you drop a card on the script zone, it will add its value to the counter. Remove the card, it will remove the value.
I've put the values on the card myself, you can change the values to whatever you need (and use your own deck, just make sure to put a value on every card)
For this example, the values for the letter cards are
J = 11
Q = 12
K = 13
A = 1
JOKER = 0
Here's the script I've used.
If you want to use it on another mod, just make sure to copy the counter ID and paste it on the script, and create a scripting zone somewhere. It should work fine.
http://pastebin.com/bs7Q3JBq
If this is possible it would mean u could make different counters just im unsure how i would change the code to grab different zones.
The script only has an event for scripting zones, not hidden zones.
One way I thought of solving this problem would be to lock something named on the zone. And then have the counting script associate each name to their own counter ID.
But... honestly, that's too much work.
This way only the counter (or counters) inside the zone would be updated and you could have as many zones as you wanted.