Yet another cry for help.

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

User avatar
Meowskivich
Blubber Bloat
Posts: 2199
Joined: Tue Mar 06, 2012 12:38 am
Location: Earth
Contact:

Yet another cry for help.

Post by Meowskivich »

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".
Last edited by Meowskivich on Fri Jan 25, 2013 7:50 pm, edited 2 times in total.
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x :V
User avatar
Spoonweaver
Liquid Metal King Slime
Posts: 6247
Joined: Mon Dec 08, 2008 7:07 am
Location: Home
Contact:

Post by Spoonweaver »

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).
User avatar
Mogri
Super Slime
Posts: 4598
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

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:

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
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.
User avatar
Meowskivich
Blubber Bloat
Posts: 2199
Joined: Tue Mar 06, 2012 12:38 am
Location: Earth
Contact:

Post by Meowskivich »

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.
Last edited by Meowskivich on Wed May 02, 2012 1:23 am, edited 2 times in total.
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x :V
User avatar
Master K
King Slime
Posts: 1899
Joined: Sat Jun 11, 2011 9:40 pm
Location: A windswept rock in the Atlantic Ocean

Post by Master K »

Because I'd like some to say "you've slain #variable_here of 7 dragons"
Text Code. You would put in a textbox "You've slain ${V#} of 7 Dragons."
The # would be the number of your global variable.
User avatar
Meowskivich
Blubber Bloat
Posts: 2199
Joined: Tue Mar 06, 2012 12:38 am
Location: Earth
Contact:

Post by Meowskivich »

I see, thanks all! I'll try putting this stuff together soon enough.
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x :V
User avatar
Meowskivich
Blubber Bloat
Posts: 2199
Joined: Tue Mar 06, 2012 12:38 am
Location: Earth
Contact:

Post by Meowskivich »

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
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x :V
TMC
Metal King Slime
Posts: 4101
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

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)
User avatar
Meowskivich
Blubber Bloat
Posts: 2199
Joined: Tue Mar 06, 2012 12:38 am
Location: Earth
Contact:

Post by Meowskivich »

No, I mean the editor sends me straight to the slice I "copied", as stated above. It's like it's also copying the slice collection's name and pasting it, thus only replacing the one I copied with....the one....I....copied... :???:
As you could imagine is highly useful (sarcasm).
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x :V
TMC
Metal King Slime
Posts: 4101
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

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

Code: Select all

    jump_to_collection = ses.collection_number
    IF intgrabber&#40;jump_to_collection, 0, 32767, , , , NO&#41; THEN  'Disable copy/pasting
This is why source comments are a good thing :P
User avatar
Meowskivich
Blubber Bloat
Posts: 2199
Joined: Tue Mar 06, 2012 12:38 am
Location: Earth
Contact:

Post by Meowskivich »

Well, I don't use nightlies, so I use Zenzizenzic.
And copying works pretty much anywhere else with no trouble really.

And...um, I'm glad I could....help???
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x :V
TMC
Metal King Slime
Posts: 4101
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

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!
Last edited by TMC on Wed May 30, 2012 2:01 pm, edited 1 time in total.
User avatar
Meowskivich
Blubber Bloat
Posts: 2199
Joined: Tue Mar 06, 2012 12:38 am
Location: Earth
Contact:

Post by Meowskivich »

Grand....so when is the next OHRRPGCE coming out so I can get this fix?
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x :V
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Meowskivich wrote:Grand....so when is the next OHRRPGCE coming out so I can get this fix?
Or you can use a nightly build. We are very close to the next stable release, so as long as you are not using a Mac, the nightlies are pretty much just as stable as the stable release.
User avatar
Meowskivich
Blubber Bloat
Posts: 2199
Joined: Tue Mar 06, 2012 12:38 am
Location: Earth
Contact:

Post by Meowskivich »

I kinda don't really want to use nightlies, that's kinda the thing here :/

But if the next build is to be due soon enough, then I can wait, I guess.
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x :V
Post Reply