Jump to content


Photo

not sure how to proceed


  • Please log in to reply
2 replies to this topic

#1 scott7610

scott7610

    GMC Member

  • GMC Member
  • 127 posts
  • Version:GM8

Posted 10 August 2012 - 10:32 PM

I'm working on a button that when clicked, shows a list of orders to give your team in my sports game. I have the button part and the order part working, what i need help with is setting up a routine that when the button is pressed, the order you click on shows on the screen. a timer of 45 seconds start, during which the button is inactive. when the 45 seconds is up, the order on the screen disapears and the button can now be pressed. here is what i have so far.
create. set var. teo to 0, set var oc to 0, alarm[0]=0
alarm[0]. draw var teo 705,752
mouse left pressed. teo=show_menu('Skate hard|Skate easy|Go for it|Protect the lead|Hurry up',-1)

if teo=0 && global.lj=global.name then
{global.pen=global.pen-1
}

if teo=1 && global.lj=global.name then
{global.pen=global.pen+1
}

if teo =2 then
{global.pen=global.pen-2}

if teo=3 && global.lj=global.name then
{global.bs=global.bs+0}

if teo=4 then
{global.pen=global.pen-3}

alarm[0]=30*45

oc is for Order Clock. I hope someone can help me get this right. thanks.
  • 0

#2 smash ball

smash ball

    Volcanic Light

  • GMC Member
  • 1123 posts
  • Version:GM7

Posted 11 August 2012 - 02:27 AM

If I'm correct you're drawing the variable in the alarm[0] event? You have to draw it in the draw event.
  • 0

#3 scott7610

scott7610

    GMC Member

  • GMC Member
  • 127 posts
  • Version:GM8

Posted 11 August 2012 - 07:07 PM

i put the var in the alarm because I'm trying to set it up so that when mouse left pressed and teo is greater than -1, the 45 second alarm starts. I'm not sure how to code this and need help on setting it up. i thought that if the var was in the alarm and then when the alarm reached 0, the event would end.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users