Game Maker's Garage Forum

Game Creation => SilverCreator => Topic started by: Xiphos on July 03, 2009, 01:03:12 PM

Title: Re: Newbie help?
Post by: Xiphos on July 03, 2009, 01:03:12 PM
It should be working, run the game and tell me what the error says?
Title: Re: Newbie help?
Post by: Connors on July 03, 2009, 01:06:47 PM
WOW thanks, thats was a fast reply...
your shure you're not a bot? lol
 I changed it already, my bad. :P

I think it set the x to 100100 or something

Here's what I did

CREATESPRITE 2, "Stickman"
MOVESPRITE 2,100,100


See the comma?
¬_¬
Title: Re: Newbie help?
Post by: Connors on July 03, 2009, 01:08:40 PM
Ummm is there a way to delete my post? I might as well.
Title: Re: Newbie help?
Post by: GMG Tim on July 03, 2009, 01:42:36 PM
Quote
Ummm is there a way to delete my post? I might as well.

The 'Remove' button in the upper right corner of the post will delete it. If you don't see it, make sure you're logged in!

Best,
Ghost
Title: Re: Newbie help?
Post by: Xiphos on July 03, 2009, 01:53:28 PM
So it works now connors?
Title: Re: Newbie help?
Post by: Connors on July 03, 2009, 02:35:49 PM
Yes it works...
I'm trying out other stuff now, and I found a far better question: how do you make something move constantly without user input? there's no section for repeating code :|
Title: Re: Newbie help?
Post by: Xiphos on July 03, 2009, 02:49:26 PM
You can create a timer like this

ON TIMER (period)
code
END TIMER

(period) = in ticks
60 ticks = 1 second
Title: Re: Newbie help?
Post by: Connors on July 03, 2009, 03:01:25 PM
Thanks, man!
I can maybe even finish a level today!





:F thats my favorite smiley.
Title: Re: Newbie help?
Post by: Xiphos on July 03, 2009, 03:06:38 PM
Great! Can't wait to see your first creation!
Title: Re: Newbie help?
Post by: Connors on July 03, 2009, 04:27:53 PM
Is there an easier way to make a whole lot of sprites do the same thing than make code for each one of them?
I want some enemies to come from the right side of the screen for a shooter type game...
Title: Re: Newbie help?
Post by: Xiphos on July 03, 2009, 05:11:19 PM
Code: [Select]
Let x = 1 to n
CREATESPRITE x
MOVESPRITE x
PUSHSPRITE x

n = total number of sprites

Sorry I was at dinner so it took me a while to post! I got this from eqwanox's shooter game!
Title: Re: Newbie help?
Post by: Connors on July 03, 2009, 05:50:49 PM
Cool! ...how do i give them different positions? :-/
Title: Re: Newbie help?
Post by: Xiphos on July 03, 2009, 05:54:44 PM
I think you have to do it separately I have no idea??!!!
Title: Re: Newbie help?
Post by: Connors on July 03, 2009, 06:53:00 PM
Well, thanks for the help.
I'll ask around. :)
Title: Re: Newbie help?
Post by: GMG Mike on July 04, 2009, 03:52:01 AM
Quote
Code: [Select]
Let x = 1 to n
CREATESPRITE x
MOVESPRITE x
PUSHSPRITE x

n = total number of sprites

Sorry I was at dinner so it took me a while to post! I got this from eqwanox's shooter game!

That code isn't right. you want FOR, not LET. You also need NEXT at the end.
Title: Re: Newbie help?
Post by: Xiphos on July 04, 2009, 09:06:02 AM
I am now confused??? I think the x = 1 to 8 thing works than you can say KILLSPRITE x and sprites 1 to 8 are removed? Right?
Title: Re: Newbie help?
Post by: GMG Hendo on July 04, 2009, 10:51:13 AM
Yes but the proper syntax would be
Code: [Select]
FOR x = 1 to n
IF SPRITEVALID(x)
KILLSPRITE x
NEXT
Title: Re: Newbie help?
Post by: Connors on July 04, 2009, 03:29:17 PM
So would that affect only the sprite that collided in a collision check? ( i haven't managed to make anything collide yet)
Title: Re: Newbie help?
Post by: GMG Hendo on July 04, 2009, 05:05:41 PM
No that goes through Sprites 1-8, checks if it exists, and if so kills it.
Title: Re: Newbie help?
Post by: Redd on July 04, 2009, 05:39:52 PM
Quote
Yes but the proper syntax would be
Code: [Select]
FOR x = 1 to n
IF SPRITEVALID(x)
KILLSPRITE x
NEXT
Code: [Select]
FOR x = 1 TO n
  IF SPRITEVALID(x) = TRUE THEN
    KILLSPRITE x
  END IF
NEXT

:P
Title: Re: Newbie help?
Post by: GMG Hendo on July 04, 2009, 06:10:43 PM
Quote
Code: [Select]
FOR x = 1 TO n
  IF SPRITEVALID(x) = TRUE THEN
    KILLSPRITE x
  END IF
NEXT

:P

lol oh yeah, havent touched SC in ages, just trying to go by memory :P
Title: Re: Newbie help?
Post by: Connors on February 23, 2010, 10:56:48 PM
WOW this is useful... (I haven't done anything with this since '09)
I'll try this soon. :P