Jump to content
  • 0

Assigning no. of item X to a Player Variable


AlfyG

Question

Hi all,

 

Apologies if this was addressed way back, but I have looked through the forums and can't see it...

 

Is there a way of assigning the number of a certain item held to a variable? For example, the amount of 'Gold Coins' held by a player? I know that no. of item X held can be used as a conditional, but I can't see how to assign that amount it to a variable?

 

Any help is appreciated. Thanks everyone.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
8 minutes ago, AlfyG said:

Hi all,

 

Apologies if this was addressed way back, but I have looked through the forums and can't see it...

 

Is there a way of assigning the number of a certain item held to a variable? For example, the amount of 'Gold Coins' held by a player? I know that no. of item X held can be used as a conditional, but I can't see how to assign that amount it to a variable?

 

Any help is appreciated. Thanks everyone.

d3c4c7f33425a467eb2736874ea61232.png

Conditional Branch have amount or variable sections

Link to comment
Share on other sites

  • 0
11 minutes ago, Xiphoid said:

d3c4c7f33425a467eb2736874ea61232.png

Conditional Branch have amount or variable sections

 

Thanks for getting back to me, I appreciate it, but this isn't what I wanted to know.

 

When SETTING a variable, you can set it to an amount, or make it equal to another variable (or system time).

 

Lets say I have 30 Gold Coins. How do I set a variable to equal that number of coins? So, I could then use that variable in chat, or in rankings, eg "You have \pv Gold Coins".

 

Is it doable? Cheers.

 

Link to comment
Share on other sites

  • 0
14 minutes ago, AlfyG said:

 

Thanks for getting back to me, I appreciate it, but this isn't what I wanted to know.

 

When SETTING a variable, you can set it to an amount, or make it equal to another variable (or system time).

 

Lets say I have 30 Gold Coins. How do I set a variable to equal that number of coins? So, I could then use that variable in chat, or in rankings, eg "You have \pv Gold Coins".

 

Is it doable? Cheers.

 

Actually you can't without source edit...

 

You can't set up Item's amount to a variable...

Link to comment
Share on other sites

  • 0
5 minutes ago, Xiphoid said:

Actually you can't without source edit...

 

You can't set up Item's amount to a variable...

No worries, thanks for confirming Xiphoid :)

 

I think I can do what I want via the API, pulling up player data etc. I was just hoping there was a simpler way in the editor!

 

Thanks again, appreciate your time.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...