Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Higher Levels = More Spawns
Old
Saneron
Guest
 
Status:
Posts: n/a
Default Higher Levels = More Spawns - 10-08-2008, 05:40 PM

So, I'm making a game, and i want to know how to program a method, that, for example:

Level 1: 10 knights will spawn
Level 2: 20 knights will spawn
Level 3: 30 knights will spawn, and 10 Mounted Knights

I already have 1 of each made, but i want to know if there is a way to continuously create copies of the same object, that share all of the same stats.

Or, if there is a way to make an array of knights or something, that only spawn if you are in the correct level or less, for example:

Level 1: spawn array of 10 knights
Level 2: spawn another array of 10 knights, with the original array of knights as well

and so on, any help will do.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 10-08-2008, 06:21 PM

Quote:
Originally Posted by Saneron View Post

I already have 1 of each made, but i want to know if there is a way to continuously create copies of the same object, that share all of the same stats.
Alice 2.0 and 2.2 cannot create new objects at runtime. This capability will probably be available in Alice 3.0.

Until then, you must create every object needed by a world during program development. As the number of knights is not excessive, you should be able to create all of them and make them invisible during program development, then make them become visible when needed at runtime.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
Saneron
Guest
 
Status:
Posts: n/a
Default 10-08-2008, 10:20 PM

wouldn't that create unnecessary processes? for example, having like, 400 objects load, but only 10 visible in the beggining?

It is however, the best option i have, so, I'll take it.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2022, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.