Topic:   Is this for me   (Read 20465 times)


0 Members and 1 Guest are viewing this topic.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Is this for me
« Reply #15 on: February 18, 2009, 06:02:34 PM »
LOL! Siggin', and using the title!
I survived the spammage of 2007

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: Hello!
« Reply #16 on: February 18, 2009, 09:45:37 PM »
Quote
Woh! Impressive... you don't by any chance eat nails with your Corn Flakes do you? ;D
No I don't. Are they any good in corn flakes?
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Is this for me
« Reply #17 on: February 19, 2009, 04:33:53 AM »
Quote
No I don't. Are they any good in corn flakes?
They're alright, but titanium screws are my thing... without any milk too!
« Last Edit: February 19, 2009, 04:35:27 AM by Silverwind »
I survived the spammage of 2007

Gnome


  • GMG Extraordinaire

  • ***


  • Posts: 1073
Re: Is this for me
« Reply #18 on: February 19, 2009, 02:34:43 PM »
I eat PCs with my cornflakes.
This Cannot be, NOOOOOOOO!!!!

-Gnomes Cry when the McRib was discontinued again.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: Is this for me
« Reply #19 on: February 19, 2009, 02:45:35 PM »
Haha. I just eat cocoa rice.


-Gandolf

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: Is this for me
« Reply #20 on: February 19, 2009, 03:34:27 PM »
I don't eat breakfast at all.

C-C-C-COMBO BREAKER!

bellybot1


  • GMG Newbie

  • *


  • Posts: 22

  • I love YaBB 1G - SP1!
Re: Is this for me
« Reply #21 on: February 19, 2009, 10:39:24 PM »
now back on topic

With a lot of trial and error i have been able to create my first game, which i must say i am quite proud of. What it is is two sprites, controlled using the arrow keys and wasd, are put in separate corners to start of with, you then run around and when the two sprites touch an alert pops up and says Tag you're it! It then sends the two sprites back to their starting points. So it is my version of tiggy. two questions how can i stop them running of the screen and secondly is there a way of making that alert box saying every even time "Tag You're it William" And every odd time "Tag You're it Daniel"

Thanks

Oh and if you haven't realised yet im using silver creator
« Last Edit: February 19, 2009, 10:47:08 PM by bellybot1 »

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Is this for me
« Reply #22 on: February 20, 2009, 03:12:13 AM »
I'm not fluent in SC, but Eq, Hampster and Gan are. It sounds like an impressive first game though, I couldn't grasp how to use sprites for months, hehe...
I survived the spammage of 2007

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: Is this for me
« Reply #23 on: February 20, 2009, 12:06:12 PM »
Quote
two questions how can i stop them running of the screen and secondly is there a way of making that alert box saying every even time "Tag You're it William" And every odd time "Tag You're it Daniel"

For the first problem, just add another condition to your movement commands that stops the movement from continuing if the sprite is off screen. For example,

Code: [Select]
IF SPRITEY(1) > (the highest y value on the screen) THEN
IF key$ = uparrow$ THEN
PUSHSPRITE 1,0,10
END IF
END IF

SPRITEY and SPRITEX return the x or y value of the sprite passed to them as a parameter. For example, lets say that sprite 1 is at the coordinates 10,30. Using SPRITEY(1) would return 30.

bellybot1


  • GMG Newbie

  • *


  • Posts: 22

  • I love YaBB 1G - SP1!
Re: Is this for me
« Reply #24 on: February 20, 2009, 12:59:36 PM »
Thanks for that

But there is one problem, im able to do one wall but how do i add in the other walls. Please tell me how this is wrong.

Code: [Select]
END IF
IF SPRITEY(1) < 0 THEN
   IF key$ = uparrow$ THEN
      PUSHSPRITE 1, 0, 25
END IF
IF SPRITEY(1) > 291 THEN
   IF key$ = downarrow$ THEN
      PUSHSPRITE 1, 0, -25
      END IF
   END IF
END IF

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Is this for me
« Reply #25 on: February 20, 2009, 01:54:41 PM »
I'm not sure if this is helpful or not, but in GM an effective solution would be:

Code: [Select]
IF SpriteX < LeftWall THEN SpriteX = LeftWall
IF SpriteX > RightWall THEN SpriteX = RightWall
IF SpriteY < UpWall THEN SpriteY = UpWall
IF SpriteY > DownWall THEN SpriteY = DownWall

I'm not sure what the SC syntax is, but the same logic would apply.
I survived the spammage of 2007

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: Is this for me
« Reply #26 on: February 20, 2009, 01:57:09 PM »
what? you have your "<" and ">" mixed up, switch them and it should work.


in gm you would edit the sprite coordinate variables, in sc you just use the movesprite command, same thing. and you could assign the wall coordinates to variables to make it easier to edit later

let leftwall=0

if spritex(1)<leftwall then
movesprite 1, leftwall, spritey(1)
end if
« Last Edit: February 20, 2009, 02:01:09 PM by EqwanoX »

bellybot1


  • GMG Newbie

  • *


  • Posts: 22

  • I love YaBB 1G - SP1!
Re: Is this for me
« Reply #27 on: February 20, 2009, 02:30:29 PM »
Thanks Eqwanox

Now that ive made them not run of the board i only have a few more things to do:
Make rocks in the scenery that block movement.
Make the Title Card and Instructions
Make the Alert switch between words each time
Upload it onto this website.

If anyone could help with any of those i would be very grateful.

Thanks

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: Is this for me
« Reply #28 on: February 20, 2009, 02:43:22 PM »
I'm not sure what you mean by making the alert switch words...

As for obstacles, you could probably use something like this to start: http://www.silvercreator.net/cgi-bin/yabb/YaBB.pl?board=sccode;action=display;num=1164845614

Al Staffieri


  • GMG-er

  • **

  • no avatar

  • Posts: 452

  • I love GameMaker
Re: Is this for me
« Reply #29 on: February 20, 2009, 04:11:29 PM »
Quote
is there a way of making that alert box saying every even time "Tag You're it William" And every odd time "Tag You're it Daniel"

This is GameMaker code, but SC should be very similar

IF player = 1 THEN
  ALERT Tag You're it William.
  player = 2
ELSE
  ALERT Tag You're it Daniel.
  player = 1
END IF


You should let the players type in their names at the beginning and then use those name variables. I think Sc would be something like this:

IF player = 1 THEN
  ALERT "Tag You're it " + player1$
  player = 2
ELSE
  ALERT "Tag You're it " + player2$
  player = 1
END IF