|
Post by megamushroom on Jan 22, 2004 17:03:49 GMT -5
ok , this is mainly aimed at Ism, as i am using his dialogue system!
hi, i am wondering if you have any ideas of how to do these, as i am stuck!
1) have it so when u press enter, more text appears in the texty box. I tried using variables, but the error: global.texty[m]=global.texty[m-1] arrays out of bounds came up, im not 2 sure about arrays yet, so any suggestions?
2) make a simple question box, say a yes or a no answer, and depending on the place of your arrow, depends on what is returned (0 or 1). I have seen this done on a pause example (all keyboard, no mouse), but i cant do it with the obj_texty because the obj appears at differnt places!
3) have it so that obj_texty rectangle is +5 larger than the text inside it?
i may end up having it appear at the bottom like yours, but for now i have it appearing next to my player if you press space whilst colliding into a npc.
i can give you my file if that helps
thanks for the suggestions!
|
|
|
Post by IsmAvatar on Jan 23, 2004 17:49:20 GMT -5
lol, to 'aim something at someone', you'd use the PM system. But, I guess this is open to the public since anyone can answer, as long as they are fluent with coding, and have seen my dialogue box example.
actually, the text length limit is not my decision, it's marks. Keyboard_string has a limit of so many characters, and after that many, it starts to erase itself. I tweaked it so that you simply cannot type anymore after that limit, so that it doesn't erase itself. Sorry, but unless mark extends the limit of keyboard_string, this won't change.
arrays out of bounds well, that means that you are trying to call an array of -1, or greater than 32000. This is another limit that is not my choice. Mark put a limit on arrays, so that it cannot be more than 32000 (I think that's the number).
A question box, This is a bit of a challenge, and especially to simply call it as a script and have it return true or false. show_question can be done using the keyboard, just so you know, but the keys are a bit different. My first attempt would be to make 2 obects, a yes and no button, and then 1 additional object for each different question. Then just have some fun events and stuff. My more advanced idea could drop the 2 extra objects for yes and no, and just use drawing functions and variables.
obj_texty rectangle is +5 well, I think I used a sprite, so just enlarge the sprite by 10x10, and set the origin to 5,5 and you should be fine.
Idunno, I kinda tend to go in over my head when I'm doing this stuff (don't ask me how), and once it's done, there's no turning back... lol.
|
|
|
Post by megamushroom on Jan 24, 2004 15:55:41 GMT -5
ok, thanks for your help, i think im going to change the dialouge system a bit, maybe learn arrays and make my own! using two objects for the question i can do, it is the other way i was asking about, but i think i can figure it out due to an example I found on a site thanks again! ps, you used the draw_rectangle function, not a sprite!
|
|
|
Post by IsmAvatar on Jan 24, 2004 17:39:09 GMT -5
oh, well then just draw it -5 and +5
I thought it was a sprite.
|
|
|
Post by megamushroom on Jan 24, 2004 19:30:02 GMT -5
thats what im stuck on, -5/+5 from what?
|
|
|
Post by IsmAvatar on Jan 24, 2004 20:02:02 GMT -5
well, how do I draw the rectangle?
draw_rectangle(x1-5,y1-5,x2+5,y2+5)
|
|
|
Post by megamushroom on Jan 24, 2004 20:06:56 GMT -5
you draw the rectangle: draw_rectangle(x,y,room_width,room_height)
could i put say +5 from string_length, but it aint a string is it?
|
|
|
Post by IsmAvatar on Jan 24, 2004 20:32:40 GMT -5
mm. draw text +5 more than it is at. Then, cut it's rightmost short 10 pixels. also, you may have to remove the bottommost line to keep it 5 pixels from the edge.
|
|
|
Post by megamushroom on Feb 7, 2004 15:47:06 GMT -5
ok, i kinda changed the system now, but have started using views. How would i draw the obj_texty so it is always in thesame place in the view? i have tried view_left[0]+0 and view_top[0]+300, but it doesnt work! any suggestions?
ps, i have a great idea for a dialogue system, but dont have the knowledge of arrays like you do to make it(i have only used the for statement so far!), pm me if you are interested in helping make it/hearing about it!
|
|
|
Post by IsmAvatar on Feb 8, 2004 20:26:00 GMT -5
1) x = view_left[0] y = view_top[0] + view_height[0] - 16
2) make sure you look around, there's lots of resources for learning arrays. Once you've looked at them and are still hopeless, then you can contact me and I'll look into the matter. I also suggest you put the idea on the floor so anyone can take a swing at it.
|
|
|
Post by megamushroom on Feb 11, 2004 10:51:31 GMT -5
hmm, its createing the object fine, but it still isnt in the view?
|
|
|
Post by IsmAvatar on Feb 11, 2004 15:52:11 GMT -5
use debug mode to find out its x and y coordinates. also, use debug mode to find out the view_top[0] and view_left[0]
Also, most importantly, make sure you are using view 0. if you are using another view, either change the view to view 0, or change the numbers in your code. suppose you're using view 1 instead. view_top[1] view_left[1] view_height[1]
|
|
|
Post by megamushroom on Feb 12, 2004 10:21:46 GMT -5
thanks, it works now, i figured it out with your help
|
|
|
Post by IsmAvatar on Feb 13, 2004 1:37:33 GMT -5
So glad I could help
|
|