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

Joined: 13 Jan 2004 Posts: 369 Location: Hull, England
|
Posted: Tue Jun 08, 2004 3:24 am Post subject: |
|
|
a command to read the ASCII code of the key being pressed and a command to convert an ASCII value into text would allow us to collect text input from the player much more smoothly. No longer would we have to use rename hero quite so much _________________
 |
|
| Back to top |
|
 |
SlightlyPyro Definitive

Joined: 04 Jun 2004 Posts: 40 Location: lo-CAY-shun: a locating or being located.
|
Posted: Fri Jun 11, 2004 9:40 am Post subject: |
|
|
Yes, some commands that directly access the submenus within the main [Esc] menu would really be nice. Especially exit and save to file commands...then you could assign various submenus to different keys and rewire [Esc] to save and quit...
Dreaming on... _________________ ~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 |
|
 |
jabbercat Composer

Joined: 04 Sep 2003 Posts: 823 Location: Oxford
|
Posted: Fri Jun 11, 2004 10:22 am Post subject: |
|
|
| that is actually to which I refered. I might as well try and hack the command myself. *groan* |
|
| Back to top |
|
 |
SlightlyPyro Definitive

Joined: 04 Jun 2004 Posts: 40 Location: lo-CAY-shun: a locating or being located.
|
Posted: Mon Jun 14, 2004 4:36 am Post subject: |
|
|
Another thing I forgot that would be *really* helpful is arrays. So I don't have to do a bunch of "for" loops to get all the NPCs I want marching around the screen. _________________ ~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 |
|
 |
junahu Custom Title: 45 character limit

Joined: 13 Jan 2004 Posts: 369 Location: Hull, England
|
Posted: Mon Jun 14, 2004 4:39 am Post subject: |
|
|
Yeah, so far we can only fake global variable arrays with read global and write global _________________
 |
|
| Back to top |
|
 |
MultiColoredWizard Come back, baby! The Breastmaster

Joined: 01 Feb 2003 Posts: 1232
|
Posted: Mon Jun 14, 2004 6:02 am Post subject: |
|
|
| So what's the difference in them, then? |
|
| Back to top |
|
 |
SlightlyPyro Definitive

Joined: 04 Jun 2004 Posts: 40 Location: lo-CAY-shun: a locating or being located.
|
Posted: Mon Jun 14, 2004 7:01 am Post subject: |
|
|
Besides being significantly more convenient, *real* local arrays would be more reliable and take far less work to set up than fake global arrays. And then there's the nice little fact that you wouldn't have to have 20 global variables up at the top of your HSS just for one array that has 20 NPCs move, and then another 30 for changing the tiles in that corner of your map... _________________ ~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 |
|
 |
MultiColoredWizard Come back, baby! The Breastmaster

Joined: 01 Feb 2003 Posts: 1232
|
Posted: Mon Jun 14, 2004 9:17 am Post subject: |
|
|
What, just use arguments, and then give all the NPCs that argument, and then use walknpc(npcargument,up,1)
Etc. |
|
| Back to top |
|
 |
SlightlyPyro Definitive

Joined: 04 Jun 2004 Posts: 40 Location: lo-CAY-shun: a locating or being located.
|
Posted: Mon Jun 14, 2004 9:47 am Post subject: |
|
|
That'd be awesome if I were using different npcs...but if I'm using 20 copies of the same npc, the script would get the same argument from each one...which is why arrays would be nice. For example, assuming our hypothetical array was initiated with an "array" command and had commands called "setelement", "arraylength" and "getelement":
| Code: | array (arrayName)
variable (i)
set variable (i,1)
while (i < 21) do begin
setelement (arrayName,i,NPCreference(0,i))
increment (i)
end
set variable (i,0)
while (i < arraylength(arrayName)) do begin
walknpc (getelement(arrayName,i),north,1)
end |
Or some such variation thereof. This isn't actually why I'd like arrays, but it shows sorta what they'd be helpful for. _________________ ~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 |
|
 |
