Axe Software Forums
  Quest Developer Forum
  Whats going on?


Author Topic:   Whats going on?
Luridii posted 12-08-2001 12:07 GMT     
I have several arrays defined and this procedure

set string <string;#set%Y%1[1]#>
the numeric variable %Y% makes the array string not work.

set string <string;#set11[1]#>
set string <string;#set21[1]#>

these work and put the contents into the string variable.
But I set %Y% as 1 or 2, but the contents arn't put into the 'string' string

Computer Whizz posted 12-08-2001 12:47 GMT          
uuummmm.....

Luridii, an Array is usually used in this form:

<Enemy[1]; monkey>
<Enemy[2]; cow>
<Enemy[3]; chicken>
<Enemy[4]; wolf>

now, why you want to change a number OUTSIDE the []'s, I have no clue as to why you'd wnt to do that!

Try this:
set string <string;#set[%y%]#>

and the array of:

set string <set[1]; blah>
set string <set[2]; blah, blah!>

Computer Whizz

Alex posted 12-08-2001 13:25 GMT          
Array indexes that are numeric variables DON'T have the "%" signs around them.

This means CW was right apart from:

set string <string;#set[%y%]#>

which should be:

set string <string;#set[y]#>

Luridii posted 12-08-2001 13:26 GMT          
Ive already dun that for enemies %Y% is to say which set of enemies I want!
I'll xplain further if u want.
Computer Whizz posted 12-08-2001 17:15 GMT          
So you're going for the area specific monsters?
All I would advise is a variable.....
here:

Yo enter a room, this set's the variable "monster_type" to "Water". Then once the counter reaches 0 (not REALLY 0, that's just a frase!) then you go into battle with a monster chosen from the array "water[y]".
you then proceed into a room which changes the variable to "fire". Then it randomly selects a monster from the array "fire[y]".
Then you enter a room and it changes the variable to "clock_tower" and it selects one from there. You could have MANY monster array's..... I'd keep them in a library so that you could easily code to it when you think of a good monster/area.
Do you get my drift?
I don't know HOW you were going to do it, but it sounds quite difficult to me!

Does this help?

Computer Whizz

Luridii posted 12-08-2001 17:56 GMT          
I'm gonna do it the simpler way...

All my battle sys in a library, so I know where it is!

(and so i dont hav 2 code it again!!)

Computer Whizz posted 12-08-2001 18:01 GMT          
Simpler way?
I can't think of any easier way to code it!?

.... this way there might be a bit more to code, but it is easier IMO.

.....please, do tell!

Computer Whizz

Luridii posted 12-08-2001 18:44 GMT          
I meant the way I did b4
set string <string;#set%Y%1[1]#>

ill just hav to do several procedures wiv
set string <enemy1;#set11[X]#>
(alternate set)set string <enemy1;#set21[X]#>

etc. I'm doin X as a picked random num, for an enemy.

the room has a tag which sez which enemyset 2 use then i do an if statement 4 which procedure 2 do

Its sorta hard 2 explain really!


Computer Whizz posted 12-08-2001 18:51 GMT          
Well, if it does work out, then do send some code over to me will you?
It's always nice too look at another way of doing things.....

Computer Whizz