Alice Community  

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

Reply
 
Thread Tools Display Modes
Making a game on Alice, have some questions
Old
dominus
Guest
 
Status:
Posts: n/a
Default Making a game on Alice, have some questions - 10-10-2009, 05:09 PM

I am making a kind of game where many enemies will walk onto screen from the right, and you have to shoot and kill them before they reach you.

1. I will be using the same object as the enemies, so how would I make it so that they will keep appearing one after another? Or alternately, how would I put like 1,000 of them off the screen and just get them to walk on screen one after the other?

2. How can I make a 'counter' that will display how many enemies you have killed when the game is over?
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 10-10-2009, 05:40 PM

Making 1,000 would put too much strain on Alice, but you could put an object offscreen in a spot where the enemy can move to. Taht way, every time the enemy object is shot, it can disappear, move to the object, then reappear and walk onscreen again, meaning you only need one enemy.

For the counter, make a variable which increments when the enemy is shot, then have a 3d text which sets its text to the variable as a string when it increments.
   
Reply With Quote
Old
scrubsfanchris
Guest
 
Status:
Posts: n/a
Default 11-25-2009, 07:05 AM

Quote:
Originally Posted by x2495iiii View Post

For the counter, make a variable which increments when the enemy is shot, then have a 3d text which sets its text to the variable as a string when it increments.
Where do I find "set text to" in Alice.
Thanks
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 11-25-2009, 07:30 AM

Click the 3d text, then click the properties tab on the left side of the screen. There's a property called text which you can drag on the scripting area to make a set text to method.


(')>
   
Reply With Quote
Old
scrubsfanchris
Guest
 
Status:
Posts: n/a
Default 11-25-2009, 07:46 AM

Thanks x2495iiii

Could you help me out here:
http://www.alice.org/community/showthread.php?t=3465
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 11-25-2009, 07:54 AM

Alright.

I told you about the text already, and incrementing a variable is nearly the same process, drag the variable tile onto the scripting area and select increment variable.

To make a counter, increment the variable, then have the 3d text set its text to the variable.


(')>
   
Reply With Quote
Old
scrubsfanchris
Guest
 
Status:
Posts: n/a
Default 11-25-2009, 08:10 AM

Thanks again x2495iiii, but it still wont work.
I think I am missing something, here's a screen shot:
Attached Images
File Type: jpg 123.jpg (59.5 KB, 60 views)
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 11-25-2009, 08:28 AM

The way you have it set up now, it'll print the number that the loop is on (index), and then increment the counter variable by 1. Try this:

-change index to counter1

-delete the infinity loop

-put the increment variable statement in front of the set text statement

This way, the counter should increase by one, then the 3d text will set its value to the counter.


(')>
   
Reply With Quote
Old
scrubsfanchris
Guest
 
Status:
Posts: n/a
Default 11-25-2009, 09:01 AM

I have it set up like this now, but it still wont work (do I have the chicken-hit method in the wrong place?)

Also, how do I get the 3D text "You Win" to appear when the counter reaches 4 and for the game to stop.
Thanks again.
Attached Images
File Type: jpg 456.jpg (29.5 KB, 56 views)

Last edited by scrubsfanchris; 11-25-2009 at 09:18 AM.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 11-25-2009, 09:21 AM

That depends on what the chicken-hit method does.


(')>
   
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 ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.