Topic:   Re: Newbie help?   (Read 23294 times)


0 Members and 3 Guests are viewing this topic.

Xiphos


  • GMG-er

  • **


  • Posts: 676
Re: Newbie help?
« Reply #15 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?

GMG Hendo


  • GMG-er

  • **


  • Posts: 155

  • [WITTY TEXT GOES HERE]
Re: Newbie help?
« Reply #16 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

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: Newbie help?
« Reply #17 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)
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/

GMG Hendo


  • GMG-er

  • **


  • Posts: 155

  • [WITTY TEXT GOES HERE]
Re: Newbie help?
« Reply #18 on: July 04, 2009, 05:05:41 PM »
No that goes through Sprites 1-8, checks if it exists, and if so kills it.

Redd


  • GMG-er

  • **


  • Posts: 118

  • Silent, but very, very deadly.
Re: Newbie help?
« Reply #19 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

GMG Hendo


  • GMG-er

  • **


  • Posts: 155

  • [WITTY TEXT GOES HERE]
Re: Newbie help?
« Reply #20 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

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: Newbie help?
« Reply #21 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
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/