Page 3 of 4

Re: TSO Game Plan. Warm up.

PostPosted: Tue Sep 28, 2010 12:37 am
by TSO
EDIT: edit post by mistake... just erase it all...

Re: TSO Game Plan. Warm up.

PostPosted: Tue Sep 28, 2010 5:02 am
by zxcvbnm
Ok you want the timer to count down backwards properly right. Here you go , it starts at 100 and counts down. If you need futher explaination on how this works , just let me know. You did the code right , but have to add commands in the create actor. If you got this down pat , we will go on to the next problem. Dont worry about the animations in the data folder , thier from another game Iam working on.

Re: TSO Game Plan. Warm up.

PostPosted: Tue Sep 28, 2010 1:58 pm
by TSO
I know how to add and subtract from counter.
I just don't know how to enforce conditions for adding and subtracting.
I added your extra lines of code in create actor but the same problem still happens.

Re: TSO Game Plan. Warm up.

PostPosted: Tue Sep 28, 2010 3:04 pm
by TSO
nvm I just changed it to 300 seconds which adds up to 5 minutes. Lazy way out.

Re: TSO Game Plan. Warm up.

PostPosted: Wed Sep 29, 2010 3:59 pm
by TSO
So random number generators...

Re: TSO Game Plan. Warm up.

PostPosted: Thu Sep 30, 2010 3:25 pm
by TSO
So with some trial and error I got some random code to work to randomly drop a powerup when enemies die.

Code: Select all
power = rand(2);
if (power!=1)
{
  power = rand (2);
  if (power!=1)
  {
    power = rand(2);
    if (power!=1)
    {
     CreateActor("PuPDoubleShot", "Harp", "(none)", "(none)", 0, 0, false);
    }
  }
}


It seems kinda over done with if statements but in testing it's only thing that actually worked properly.
out of like 10 games it fires off maybe twice at most.

I tried a much shorter code.

Code: Select all
power = rand (10);
if (power=1)
{
 createactor
}


switch with things like if (power!=1) and the results was if statement always firing...
Annoying...

Re: TSO Game Plan. Warm up.

PostPosted: Thu Sep 30, 2010 4:14 pm
by lcl
TSO wrote:I tried a much shorter code.

Code: Select all
power = rand (10);
if (power=1)
{
 createactor
}


switch with things like if (power!=1) and the results was if statement always firing...
Annoying...


TSO, your code has problem. You wrote it so that it always makes power equal to 1. You have to write:
Code: Select all
power = rand (10);
if (power==1) //See this line!!
{
 createactor
}


And, you see that != means not equal to and == means equal to. :D

Re: TSO Game Plan. Warm up.

PostPosted: Thu Sep 30, 2010 6:23 pm
by TSO
damn... I must not be paying attention...
gotta retrace steps to check for more errors...

Re: TSO Game Plan. Warm up.

PostPosted: Fri Oct 01, 2010 5:03 pm
by TSO
I spam left ctrl
Animation spams until the shot is fired.
How do I stop animation from firing until actual shot is fired?

Re: TSO Game Plan. Warm up.

PostPosted: Mon Oct 04, 2010 12:06 am
by TSO
There another file type for animations other then GIF GE accepts?
What are the animation methods it can use? I noticed the tiles and health bars animate or semi-animate. and a quickly drew one my self in the method. But what if something has a lot of frames? There a program or a function in graphics gale anyone knows?

Re: TSO Game Plan. Warm up.

PostPosted: Mon Oct 04, 2010 12:11 am
by TSO
Also can anyone find the problem with my image?
I already drew one that turned out perfectly and even modified it to be wider and two bullets side by side in the animation instead. and it turns out fine.
But this is the 2nd time I've redrawn and entirely re-animated this image and these black outlines GE keeps showing only got worse.

Re: TSO Game Plan. Warm up.

PostPosted: Mon Oct 04, 2010 3:51 am
by zxcvbnm
You can use PNG format also. For animations lets say you draw a man walking in PNG. You can name each file man11,man2, and man3. Game Editor wil put the animations in the order that you selected.

Re: TSO Game Plan. Warm up.

PostPosted: Mon Oct 04, 2010 4:34 am
by DilloDude
Or have all the frame in one image, or sprite sheet.

Re: TSO Game Plan. Warm up.

PostPosted: Mon Oct 04, 2010 2:55 pm
by TSO
sprite sheet that was the word I was looking for.
I got a lot of frames so making a sprite sheet by hand would be rather time consuming.
I'll try the PNG method. maybe that file type works best...

Re: TSO Game Plan. Warm up.

PostPosted: Mon Oct 04, 2010 3:00 pm
by TSO
odd... I had multiple jpeg files left over and tried the multi-file select in GE. Image was alright but the white showed up in background still... need it transparent.

Tried same thing with PNG and I get these random black lines through the graphic again...