Jump to content


necrolium

Member Since 27 Apr 2008
Offline Last Active Aug 10 2012 05:34 AM

Posts I've Made

In Topic: Options

25 June 2012 - 09:47 PM

Oh okay. I set my text like this:
Create
text = "blahblah"
str = 0;
intro = 0;
Step
if str < string_length(text){str += 2}
if str > string_length(text){str = string_length(text)}
if str = string_length(text) and keyboard_check_pressed(ord("Z")){
intro += 1;
str = 0;
}
if intro = 1{
text = "more blahblah"
}
if intro = 2{
text = "even more blahblahblah. do you need help?"
}
Draw
if intro > -1{
draw_sprite(spr_textbox,0,view_xview[0],view_yview[0]+280);
draw_text(view_xview[0]+40,view_yview[0]+300,string_copy(text,0,str))
}

In Topic: Options

25 June 2012 - 06:31 PM

step

if help{
  option = (option + keyboard_check_pressed(vk_down) - keyboard_check_pressed(vk_up) + 2) mod 2;
}
the long line is kinda poinless with just 2 selections as you could just use a switch like so:
if keyboard_check_pressed(vk_down) or keyboard_check_pressed(vk_up) option = !option;
but if you get more then 2 then it becomes quite handy since you can just change the 2 last numbers to how many options you got

draw
if help{
  draw_sprite(spr_help,option,view_xview[0]+16,view_yview[0]+140);
}

it's not that hard to have multible option selections:
opt[0] = "yes"
opt[1] = "no"
opt[2] = "huh?"
tot=3;
and draw all as text while one of them is highlighed if you want that

Okay but how would I have a different outcome if you choose one of the 2. Do I have to create another variable?

In Topic: Options

25 June 2012 - 07:57 AM

I think you misunderstood a little but thanks anyway. I have the variable 'help' so that when the text is over it can signal the options to be drawn. I have option as yes or no. 0 being yes and 1 being no.

In Topic: Animation Stop

23 June 2012 - 07:37 PM

Thank you so much, I was stumped on this for 2 days. It finally worked.

In Topic: Animation Stop

23 June 2012 - 07:23 PM

The image speed is already set to 0.2 when walking = true which is triggered by a key press event. Also I meant that if I set the image speed to 0 within that code and I release the key making walking = false, the animation will not revert to the first frame or third frame which is standing still, but instead will freeze entirely even if the step is still being taken.