Jump to content


Photo

help with title


  • Please log in to reply
3 replies to this topic

#1 sathk93

sathk93

    GMC Member

  • New Member
  • 6 posts
  • Version:Unknown

Posted 10 August 2012 - 02:37 PM

First i write the code :)
\\Create
image_speed=0;
var check,i;
check=1;i=1;
with(objgamename)
{image_index=i;
i=i+1;
}
alarm[0]=300;
\\Alarm0
script_execute(animationscript);
alarm[0]=300;
\\Left pressed
script_execute(animationscript);
alarm[0]=300;
the script
\\animation script
var i,j,c;i=0;j=-1;


with(objgamename)
{
array[i]=object_index;
i=i+1;
}

with(objgamename)
{j=j+1;
c=choose(array[j],0);

image_index=c;
}

i want to make the title of my game dynamically changing so instead of using a font i made each letter an object
i have created a sprite which has 16 images and one object
The game name is "copy cat survivor"==15 letters and created a blank image which was indexed at 0 position
i wanted to test if after every 5 secs the letters change images

What the problem is that in my array only array [0] gets defined while the rest go undefined
So i get something like this:
When game starts:
http://imageshack.us...capture1jt.png/
When Alarm 0 is called
http://imageshack.us.../capturemk.png/

Any opinions on how to correct it
thanks:)
and sorry for the bad graphics
I'm improving them
  • 0

#2 Nocturne

Nocturne

    Nocturne Games

  • Administrators
  • 16794 posts
  • Version:GM:Studio

Posted 10 August 2012 - 10:07 PM

Please read the forum descriptions before posting as this is not an apt topic for the Maths forum, but rather Q&A (which is where I have moved it for you)... Posted Image
  • 1

#3 sathk93

sathk93

    GMC Member

  • New Member
  • 6 posts
  • Version:Unknown

Posted 13 August 2012 - 03:13 PM

anyone there,who might know something.....

Though i have scrapped the plan
but still want to know what was i doing wrong

And yeah i'll keep in mind where to post,next time :P

Edited by sathk93, 13 August 2012 - 03:14 PM.

  • 0

#4 johnkapid

johnkapid

    Lead of hEOLiX

  • GMC Member
  • 143 posts
  • Version:GM:Studio

Posted 13 August 2012 - 06:35 PM

Make sure you have other.
var check,i;
check=1;i=1;
with(objgamename)
{image_index=other.i;
other.i=other.i+1;
}
Using with, you are defining inside objgamename. Use other to get the variable from the object you used with on.

Edited by johnkapid, 13 August 2012 - 06:37 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users