This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-08-23 18:02:07

terminator355
Scratcher
Registered: 2008-07-31
Posts: 100+

any code help!!!(ill help ya!!)

if you have any code problems post here(it'l save space on the topic page) and itll be a giant topic  big_smile


No new stuff for now guys  wink  join me for some Black Ops on xbox: termhn or for some rock band on PS3: rocket232

Offline

 

#2 2008-08-23 18:38:52

terminator68
Scratcher
Registered: 2008-02-26
Posts: 1000+

Re: any code help!!!(ill help ya!!)

Hey! Kewl! I'm Terminator68 and your Terminator335!!


--------------------Scratcher since '08--------------------
http://images1.wikia.nocookie.net/__cb20110314152018/mlpfanart/images/5/5d/Applejack_chewing.gif

Offline

 

#3 2008-08-23 18:50:21

terminator355
Scratcher
Registered: 2008-07-31
Posts: 100+

Re: any code help!!!(ill help ya!!)

yah I saw that on a nother  topic and almost posted!!!!!!!! its CCCCCCCCCCCOOOOOOOOOLLLLLLLLLL!!!!!!!!!


No new stuff for now guys  wink  join me for some Black Ops on xbox: termhn or for some rock band on PS3: rocket232

Offline

 

#4 2008-08-23 22:55:59

Frogger5
Scratcher
Registered: 2008-08-23
Posts: 1

Re: any code help!!!(ill help ya!!)

hi I dont know how to make new levels and menues can you plz help me?<play sound[  ]and waits>

Offline

 

#5 2008-08-24 12:29:47

terminator355
Scratcher
Registered: 2008-07-31
Posts: 100+

Re: any code help!!!(ill help ya!!)

okay, first ill help you with the levels here goes:
[blocks]
(these are for the objects on the first level)
make a var called "level"
<when green flag clicked>
<show>
<forever>
<if><( <{ level }> <=> 1 )>
<show>
<end>
<if><( <{ level }> <>> 1 )>
<hide>
<end>
<end>
for level 2 make the same code exept these:
<when green flag clicked>
<hide>,
<if><( <{ level }> <=> 2 )>
show
and,
<if><( <{ level }> <>> 2 )>
<hide>
as you might have noticed he nums go up by one every level, so you can go on as many times as you want, and what kind of menus, if you give me more details i might be able to help you.


No new stuff for now guys  wink  join me for some Black Ops on xbox: termhn or for some rock band on PS3: rocket232

Offline

 

#6 2008-08-24 12:42:45

registeel
Scratcher
Registered: 2008-04-27
Posts: 500+

Re: any code help!!!(ill help ya!!)

Codes??? Don't you mean scripts?

Offline

 

#7 2008-08-24 13:09:55

terminator355
Scratcher
Registered: 2008-07-31
Posts: 100+

Re: any code help!!!(ill help ya!!)

yah, same thing  hmm


No new stuff for now guys  wink  join me for some Black Ops on xbox: termhn or for some rock band on PS3: rocket232

Offline

 

#8 2008-08-25 17:09:12

zawicki1fromyoutube
Scratcher
Registered: 2008-07-31
Posts: 1000+

Re: any code help!!!(ill help ya!!)

will you see my mario kart one? that is what i need.


|Call Of Duty: Black Ops Wii Friend Code: 3519-4456-0013|
|Follow me on Twitter|Subscribe To My Youtube Channel

Offline

 

#9 2008-08-25 18:28:21

terminator355
Scratcher
Registered: 2008-07-31
Posts: 100+

Re: any code help!!!(ill help ya!!)

i dont see your mario kart project send me a link and ill try to help.


No new stuff for now guys  wink  join me for some Black Ops on xbox: termhn or for some rock band on PS3: rocket232

Offline

 

#10 2008-08-25 18:47:32

Juzzy
Scratcher
Registered: 2008-08-24
Posts: 100+

Re: any code help!!!(ill help ya!!)

I need help with 4 directin scrolling. I have got side-to-side down but I don't know up and down.


If you are reading this turn around, walk 3 steps, and do the chickendance
smile  big_smile  smile  big_smile  Which smiley is happier?

Offline

 

#11 2008-08-25 19:15:18

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: any code help!!!(ill help ya!!)

Its easy its like doing the same for x scrolling.You set a scrollx sprite and add scroll y to it im gonna make a tutorial.

Offline

 

#12 2008-08-25 19:29:05

terminator355
Scratcher
Registered: 2008-07-31
Posts: 100+

Re: any code help!!!(ill help ya!!)

okay just put this in the up and down sprites:
[blocks]
<when green flag clicked>
<forever>
<set y to( (( <{ scrollY }> <+> (( 480 <*> num of sprite(can goto negatives) )) ))
<end>
and this in stage:
<when green flag clicked>
<forever>
<if><key[ up ]pressed?>
<change{ scrollY }by( -5
<end>
<end>
and in the same script put the oposite num and key and thats what i did for scrolling, hope this helps![/blocks]  big_smile

Last edited by terminator355 (2008-08-25 19:29:38)


No new stuff for now guys  wink  join me for some Black Ops on xbox: termhn or for some rock band on PS3: rocket232

Offline

 

#13 2008-08-25 19:30:28

dingdong
Scratcher
Registered: 2007-08-09
Posts: 1000+

Re: any code help!!!(ill help ya!!)

Juzzy wrote:

I need help with 4 directin scrolling. I have got side-to-side down but I don't know up and down.

OK seriously don't go into scrolling yet, your newb at scratch make some fantastic game on one screen then make a scrolling game, scrolling can get very complex at points, for example 360 degree scrolling:
[change scrollX by ( ( (sin of (direction)) * ((speed) * (-1) ) )]
[change scrollY by ( ( (cos of (direction)) * ((speed) * (-1) ) )]


http://img851.imageshack.us/img851/2829/superanbanner.png
click the image for my music

Offline

 

#14 2008-08-25 19:35:01

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: any code help!!!(ill help ya!!)

I agree with dingdong.But when your ready you can start scrolling
young scratcher
here http://scratch.mit.edu/projects/keroro645/250128

Last edited by keroro645 (2008-08-25 19:41:51)

Offline

 

#15 2008-08-25 19:44:32

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: any code help!!!(ill help ya!!)

*yoda voice*You have much to learn young scratcher.

Offline

 

#16 2008-08-25 22:18:46

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: any code help!!!(ill help ya!!)

dingdong wrote:

Juzzy wrote:

I need help with 4 directin scrolling. I have got side-to-side down but I don't know up and down.

OK seriously don't go into scrolling yet, your newb at scratch make some fantastic game on one screen then make a scrolling game, scrolling can get very complex at points, for example 360 degree scrolling:
[change scrollX by ( ( (sin of (direction)) * ((speed) * (-1) ) )]
[change scrollY by ( ( (cos of (direction)) * ((speed) * (-1) ) )]

Meh, in my opinion scrolling is pretty easy to do. You  can scroll left and right correct? Then for up and down create a scrolly variable, then repeat the steps in the scrolling tutorial except replace 480 with 360 and replace x with y.

Its really not that complex. You should be able to do it.

Last edited by archmage (2008-08-25 22:19:54)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#17 2008-08-26 08:14:28

zawicki1fromyoutube
Scratcher
Registered: 2008-07-31
Posts: 1000+

Re: any code help!!!(ill help ya!!)

terminator355 wrote:

i dont see your mario kart project send me a link and ill try to help.

never mind...i downloaded the project...the person put the mario course into seperate sprites. But you could help with this!!! how big is the scratch "work area"? Because I need To know that.


|Call Of Duty: Black Ops Wii Friend Code: 3519-4456-0013|
|Follow me on Twitter|Subscribe To My Youtube Channel

Offline

 

#18 2008-08-26 10:08:35

terminator355
Scratcher
Registered: 2008-07-31
Posts: 100+

Re: any code help!!!(ill help ya!!)

okay the x is 480 and y is 360


No new stuff for now guys  wink  join me for some Black Ops on xbox: termhn or for some rock band on PS3: rocket232

Offline

 

#19 2008-08-26 10:33:15

zawicki1fromyoutube
Scratcher
Registered: 2008-07-31
Posts: 1000+

Re: any code help!!!(ill help ya!!)

terminator355 wrote:

okay the x is 480 and y is 360

I fixed my own problem. but i need help with ? boxes that have a random item.


|Call Of Duty: Black Ops Wii Friend Code: 3519-4456-0013|
|Follow me on Twitter|Subscribe To My Youtube Channel

Offline

 

#20 2008-08-27 00:39:33

terminator355
Scratcher
Registered: 2008-07-31
Posts: 100+

Re: any code help!!!(ill help ya!!)

im on a psp but ill do my best. in your box sprite make a costme for all of the things that could be in it. then put this in it:

if touching (players sprite) set costume (random 2-last costume)
and:

if costume# = (wat ev) give power that costume would have
hide
(do that for all costumes)

hope this helps  big_smile


No new stuff for now guys  wink  join me for some Black Ops on xbox: termhn or for some rock band on PS3: rocket232

Offline

 

#21 2008-08-27 01:10:43

newareagle
Scratcher
Registered: 2008-06-10
Posts: 100+

Re: any code help!!!(ill help ya!!)

Terminator some of the scripts you mentioned above use forever scripts and are constantly checking for sensors. The most efficent way to do things is to use broadcasts so you only have 1 forever script running instad of 10. The way to do this, as an example:
Lets say an object is touching the goal, so you gain to the next level. The best thing to do is use costumes, escpecially in the background. You can either simply change to the next costume once you broadcast, or you can change the level by 1, and then broadcast, and then switch to the costume of the level you are one. Basically what i am saying is using loops causes lags, so try to keep as little scripts running as possible at one time.


My Guitar Hero Game.
8/9 Projects on the Front Page at Once!

Offline

 

#22 2008-08-27 04:12:43

deatheater
Scratcher
Registered: 2008-04-11
Posts: 1000+

Re: any code help!!!(ill help ya!!)

terminator355 wrote:

okay, first ill help you with the levels here goes:
[blocks]
(these are for the objects on the first level)
make a var called "level"
<when green flag clicked>
<show>
<forever>
<if><( <{ level }> <=> 1 )>
<show>
<end>
<if><( <{ level }> <>> 1 )>
<hide>
<end>
<end>
for level 2 make the same code exept these:
<when green flag clicked>
<hide>,
<if><( <{ level }> <=> 2 )>
show
and,
<if><( <{ level }> <>> 2 )>
<hide>
as you might have noticed he nums go up by one every level, so you can go on as many times as you want, and what kind of menus, if you give me more details i might be able to help you.

<when green flag clicked>
<hide>,
<if><( <{ level }> <=> 2 )>
show                                             <-- this should be....
and,
<if><( <{ level }> <>> 2 )>         
<hide>                                         

<when green flag clicked>
<hide>
<forever>
<if><( <{ level }> <=> 2 )>
<show>                                      <-- ....this
<else>
<hide>
<end>
<end>

Offline

 

#23 2008-08-27 22:11:24

terminator355
Scratcher
Registered: 2008-07-31
Posts: 100+

Re: any code help!!!(ill help ya!!)

seriously, that is how ive always scripted like that and they've never had lag on the site  hmm

Last edited by terminator355 (2008-08-28 09:25:47)


No new stuff for now guys  wink  join me for some Black Ops on xbox: termhn or for some rock band on PS3: rocket232

Offline

 

#24 2008-08-27 22:29:03

Juzzy
Scratcher
Registered: 2008-08-24
Posts: 100+

Re: any code help!!!(ill help ya!!)

Thanks all of you guys for the up and down scrolling help. Now I am able to make a game that the backround scrolls in all directions (up,down,right,left).


If you are reading this turn around, walk 3 steps, and do the chickendance
smile  big_smile  smile  big_smile  Which smiley is happier?

Offline

 

#25 2008-08-28 09:30:13

terminator355
Scratcher
Registered: 2008-07-31
Posts: 100+

Re: any code help!!!(ill help ya!!)

please if you need help with scripting then don't make a new topic just look on one that already has what you're asking, or post on a topic like this.


No new stuff for now guys  wink  join me for some Black Ops on xbox: termhn or for some rock band on PS3: rocket232

Offline

 

Board footer