Alice Community  

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

Reply
 
Thread Tools Display Modes
Game help?
Old
TauTrumpsPi
Senior Member
 
TauTrumpsPi's Avatar
 
Status: Offline
Posts: 399
Join Date: Mar 2011
Location: The diamond layer
Default Game help? - 04-03-2011, 06:41 PM

So I have a shooting game with a gun that I have a few questions about how to do things

1. Is there an easier way to make it so the bullet kills the target instead of going through each target and saying
If bullet is within (distance) of (target)
Target (Disapear)
do nothing

Something so I don't have to do that for each target

2. Make a gun that has more than 1 shot before reloading. Right now I have
bullet set vehicle to world
Bullet move forward .1 duration .00001 (loop amount of times for correct range)
bullet set vehicle to gun 0 seconds
Bullet move to gun 0 seconds
bullet orient to gun 0 seconds

So I want a way to make the bullet move faster, and was wondering if I could just have a singular move command instead of a continuous small movements. Would the system still recognize the bullet is within a distance of the target? I use Alice 2.0, because that is what my class uses. I also want to make it a six shot, and was thinking of using a variable that goes up 1 every time the gun is fired and then at 6 resets to zero and does the reload method, but I can't figure out how to make it so the gun won't fire during the reload and the bullet needs to move faster to be reset into the gun so that it can be fired soon after shot.

I'm still kind of new at this, so please make your responses somewhat simplified. Thank you!
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Default 04-03-2011, 06:56 PM

You might want to check this thread out: http://www.alice.org/community/showthread.php?t=4861

It disposes of the need for a bullet at all.

I believe most of the information is on the thread, but if you have any questions, feel free to ask.


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
Reply With Quote
Old
TauTrumpsPi
Senior Member
 
TauTrumpsPi's Avatar
 
Status: Offline
Posts: 399
Join Date: Mar 2011
Location: The diamond layer
Default 04-03-2011, 07:29 PM

I'm afraid this is a bit too complicated for me. Could you explain what distance in front of, to the left of, etc functions do. And I have never used self built functions before, so what does "return collision" mean? otherwise I think I get it.


--------------------------------------------------------------------------------------------------------------------------
I have plenty of common sense. I just choose to ignore it.
-Calvin and Hobbes

Wondering about my Avatar?
http://en.wikipedia.org/wiki/Tardigrade

Wondering about my username?
http://www.youtube.com/watch?v=jG7vhMMXagQ
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Default 04-03-2011, 07:35 PM

Quote:
Originally Posted by TauTrumpsPi View Post
I'm afraid this is a bit too complicated for me.

1. Could you explain what distance in front of, to the left of, etc functions do. And I have never used self built functions before, so

2. what does "return collision" mean? otherwise I think I get it.
1. Those are to calculate whether the object is within range, basically to make sure it won't register as a hit if you're facing any direction.

2. "collision" is just a true/false variable. It's set to true if the object can be hit, and false if not. "return" returns the value of that variable. So, if the object can be hit, you will get a true from the function. Then you can use that in an If/Else statement, like:
if <world.collision>
{
do method
}
else
{
do nothing
}


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
Reply With Quote
Old
TauTrumpsPi
Senior Member
 
TauTrumpsPi's Avatar
 
Status: Offline
Posts: 399
Join Date: Mar 2011
Location: The diamond layer
Default 04-03-2011, 09:02 PM

Ok, a few more questions

1. What is the bush, and why is it necessary?
2. What is the orientation of the cone? Is it just oriented to the ground then turned 90degrees forward, and then the camera oriented to the ground.
3. And what about the Torus? How is that set up?


--------------------------------------------------------------------------------------------------------------------------
I have plenty of common sense. I just choose to ignore it.
-Calvin and Hobbes

Wondering about my Avatar?
http://en.wikipedia.org/wiki/Tardigrade

Wondering about my username?
http://www.youtube.com/watch?v=jG7vhMMXagQ
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Default 04-04-2011, 03:04 PM

Quote:
Originally Posted by TauTrumpsPi View Post
Ok, a few more questions

1. What is the bush, and why is it necessary?
2. What is the orientation of the cone? Is it just oriented to the ground then turned 90degrees forward, and then the camera oriented to the ground.
3. And what about the Torus? How is that set up?
It's been a long time since I made the world, but I'll try to remember...

1. The bush is there so that the camera doesn't end up tilting. Basically, when you turn from side to side, it's the bush turning (not the camera), and the camera is vehicled to the bush. When you turn forwards and backwards, it's the camera turning.

If you attempted to use only the camera, turning from side to side and forwards/backwards at the same time would cause the camera to tilt (basically, what the roll command would do). To prevent that, I use the bush. The bush is kinda outdated; nowadays I use a dummy object.

Sorry if that was confusing. In summary, having the same object turn on two axes will end up slanting it on a third, diagonal axis.


2. The cone is just oriented to the camera, I believe.


3. The torus is just in the center of the screen, like a crosshair/reticle in FPS games.


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
Reply With Quote
Old
David B
Senior Member
 
David B's Avatar
 
Status: Offline
Posts: 1,143
Join Date: Dec 2010
Location: The Twilight Zone!
Default 04-04-2011, 04:09 PM

I'm sorry, but I don't quite understand what it is you need help with. If you give me a simplified description, I may be able to pitch in, but for now, I am beyond the ability to help you.

Sorry again.


██████████████████████
█░░░░░░░░░░░░░░░░░░░░█
█░▓▓▓▓░░░▓░▓░▓░░▓▓▓▓░█
█░▓░░░▓░░▓░▓░▓░░▓░░░░█
█░▓▓▓▓░░░▓░▓░▓░░▓▓▓░░█
█░▓░░░░░░▓░▓░▓░░▓░░░░█
█░▓░░░░░░░▓░▓░░░▓░░░░█
█░░░░░░░░░░░░░░░░░░░░█
██████████████████████

________________

Alice Hater? Rant Here!: http://tinyurl.com/HateAlice
   
Reply With Quote
Old
TauTrumpsPi
Senior Member
 
TauTrumpsPi's Avatar
 
Status: Offline
Posts: 399
Join Date: Mar 2011
Location: The diamond layer
Default 04-05-2011, 08:46 PM

Excellent, I have it working now. Thanks for all the help!


--------------------------------------------------------------------------------------------------------------------------
I have plenty of common sense. I just choose to ignore it.
-Calvin and Hobbes

Wondering about my Avatar?
http://en.wikipedia.org/wiki/Tardigrade

Wondering about my username?
http://www.youtube.com/watch?v=jG7vhMMXagQ
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Smile 04-05-2011, 08:48 PM

No problem.

Good luck!


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
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 ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.