Jump to content


Photo

hit 5 symbols to run command


  • Please log in to reply
2 replies to this topic

#1 vidokas

vidokas

    GMC Member

  • GMC Member
  • 191 posts
  • Version:GM8

Posted 14 March 2012 - 12:49 PM

if i press button A, then few 5 symbols will apear (that will go from top to down) and variable.A will be set to 10
if i hit symbol on specific place then variable.A will be set to 2 (relative) (if variable.A = 20 (all 5 symbols are hited) then set variable.Health to +1, and set variable.A to 0 again)
if i miss one, then variable.A will be set to -20 (if variable.A is < 0 then ) then variable.Health set to -1 (and set variable.A to 0)

the problems come here.
if i hit button A twice. then 10 symbols will apear and variable.A will be instantly set to 20 (wich causes player to get +1 Health)

i need somehow to make that every time i press button A, variable will be different.
for example first time pressed A, then it will be variable.A.1
second time. variable.A.2

but then i need to check every variable (from variableA.1 to variableA.infinity) if is not lower than -1.



or just need to change all mechanics.


any ideas?

Edited by vidokas, 14 March 2012 - 12:50 PM.

  • 0

#2 Arkaic.ind

Arkaic.ind

    GMC Member

  • GMC Member
  • 76 posts
  • Version:GM8

Posted 14 March 2012 - 01:38 PM

Ok all you should have to do is a simple check. In the press a event just do something like if symbols_exist = false {symbols_exist = true}
then make a check for your code.
if symbols_exist = true { (code here) }
Hope this helps :)
  • 0

#3 vidokas

vidokas

    GMC Member

  • GMC Member
  • 191 posts
  • Version:GM8

Posted 14 March 2012 - 07:06 PM

Ok all you should have to do is a simple check. In the press a event just do something like if symbols_exist = false {symbols_exist = true}
then make a check for your code.
if symbols_exist = true { (code here) }
Hope this helps :)

sorry, but i dont understand how that can help me :S
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users