View previous topic :: View next topic |
Author |
Message |
junahu Custom Title: 45 character limit

Joined: 13 Jan 2004 Posts: 369 Location: Hull, England
|
Posted: Mon Jun 28, 2004 3:04 am Post subject: |
|
|
No, so that globals could be defined on the fly.
e.g:
Code: | definescript(1,letsmakesomeglobals,0)
definescript(autonumber,globalgenerator,1,0)
script,letsmakesomeglobals,begin
variable(i)
while(i<= 9)
do,begin
increment(i,1)
globalgenerator(i)
end
end
script,globalgenerator,begin
variable(name)
name := "global" + i
defineglobal(i,name)
end |
(split it into two scripts because I remembered that variables are initiated when the script starts regardless of where in the script they are. I've also made some syntax assumtions that may not be correct)[/code] _________________
 |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Thu Jul 01, 2004 7:10 pm Post subject: |
|
|
Every time you use the name of a global in a script, it is compiled to a piece of binary code with the id number as a constant. Infact, your entire scripts file is compiled to binary, so you can't possibly allocate a name to a global on the fly.
Also, there are no strings in HamsterSpeak : P
Be content with 'Write global', you can do everything with that that you could do with on the fly global declarations. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
junahu Custom Title: 45 character limit

Joined: 13 Jan 2004 Posts: 369 Location: Hull, England
|
Posted: Mon Aug 02, 2004 3:01 am Post subject: |
|
|
I forgot about the no strings rule
new suggestion, a command that checks if a textbox is currently up (if(textbox) while(textbox)). It's not neccessary but it would be handy. _________________
 |
|
Back to top |
|
 |
SlightlyPyro Definitive

Joined: 04 Jun 2004 Posts: 40 Location: lo-CAY-shun: a locating or being located.
|
Posted: Mon Oct 25, 2004 11:51 am Post subject: |
|
|
How about James adds a command that let's us use scripts by number? Or is there one already and I read the whole plotscript dictionary and missed it? 'Cause I really hate having to do a bunch of if-then-else's when I could just punch in an algorithm and have 5 lines of code reference ten different scripts depending on certain variables....which I've been doing a lot of lately. _________________ ~Pyro
SIG-ne-tyoor: a person's name written by himself, or a representation of this in a mark, stamp, deputy's handwriting, etc.
sig: that thing above with like totally screwed up messages and smilies and lots of other crap |
|
Back to top |
|
 |
Mr B
Joined: 20 Mar 2003 Posts: 382
|
Posted: Mon Oct 25, 2004 6:04 pm Post subject: |
|
|
You can sorta emulate being able to run scripts by their number.
Use the "get death script" command (whatever it's called) to retrive the current death script number. Store that in a variable.
Use the "set death script" command (or whatever it's called) to set the death script, passing a script number to the command.
Then "death" the game (yay! it's a verb).
After the script is over, use "set death script" again, passing it the value you saved back at the first command.
At least I THINK this will work...I haven't actually tried it myself. |
|
Back to top |
|
 |
Guest
|
Posted: Mon Oct 25, 2004 6:21 pm Post subject: |
|
|
Actually, I'd thought of that and tried it...till it about killed me. It took more lines of code than my wierdo if-then-else tree, and was extremely inefficient for my purpose, which was essentially to have a switch statement on one or two lines of code. Guess I'll just have to stick with what I've got.[/b] |
|
Back to top |
|
 |
SlightlyPyro Definitive

Joined: 04 Jun 2004 Posts: 40 Location: lo-CAY-shun: a locating or being located.
|
Posted: Mon Oct 25, 2004 6:23 pm Post subject: |
|
|
Crap, I thought I'd logged in. The above is from me (in case you're blind and couldn't tell). _________________ ~Pyro
SIG-ne-tyoor: a person's name written by himself, or a representation of this in a mark, stamp, deputy's handwriting, etc.
sig: that thing above with like totally screwed up messages and smilies and lots of other crap |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Tue Oct 26, 2004 12:06 pm Post subject: visible text box |
|
|
junahu wrote: |
new suggestion, a command that checks if a textbox is currently up (if(textbox) while(textbox)). It's not neccessary but it would be handy. |
text box is definitely on my list of things to include in the next update. I recently realized that it was neccisary to add it in order to allow people to write theor own wait for text box variants.
It will probably return the ID number of the currently displaying text box, or false if not text box is displaying at all. (which means that it will not work for text box zero, but since text box zero is kindof a magic "template" text box for setting the defaults for NEW text boxes, thast doesn't bother me too terribly much.)
Edit: silly board doesn't let me use typewriter tags!
Edit: yay! typewriter tags! Now my plotscripting command names look 12% cooler!
Last edited by Bob the Hamster on Tue Oct 26, 2004 3:18 pm; edited 1 time in total |
|
Back to top |
|
 |
Inferior Minion Metric Ruler

Joined: 03 Jan 2003 Posts: 741 Location: Santa Barbara, CA
|
Posted: Tue Oct 26, 2004 12:54 pm Post subject: Re: visible text box |
|
|
James Paige wrote: |
Edit: silly board doesn't let me use typewriter tags! |
It does now  _________________
|
|
Back to top |
|
 |
Aethereal SHUT UP. Elite Designer


Joined: 04 Jan 2003 Posts: 928 Location: Gone! I pop in on occasion though.
|
Posted: Tue Oct 26, 2004 7:34 pm Post subject: |
|
|
I don't know if this has already been suggested, but a plotscripting command to reload the default passability on a map based on the passability set in the maptiles editor would be nice. _________________
 |
|
Back to top |
|
 |
Shadowiii It's been real.

Joined: 14 Feb 2003 Posts: 2460
|
Posted: Tue Oct 26, 2004 7:36 pm Post subject: |
|
|
An
"End (scriptname)"
It just terminate the script, regardless of what is in it. If there is stuff in it, it terminates that too. Also:
"End All Scripts"
Terminate all scripts.
This would be REALLY useful. _________________ But enough talk, have at you! |
|
Back to top |
|
 |
Sephyroth Renegade Rebel Redmage Class A Minstrel

Joined: 04 Feb 2003 Posts: 644 Location: Schmocation
|
Posted: Fri Apr 22, 2005 8:04 am Post subject: |
|
|
a script that checks the system time, perhaps? (That is, it would return the actual time in hours and minutes.) A script like this could be useful for doing something similar to the time system in the recent Pokemon iterations.
(Also, i am of reviving a dead thread?) _________________ im realy ded  |
|
Back to top |
|
 |
Mike Caron Technomancer

Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Sun Apr 24, 2005 6:21 am Post subject: |
|
|
I don't think it counts for sticky threads...
Anyway, I suggested this a while ago on the OHR Mailing list, but thanks for reminding me. I'll do this myself soon. How's "system hour()", "system minute()" and "system second()"? _________________ I stand corrected. No rivers ran blood today. At least, none that were caused by us.
Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ |
|
Back to top |
|
 |
Kizul Emeraldfire Type: Cyber Dragoon

Joined: 26 Mar 2004 Posts: 229
|
Posted: Mon Feb 20, 2006 7:47 pm Post subject: |
|
|
W00t, posting in a stickied thread, posting in a stickied thread! A stickied thread with posts ranging from 'oldie' to 'moldy-oldie'! XD
But, um, onto my suggestion — how about a 'suspend key' command? It'd use scancodes o'course.
Example:
Code: | suspend key (28) #=- Make the Enter Key go dead! HAHAHA~! DIE RETURN, DIE!!! <<; >>;
resume key (28) #=- And of course, the mandantory resume function.
suspend all keys but (28) #=- Ha ha ha, now the only key that will do anything is Enter! >:D
resume all keys #=- And the antidote to the above. |
I think these could be some useful functions here, I do. :3 |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Mon Feb 20, 2006 9:17 pm Post subject: |
|
|
Generally, this effect is accomplished by using the suspend player and suspend box advance keys. I can see how it'd be useful to have more specific suspends, but there's no reason to suspend, say, the A key. _________________
|
|
Back to top |
|
 |
|