July 28, 2020 at 7:00 am #25395
You will not notice receiving a token. But when you test it later with a “if hero has token”, it should work.+2July 31, 2020 at 6:59 pm #25459Ultrabeast456Participant
Thanks alot!!! Also how do you make it so that the hero must give more than one of the token to get something?0July 31, 2020 at 7:40 pm #25461Random NpcParticipant
Rather than giving a token using “hero receives token ___” if you want to give the hero more than one of the same token, you need to use “hero number of ___ increases with..”
For example, let’s say you wanted to buy a sword for 5 gold. The screenplay would be as follows (Please count the number of spaces, as this is crucial):
if hero number of “gold” >=5
(4 spaces) hero receives token “sword”
(4 spaces) hero number of “gold” decreases with 5
(4 spaces) blacksmith says “Sorry, but you don’t have enough gold”+2July 31, 2020 at 10:25 pm #25467Ultrabeast456Participant
thx0October 7, 2020 at 7:00 pm #27910chicken stripsParticipant
go into the actions part of the dialogue thing, click on the hero’s tab, scroll until you find “receives token”. It’ll ask you what token they’re going to receive. I’m not sure if you figured this out already, but if you didn’t, I hope this helps as I am new to this too 🙂0October 21, 2020 at 2:08 pm #28684DerbsterParticipant
Is it somehow possible to calculate with these tokens? Are there any mathematical operators?
For example token B is 5 * the value of token A.0November 3, 2020 at 2:04 am #29332Th3_@rt1si4nParticipant
So I’ve been trying out the tokens but it seems i got a few problems with them
Here is what I
Test1 says “You have received Token_4”
hero receives token “Token_4”
if hero has token “Token_4”
Test1 says “Enjoy”
Test1 says “You have not yet received this token”
hero loses token “Token_4”
I know, it looks normal, but when i talk to it again it repeats the first dialogue again with the dialogue after the token was received instead of just the dialogue of receiving the token. Sorry if you don’t understand but what I’m trying to say is that: Is it possible for an NPC to just say the dialogue of after receiving the token instead of the dialogue before receiving the token and the dialogue AFTER receiving the token?
If it isn’t possible then its okay ill try to figure something out0November 3, 2020 at 7:44 am #29344
The problem is you always set the token at the start of your script, and then remove it at the end of the script. So this means you will always get the same result.
You have to make sure the hero doesn’t have the token yet when your actions are first run. And at the end you give the hero a token.
So the second time the actions are run, the hero has the token and something else happens.
So for example:
if hero lacks token "talked to alice" hero says "I haven't met you before, how are you?" alice says "Fine! Nice to meet you" hero receives token "talked to alice" else hero says "Nice to meet you again"+2March 4, 2021 at 3:17 am #35696TManSanParticipant
I think that I’m also having a similar problem, just mine repeats both texts (the else and the “if hero lacks”) This is what it looks like.
if hero lacks token “TELEPORT”
icubeA1 says “You will find several of these across the world. They allow you to teleport from one location to another instantly. Very useful indeed…”
hero receives token “TELEPORT”
icubeA1 says “You need a pass to use this”
Can somebody help me with this?0March 6, 2021 at 9:07 am #35878
It’s hard to say what exactly the problem is. You could ask this question on our Discord, plenty of people there to help out: https://discord.gg/tyHjdt3.
Or you can you copy-paste your actions here, so we can see what is wrong with it.0April 11, 2021 at 8:42 am #38056IrishNickParticipant
I’m using tokens on my games now, just as I would use variables.
What are the ‘already included’ token other than “gold” and “health”
Finally, how does my character change weapons “ingame”?0April 12, 2021 at 9:04 am #38099
There is no included amount of “gold” variable. But you can access the actor’s health values. Better let’s call the integrated stuff “properties” for now to make a difference between properties and user defined variables.
You cannot change the appearance of your weapon for now, but you can activate or deactivate it and are able to increase or decrease its power – of course also at runtime.
To get a hunch, which properties are available, just have a look on your actor’s properties in design mode.0April 12, 2021 at 9:14 am #38100
If you used to other programming languages, tokens and numbers are indeed the same as booleans and decimals in other programming languages. However, I do not exactly know, if number variables in RPG Playground are actually floats or doubles, but they are able to process decimal fractions.+1April 12, 2021 at 2:19 pm #38110IrishNickParticipant
Thanks, I just realised that on declaring hero gets 5 token “gold” or something similaire, I’m actually declaring a variable 😉
I come from the ancient world of 6502 and machine code, where one had to declare all variables at the beginning 🙂0April 12, 2021 at 4:28 pm #38121
It unfortunately is not necessary yet to declare variables in RPG Playground before you can use them. Therefore, you can easily make mistakes by using variables and then have a hard time to debug the result (without having a debugger!). I really hope deWiTTERS someday implements an option, which makes it possible to prevent the engine from using implicit variables.0
- You must be logged in to reply to this topic.