Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Arrows and Glowing (http://www.alice.org/community/showthread.php?t=8519)

zak170 05-15-2012 08:00 PM

Arrows and Glowing
 
I am making a medieval rpg, but need help with four things:

1) Is it possible to create a glowing effect on an object? For example a box that emmits a light (lets say red). There are two things i want to use this for: magic, and the selection arrows for the character selection screen.

2) How can I make a realistic arch for an arrow? For example when you fire an arrow (just so theres no confusion i mean from a bow) can I give it realistic physics to hit its target?

3) Is there a way to save stats, like even after you quit? For example, you make a character and the game saves your level, items, money, etc.

4) Finally how can I make an infinite amount of an object to fire? For example with a gun, being able to shoot bullets. I know you can create this illusion by making the objects shoot out, turn invisible, then come back. But can I do it with the projectile staying where it landed (until a certain amount of them are in the world). Maybe using an array, but i dont know.

Thanks in advance!

TauTrumpsPi 05-15-2012 09:14 PM

[QUOTE=zak170;48829]I am making a medieval rpg, but need help with four things:

1) Is it possible to create a glowing effect on an object? For example a box that emmits a light (lets say red). There are two things i want to use this for: magic, and the selection arrows for the character selection screen.
[/quote]

There are objects that produce light, but none that produce it centered on a specific area. It'd probably be better to use a semi transparent circle to simulate a glow

[QUOTE=zak170;48829]
2) How can I make a realistic arch for an arrow? For example when you fire an arrow (just so theres no confusion i mean from a bow) can I give it realistic physics to hit its target?
[/quote]

Have you reached Algebra yet? You're going to need to use a parabola equation. Y = ax^2 + bx + c. a, b, and c are dependent on the arc of the parabola - mess around until you get it, I've never tried it before. Unfortunately, Alice has no collision, so it is very hard to make a realistic arrow hit.

[QUOTE=zak170;48829]
3) Is there a way to save stats, like even after you quit? For example, you make a character and the game saves your level, items, money, etc.
[/quote]

Yep, though not within Alice. You'll need Arty's Save Tool, pinned in the share objects section. Save the values of the variables to files, and recall them upon opening the game.

[QUOTE=zak170;48829]
4) Finally how can I make an infinite amount of an object to fire? For example with a gun, being able to shoot bullets. I know you can create this illusion by making the objects shoot out, turn invisible, then come back. But can I do it with the projectile staying where it landed (until a certain amount of them are in the world). Maybe using an array, but i dont know.
[/quote]

Unfortunately, again, Alice has no inborn tool for duplicating objects. [URL="http://alice.org/community/showthread.php?t=8464&highlight=breeding+rabbits"]Arty, again, has a very nice duplication method you can use.[/URL]

zak170 05-15-2012 10:44 PM

Thanks for the help!

I'll definately check out arty's save state thing, and duplication method.

TauTrumpsPi 05-16-2012 01:50 PM

[QUOTE=zak170;48841]Thanks for the help!

I'll definately check out arty's save state thing, and duplication method.[/QUOTE]

No problem.

zak170 05-16-2012 04:31 PM

I actually have another question:

Is it possible to make a system where the player will click somewhere on the ground, and the character will move to that spot?

I know one way would be to make a little square, or cube, or something and make it invisible. When the player clicked on it they would move to it.

But can I do it without making an insane amount of "markers"?

TauTrumpsPi 05-16-2012 05:38 PM

[QUOTE=zak170;48852]I actually have another question:

Is it possible to make a system where the player will click somewhere on the ground, and the character will move to that spot?

I know one way would be to make a little square, or cube, or something and make it invisible. When the player clicked on it they would move to it.

But can I do it without making an insane amount of "markers"?[/QUOTE]

Unfortunately, while there may be a way, I cannot think of a way to do that. Sorry...

zak170 05-17-2012 08:05 PM

No problem, I was just looking for a quicker way.

I do have an idea on how to do it, i just dont know if it will work, maybe you could shed some light:

Can I have an object (invisible) follow the mouse? Then when you clicked, the character would walk to said object.

TauTrumpsPi 05-17-2012 09:20 PM

[QUOTE=zak170;48887]No problem, I was just looking for a quicker way.

I do have an idea on how to do it, i just dont know if it will work, maybe you could shed some light:

Can I have an object (invisible) follow the mouse? Then when you clicked, the character would walk to said object.[/QUOTE]

Now that, while hard, can be done. Here's a couple done by different members of the forum

[URL="http://alice.org/community/showthread.php?t=5350&highlight=object+mouse"]Dameria's, which is easier to code but requires calibrations[/URL]

[URL="http://alice.org/community/showthread.php?t=8190&highlight=object+mouse"]Arty's, which is harder to code but does not require calibration[/URL]


All times are GMT -5. The time now is 01:58 PM.

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