Welcome Forums Get help Tokens

Tagged: 

  • This topic has 29 replies, 9 voices, and was last updated 4 days, 1 hour ago by Marby. This post has been viewed 3063 times
Viewing 15 posts - 16 through 30 (of 30 total)
  • Author
    Posts
  • #25395
    deWiTTERS
    Keymaster

    You will not notice receiving a token. But when you test it later with a “if hero has token”, it should work.

    +2
    #25459
    Ultrabeast456
    Participant

    Thanks alot!!! Also how do you make it so that the hero must give more than one of the token to get something?

    0
    #25461
    Random Npc
    Participant

    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

    else

    (4 spaces) blacksmith says “Sorry, but you don’t have enough gold”

    +2
    #25467
    Ultrabeast456
    Participant

    thx

    0
    #27910
    chicken strips
    Participant

    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 🙂

    0
    #28684
    Derbster
    Participant

    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.

    0
    #29332
    Th3_@rt1si4n
    Participant

    So I’ve been trying out the tokens but it seems i got a few problems with them

     

    Here is what I
    wrote

    Test1 says “You have received Token_4”

    hero receives token “Token_4”

    if hero has token “Token_4”

    Test1  says “Enjoy”

    else

    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 out

    0
    #29344
    deWiTTERS
    Keymaster

    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"
    
    +2
    #35696
    TManSan
    Participant

    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”
    else
    icubeA1 says “You need a pass to use this”

    Can somebody help me with this?

    0
    #35878
    deWiTTERS
    Keymaster

    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.

    0
    #38056
    IrishNick
    Participant

    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”?

    0
    #38099
    Marby
    Participant

    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.

    0
    #38100
    Marby
    Participant

    Small addition:
    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.

    +1
    #38110
    IrishNick
    Participant

    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 🙂

    0
    #38121
    Marby
    Participant

    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
Viewing 15 posts - 16 through 30 (of 30 total)
  • You must be logged in to reply to this topic.