[Resolved] Variable in Script Event

Started by Mightylink, May 02, 2009, 12:32:53 am

Previous topic - Next topic

Mightylink

May 02, 2009, 12:32:53 am Last Edit: May 02, 2009, 01:14:32 am by Mightylink
I am using a tax script and im wondering how can I get it to take the tax from a variable. For every shop event I put this before each shop process:

$game_system.tax = 15


Thats 15%, what I want to do is get that number from a system variable instead, so how do I get it to do this?
$game_system.tax = "variable id"

G_G

Quote from: Mightylink on May 02, 2009, 12:32:53 am
I am using a tax script and im wondering how can I get it to take the tax from a variable. For every shop event I put this before each shop process:

$game_system.tax = 15


Thats 15%, what I want to do is get that number from a system variable instead, so how do I get it to do this?
$game_system.tax = "variable id"


$game_system.tax = $game_variables[1]

Mightylink

May 02, 2009, 01:02:45 am #2 Last Edit: May 02, 2009, 01:04:06 am by Mightylink
You never cease to amaze me, thanks so much, I didnt know $game_variables would work, I thought the money sign only worked at the start of a script :P Originally I tried = "\v[1]" but it gave could not convert string error, your way worked ^_^

And it works, I enchanced this tax script with my own haggle system :D

G_G

No problem. Glad I could help again. I feel really helpful. :D

Mightylink

May 02, 2009, 01:17:44 am #4 Last Edit: May 02, 2009, 01:20:15 am by Mightylink
I am giving my game lots or replay value to it, this is only 1 of many features im putting lots of effort into, not only do i use a tax script but i modified it to also have a haggle system, thanks to your help :) And taxs will vary all the time depending on world events, during more dire times they will be higher and during peace they will be lower, they will also be based on a random generator, each shopkeeper will be different too and taxes can be droped way down or completly cut if you do a quest for them.

Basiclly im going for the most realism possible, I want my game to be well known as the most realistic and feature driven 2d game. I was a big fan of oblivion for this, it was very open and gave you lots to do, you could spend years playing that game and still see everything. The main quest in oblivion was probably only 1% of the game, it had so many side features and guilds and areas to explore.