MultiColoredWizard Come back, baby! The Breastmaster

Joined: 01 Feb 2003 Posts: 1232
|
Posted: Mon Jun 14, 2004 12:06 pm Post subject: |
|
|
what, wouldn't giving just that npc the argument work, then?
(i see what you're saying, though) |
|
| Back to top |
|
 |
SlightlyPyro Definitive

Joined: 04 Jun 2004 Posts: 40 Location: lo-CAY-shun: a locating or being located.
|
Posted: Mon Jun 14, 2004 1:08 pm Post subject: |
|
|
Actually, you're right...Gaah! I've been programming in FORTRAN all day, dangit, I can't think HS right now...
But
| As I previously wrote: | | Or some such variation thereof. |
It'd be nice for something SIMILAR to my code...  _________________ ~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 |
|
 |
Flamer The last guy on earth...

Joined: 04 Feb 2003 Posts: 725 Location: New Zealand (newly discovered)
|
Posted: Mon Jun 14, 2004 1:22 pm Post subject: |
|
|
couldn't you just go
| Code: |
variable(i)
for(i,0,20,1) do(
walk NPC(NPCreference(number,i),north,1)
)
|
plus globals do the same thing as that array above.
| Code: | define constant ( a, array ) #a is where ever the array should be allocated in the global variables table.
variable(i)
for(i,0,20,1) do(
write global(array + i,NPC reference(number,i))
) |
it'll probably save a few bits as well, because it won't have to store how big the array is. of course you can always fake that as well, with...
| Code: | | define constant ( a, arraylength ) #a is the array length |
i've never tried an in-game define constant, but i'm sure you can figure a way around that.  _________________ If we were a pack of dogs, IM would be a grand Hound, CN would be a very ficious little pitball, and Giz...well, it doesn't matter breed he is, he'd still be a bitch
(no offense to anyone that was mentioned) |
|
| Back to top |
|
 |
SlightlyPyro Definitive

Joined: 04 Jun 2004 Posts: 40 Location: lo-CAY-shun: a locating or being located.
|
Posted: Wed Jun 16, 2004 4:52 am Post subject: |
|
|
Sure, I could do that. But I'm a programmer, not an artist. I don't like adding little realistic details to my code. Like all good programmers, I despise doing more work than is absolutely necessary. Arrays are much easier to use and debug when their insides aren't splattered across your code, and they're generally more reliable because they're hardcoded into the language. _________________ ~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 |
|
 |
Flamer The last guy on earth...

Joined: 04 Feb 2003 Posts: 725 Location: New Zealand (newly discovered)
|
Posted: Wed Jun 16, 2004 6:13 am Post subject: |
|
|
that's the trouble with some programmers... they're too used to one method, they hate the other methods and are too lazy to manage the details.
| Quote: | | Like all good programmers, I despise doing more work than is absolutely necessary. |
not all, not all at all... maybe to you they only do what is necessary and that's it. I've seen a few good programmers myself, and they do more work than is "absolutely necessary"
it's not that blooming hard to think a little outside your comfort zone, just to get something you want.
i mean, look at some of the plotscriptors here, some has developed their own battle system, which is definately not "absolutely necessary," and they're pretty good at it. sure the systems may be a bit buggy here and there, but at least they went the extra mile to do the job.
(sorry if this sounds like ranting, but i just not like how some people can be so damn lazy, that they can't even "take one step forward to grab the remote for the TV") _________________ If we were a pack of dogs, IM would be a grand Hound, CN would be a very ficious little pitball, and Giz...well, it doesn't matter breed he is, he'd still be a bitch
(no offense to anyone that was mentioned) |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Jun 16, 2004 6:35 am Post subject: |
|
|
Hm...I don't think you fully understood my comment
I didn't mean that I wouldn't go out of my way to do something special with my program. I'm currently busting brain cells to get a system of soft-coded levels and exp into my game, along with some other...stuff. I just meant that the easiest route to get to where I want to go is the route I prefer to take. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|