Lauriel Posted February 20, 2020 Share Posted February 20, 2020 In the debug console, you're able to use GetGlobal("myglobal","GLOBAL") and it'll return the value. I need something like this in a script. For instance, if I want to know if the party has more gold than whatever is set in a global, I'd like to use "PartyGoldGT("GetGlobal("myglobal","GLOBAL"))". Is there any way to do that? Quote Link to comment
Jarno Mikkola Posted February 20, 2020 Share Posted February 20, 2020 Nested globals... nope. You have to do this with IF PartyGoldGT("1000") PartyGoldLT("10000") ("myglobal","GLOBAL",0) THEN RESPONSE #100 SetGlobal("myglobal","GLOBAL",1) END Quote Link to comment
Lauriel Posted February 20, 2020 Author Share Posted February 20, 2020 Ok, thanks @Jarno Mikkola, for the confirmation. I thought I was out of luck, but was holding out a bit of hope. Quote Link to comment
Lauriel Posted February 20, 2020 Author Share Posted February 20, 2020 Boy, no wonder this game just takes everything if it needs to reduce your wealth. There is NO way to take a percentage or any other calculated amount. Frustrating. Quote Link to comment
Shin Posted February 20, 2020 Share Posted February 20, 2020 You can simulate roughly taking a percentage though, e.g. take X gold if wealth is between Y and Z, and so on. Quote Link to comment
Jarno Mikkola Posted February 20, 2020 Share Posted February 20, 2020 56 minutes ago, Shin said: You can simulate roughly taking a percentage though, e.g. take X gold if wealth is between Y and Z, and so on. K, I'll take 10% of your total earnings... that's a sorta good deal, alright. Näh, I don't like you .-.. so that's 1000 gold for a 5 minutes when you didn't earn a thing, this was a nice short while it lasted. -wife. Quote Link to comment
Lauriel Posted February 20, 2020 Author Share Posted February 20, 2020 7 hours ago, Shin said: You can simulate roughly taking a percentage though, e.g. take X gold if wealth is between Y and Z, and so on. That's what I ended up doing. It's not at all what I wanted, but it's what I can do. Quote Link to comment
Lauriel Posted February 20, 2020 Author Share Posted February 20, 2020 (edited) I wonder if it's worth trying to use SetTokenGlobal and using the token like PartyGoldGT(<mytoken>). It probably returns a string and will crash and burn, but I think I'm going to try it once...just in case... Edited February 20, 2020 by Lauriel Quote Link to comment
temnix Posted March 5, 2020 Share Posted March 5, 2020 The token won't work. Tokens don't do anything but display a bit of text when you need them to, plus you can use them to change and set the names of creatures and area notes. But they aren't good as objects. However, you can use TakeObjectGoldGlobal(S:Name*,S:Area*,O:Object*) and similar actions to manipulate gold; check out the G3 guide to actions. I think these actions exist only for EE, though. Quote Link to comment
Lauriel Posted May 1, 2020 Author Share Posted May 1, 2020 On 3/5/2020 at 10:53 AM, temnix said: The token won't work. Tokens don't do anything but display a bit of text when you need them to, plus you can use them to change and set the names of creatures and area notes. But they aren't good as objects. However, you can use TakeObjectGoldGlobal(S:Name*,S:Area*,O:Object*) and similar actions to manipulate gold; check out the G3 guide to actions. I think these actions exist only for EE, though. I know it's been almost 2 months, but I think with TakeObjectGoldGlobal and GiveObjectGoldGlobal, I might be able to work something out. The take will give me the amount of gold the party has (I assume, since we're talking about player1 ... here's hoping!). I can give it right back with the 'give' version and I'll have my global set. Thanks for the point in the right direction, @temnix! Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.