Yet another cry for help.
Moderators: Bob the Hamster, marionline, SDHawk
- Meowskivich
- Blubber Bloat
- Posts: 2199
- Joined: Tue Mar 06, 2012 12:38 am
- Location: Earth
- Contact:
Yet another cry for help.
1/25/2013
Is there some way to make harm tiles unable to kill you?
------------------------------
(Old problems not to be concerned about right now)
------------------------------
I've been skimming the plotscripting dictionary for some time now, and here's what I need to know, as I can't find it:
I need a counter. As in, say each time you smite one of these "mystical dragons", you want to have the game add 1 to this counter, and with scripting using the counter to have this "mystical door" to tell you the number you've missed, or it opens upon defeating them all.
I'd like this counter for some ultimate goal of mine for my RPG that I've been working on for ...uh, quite some time. I think about ...wow, almost exactly two years ago.
And without getting too teary-eyed and reminiscent, yeah. Some global variable of some sort that can hold at least up to the hundreds in a number. The thousands would be dandy. I suppose I can spoiler tag what it'll be used for...if asked nicely, but first some help would be dandy. Of course, special mentioning will go to he who helps. Not really a bribe, but it just feels correct to mention all who help with this project.
-------------------------------------------------------------------
NEW PROLLEM! 5/29/12
With the slice editor, I can't seem to copy and paste slices, and I really REALLY don't want to piece all 46 current bestiary pages together bit by bit.
Any way that I can worm my way through the system? Though in-editor help states that "I can copy and paste using ctrl-c and ctrl-v", pasting seems to simply send me to the slice I "copied".
Is there some way to make harm tiles unable to kill you?
------------------------------
(Old problems not to be concerned about right now)
------------------------------
I've been skimming the plotscripting dictionary for some time now, and here's what I need to know, as I can't find it:
I need a counter. As in, say each time you smite one of these "mystical dragons", you want to have the game add 1 to this counter, and with scripting using the counter to have this "mystical door" to tell you the number you've missed, or it opens upon defeating them all.
I'd like this counter for some ultimate goal of mine for my RPG that I've been working on for ...uh, quite some time. I think about ...wow, almost exactly two years ago.
And without getting too teary-eyed and reminiscent, yeah. Some global variable of some sort that can hold at least up to the hundreds in a number. The thousands would be dandy. I suppose I can spoiler tag what it'll be used for...if asked nicely, but first some help would be dandy. Of course, special mentioning will go to he who helps. Not really a bribe, but it just feels correct to mention all who help with this project.
-------------------------------------------------------------------
NEW PROLLEM! 5/29/12
With the slice editor, I can't seem to copy and paste slices, and I really REALLY don't want to piece all 46 current bestiary pages together bit by bit.
Any way that I can worm my way through the system? Though in-editor help states that "I can copy and paste using ctrl-c and ctrl-v", pasting seems to simply send me to the slice I "copied".
Last edited by Meowskivich on Fri Jan 25, 2013 7:50 pm, edited 2 times in total.
- Spoonweaver
- Liquid Metal King Slime
- Posts: 6247
- Joined: Mon Dec 08, 2008 7:07 am
- Location: Home
- Contact:
You seemed to answer you own question, you just need to use a global variable. Each time you want to increase the counter you'd run a script that states INCREMENT(counter) and each time you want to decrease the counter (if you ever did) you'd script DECREMENT(counter). And then you' just need a script to check the counter's amount, like
If (counter>>1000) then (do cool stuff).
If (counter>>1000) then (do cool stuff).
Global variables can hold numbers up to 2147483647. That's a lot of numbers!
Like Spoonweaver said, you just need to adjust the variable every time you do whatever it is. For example:
Call the "kill dragon" script from within your game. Once you've called it 100 times, tag 10 will be set to true, and you can use that in your game like other tags.
Like Spoonweaver said, you just need to adjust the variable every time you do whatever it is. For example:
Code: Select all
include,plotscr.hsd
global variable(1, dragons)
plotscript, kill dragon, begin
dragons := dragons + 1
if (dragons >= 100) then (
# You killed at least 100 dragons!
set tag(10, on)
)
end- Meowskivich
- Blubber Bloat
- Posts: 2199
- Joined: Tue Mar 06, 2012 12:38 am
- Location: Earth
- Contact:
But is it possible to show the variable in a textbox? Because I'd like some to say "you've slain #variable_here of 7 dragons" so that the person will know at least of how many they've missed.
Even though dragons, truly, have nothing to do with what I'm using this for....mostly. It's just the example.
Even though dragons, truly, have nothing to do with what I'm using this for....mostly. It's just the example.
Last edited by Meowskivich on Wed May 02, 2012 1:23 am, edited 2 times in total.
- Meowskivich
- Blubber Bloat
- Posts: 2199
- Joined: Tue Mar 06, 2012 12:38 am
- Location: Earth
- Contact:
- Meowskivich
- Blubber Bloat
- Posts: 2199
- Joined: Tue Mar 06, 2012 12:38 am
- Location: Earth
- Contact:
NEW PROLLEM!
With the slice editor, I can't seem to copy and paste slices, and I really REALLY don't want to piece all 46 current bestiary pages together bit by bit.
Any way that I can worm my way through the system? Though in-editor help states that "I can copy and paste using ctrl-c and ctrl-v", pasting seems to simply send me to the slice I "copied".
HALP! -with love, Meowskivich
With the slice editor, I can't seem to copy and paste slices, and I really REALLY don't want to piece all 46 current bestiary pages together bit by bit.
Any way that I can worm my way through the system? Though in-editor help states that "I can copy and paste using ctrl-c and ctrl-v", pasting seems to simply send me to the slice I "copied".
HALP! -with love, Meowskivich
Are you sure about that? It can appear that that's what's happening when in fact it's working correctly, because the newly created slice looks identical to the old one. Especially confusing because there's no scroll bar in the slice editor, so you might not notice the list of slices getting longer as you add copies.
(Incidentally, I've just discovered a rare crash when copy-pasting slices, but can't seem to reproduce it)
(Incidentally, I've just discovered a rare crash when copy-pasting slices, but can't seem to reproduce it)
- Meowskivich
- Blubber Bloat
- Posts: 2199
- Joined: Tue Mar 06, 2012 12:38 am
- Location: Earth
- Contact:
Does copying and pasting work elsewhere? What version are you using?
But, thanks, "copying the slice collection's name" turned out to be the explanation of the crash I saw! I hit Ctrl+C while the "<Slice>" line was selected. I realised what was up when happening upon the cryptic (and therefore important!) code comment
This is why source comments are a good thing :P
But, thanks, "copying the slice collection's name" turned out to be the explanation of the crash I saw! I hit Ctrl+C while the "<Slice>" line was selected. I realised what was up when happening upon the cryptic (and therefore important!) code comment
Code: Select all
jump_to_collection = ses.collection_number
IF intgrabber(jump_to_collection, 0, 32767, , , , NO) THEN 'Disable copy/pasting- Meowskivich
- Blubber Bloat
- Posts: 2199
- Joined: Tue Mar 06, 2012 12:38 am
- Location: Earth
- Contact:
OK. You're hitting Ctrl+C and Ctrl+V on the "Slice Collection #" line, just as I did. In Zenzizenzic this causes the slice ID to be copied and pasted rather than a slice! In nightlies, this is fixed.
CASE CLOSED!
CASE CLOSED!
Last edited by TMC on Wed May 30, 2012 2:01 pm, edited 1 time in total.
- Meowskivich
- Blubber Bloat
- Posts: 2199
- Joined: Tue Mar 06, 2012 12:38 am
- Location: Earth
- Contact:
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
- Meowskivich
- Blubber Bloat
- Posts: 2199
- Joined: Tue Mar 06, 2012 12:38 am
- Location: Earth
- Contact: