Game Maker's Garage Forum

Game Creation => SilverCreator => Topic started by: Chamez on May 23, 2010, 07:50:09 PM

Title: Is there?
Post by: Chamez on May 23, 2010, 07:50:09 PM
Is there an if sprite on X,Y then DO command in Sc?
Title: Re: Is there?
Post by: WarHampster on May 23, 2010, 08:03:11 PM
Code: [Select]
IF SPRITEX spritenum = x THEN
IF SPRITEY spritenum = y THEN
do whatever
END IF
END IF
Title: Re: Is there?
Post by: EqwanoX on May 23, 2010, 08:47:30 PM
if spritex(1)=number then
if spritey(1)=number then
execute code
end if
end if

but its difficult to pinpoint exact coordinates depending on what your doing, so you might want to make it execute if sprite is within a 50 pixel radius

if spritex(1)>50 then
if spritex(1)<100 then
if spritey(1)>50 then
if spritey(1)<100 then
code
end if
end if
end if
end if

or you can execute code when any part of the sprite touches a coordinate
if spritetouchingxy(1,x,y)=true then
code
end if
Title: Re: Is there?
Post by: Connors on May 24, 2010, 10:00:16 PM
SOMEONE needs to make a good newbie tutorial for SC. In fact, maybe I should start on that project! :D
BTW, I asked a lot of the same questions, so look through this forum for some more tips.
Title: Re: Is there?
Post by: GMG Mike on May 25, 2010, 12:32:05 AM
I just had an idea for a new event: Sprite Moved.
Title: Re: Is there?
Post by: Silverwind on May 25, 2010, 03:22:30 PM
Hey Mike, you've totally gotta add a Make Game command to the next update. SC's minimal capabilities hinder my creativity.