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

#1 2009-09-25 22:06:12

fireball123
Scratcher
Registered: 2008-05-08
Posts: 1000+

I've figured out how to make a class system for sprites!

I've figured out ho to make a classes.
You may think that this is rather pointless, but if you need an object to touch many objects and sense it, you can use this class system, instead of using lag creating "ors".

1 make a list called class 1

When Flag clicked:
[forever if <touching(item(any ) of class1)>
Whatever you want the sprite to do]

just add the name of the sprite to the list that you want to be detectable

I will be making a demonstration project shortly.

I just thought this might be usefull.


I did it for the Lolz

Offline

 

#2 2009-09-25 22:10:19

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

Re: I've figured out how to make a class system for sprites!

You don't know what classes are do you?


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

 

#3 2009-09-25 22:14:48

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

Re: I've figured out how to make a class system for sprites!

item any, means it picks the item by random, a very glitchy system

Offline

 

#4 2009-09-25 22:16:37

adriangl
Scratcher
Registered: 2007-07-02
Posts: 1000+

Re: I've figured out how to make a class system for sprites!

archmage wrote:

You don't know what classes are do you?

Lol you do?

Anyways, classes are mostly useless.


Scratchin' since 2007

Offline

 

#5 2009-09-25 22:18:55

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

Re: I've figured out how to make a class system for sprites!

Yes, classes are scripts that are used to create specific objects. They are very  important in OOP.

I think you assumed that classes were simply groups of objects which is untrue.

Last edited by archmage (2009-09-25 22:19:40)


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

 

#6 2009-09-25 22:38:06

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: I've figured out how to make a class system for sprites!

Useful, but really not worth it. I'd like to be able to categorize my sprites in the sprite viewer. Maybe for 1.5?  hmm  Anyhow, Archmage is right.

Offline

 

Board footer