PDA

View Full Version : i can't figure it out O.O


sethzilliano
06-14-2006, 03:56 PM
I have a game im working on, and it all works fine, except for the fact that (you control a dragon) i have to choose between the fire staying in front of the dragon, even when i turn(when it's attached to dragon's head) or it being left behind when i start moving the dragon, but stay where i launch it. is there any way i can have it move with the dragon AND stay where it lands, not follow the dragon's line of sight?

sethzilliano
06-14-2006, 03:58 PM
and btw, by attached i mean vehicled.

Jabberwocky
06-14-2006, 07:06 PM
Attach the fire to the dragon's head but make it invisible by using either the opacity command or the is showing command. Make it visible when you need it. Launch it at something, using the move to command. If you want it to stay where it lands change it's vehicle from the dragon to the object you are firing at. You'll have to carry around a few fire objects if you plan on leaving them behind, or you could just make it invisible when you hit an object and then move it back to the dragon.

sethzilliano
06-14-2006, 07:28 PM
i sorta have it on a reloading chain, so to speak. i was jsut wondering if i could make it do that, BUT with some camera repositioning, i made it look like my dragon was BREATHING fire, not shooting it. well, as long as im asking, is there a way i can make a minor destruction system in-game? like when the fire hits the buildings, can they disappear, or at least turn black like they were charred?

Jabberwocky
06-14-2006, 08:07 PM
I've seen a world with Zeus throwing lightning bolts that does this. I think it may have come with the Learning to Program with Alice (http://www.aliceprogramming.net/) book. I don't have the book though, maybe someone else can verify this.

There are some materials that accompany the text that are only available to instructors on the book's website. Can someone tell me what comes with the book? Is there a sample cd with example worlds or are the teacher materials (http://www.aliceprogramming.net/materials.html) the only extras available?

A Greek Tragedy
Zeus was a powerful god in Greek mythology. When Zeus was angry, he would shoot a thunderbolt out of the heavens to strike anyone who got in the way.

In the initial scene, four philosophers (Euripides, Plato, Socrates, and Homer) are possible targets for a mouse-click. The user chooses the philosopher that will be the next victim of Zeus’s anger. When the user mouse-clicks on one of the philosophers, Zeus will point at that philosopher and a thunderbolt will strike the object that was clicked.

When lightning hits a philosopher smoke apears for just a second and then the victim is charred. You can do this by setting the target to black. Go to the object's details window, select the properties tab, and then the color tile. Drop it into a method and then set the color to black.

lanceA
06-14-2006, 09:18 PM
When you purchase Learning To Program With Alice you receive a CD which contains the following:
1. Full version of Alice (same as if you download it - version 2.0 04/2005)
2. 858 Galery Objects
3.The worlds used in the chapter examples in Learning To Program with Alice (Approximately 28 textbookExampleWorlds)
4. 4 tutorial worlds (. . . which take you step-by-step through some of the functionality of Alice)
5. 7 example worlds
6. 10 sound files (for use in worlds you might create)

Plus the contents of the book itself which does provide some insight in how to learn to program using Alice. All-in-all, definitely worth the price of admission!

(I may have left some of the CD's contents out of my above list. If so it was purely by accident.)

( Edit: This probably should be posted in some other area of the forum - I leave it to the powers that be to relocate it.)

Jabberwocky
06-14-2006, 10:55 PM
Thanks for all the info. Just what I wanted to know! :cool:

Oh, do you know if the Greek Tragedy was one of the included example worlds? Thanks in advance.

lanceA
06-15-2006, 06:46 AM
It starts on page 128 of the book.

There's also Charles Herbert's book, An Introduction to Programming Using Alice, if you are looking for additional information on programming techniques with Alice.

sethzilliano
06-15-2006, 08:46 AM
wow. that's a lot more help than i thought i would get. and btw, should i use a proximity thing to determine wether or not the object turns black? and how can i apply it to all the the bojects at once? someone told me there's a way to say allobjects rather than jsut person1 or dragon1.and the very last question......is there a way i can use a variable to make people walk around in random patterns?

lanceA
06-16-2006, 04:54 PM
Obviously we are not here to do your game for you but I believe you are on the right track. Try using the 'proximity'(.iscloseTo() ) function and if that doesn't work then experiment with the other functions available. Part of the fun of working with Alice is experimenting and trying various 'ways' to solve a problem. But you need to do these things on your own. Posting code on the forum simply clutters it up.

As far as a command for messaging 'allobjects', you need to know how to use a LIST or ARRAY to iterate through the objects. These are things that your teacher should be able to help you with. If you have not gotten that far in your studies it probably would not be beneficial for me to attempt to teach you data structures via this forum.

Good luck though and NEVER stop trying

sethzilliano
06-16-2006, 06:05 PM
ah, thank you thank you. that's just what i needed to know ^_^. although, i msut be doing fairly well, because i won first place in my programming class for my game.

lanceA
06-16-2006, 06:09 PM
Then a big, hearty CONGRATULATIONS - You Worked The Problem.

Congratulations!

Jabberwocky
06-17-2006, 10:49 AM
should i use a proximity thing to determine wether or not the object turns black?

It depends on what you are trying to do. If you are randomly breathing fire you might want to use the proximity commands. If you are directing it though, you could just move the fire to the object and then turn the object black. No need to check proximity.


is there a way i can use a variable to make people walk around in random patterns?

If you look underneath the Functions tab in the World's Details window you'll see two random math functions.

Have fun!

Jabberwocky
06-17-2006, 10:58 AM
ah, thank you thank you. that's just what i needed to know ^_^. although, i msut be doing fairly well, because i won first place in my programming class for my game.

So, your class is over and this program is something new you are working on just for fun, right?

sethzilliano
06-17-2006, 04:28 PM
well, actually, this was jsut a summer camp thing. im only in middle school ^_^; but Alice Is something i've been fooling around with for fun. thing is, i only found out about it last monday.