Alice Community  

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

Reply
 
Thread Tools Display Modes
I Need help with fps game
Old
Spartan 117
Junior Member
 
Spartan 117's Avatar
 
Status: Offline
Posts: 5
Join Date: May 2013
Exclamation I Need help with fps game - 06-01-2013, 01:27 PM

So my game is about hunting dinosaurs. i have a gun that shoots a sphere at a target. i currently set up a method stating if the sphere is within 2 meters of trex it will turn red. The problem is even if you dont shoot the sphere and you are within 2 meters of the trex it turns red. How can you turn the trex red by only shooting it with the sphere.
   
Reply With Quote
Booleans
Old
MrMoke
Senior Member
 
MrMoke's Avatar
 
Status: Offline
Posts: 500
Join Date: Sep 2007
Location: Austin, Texas
Cool Booleans - 06-01-2013, 04:30 PM

One option might be to create a Boolean variable that is only true if the sphere has been fired. You would then need to add a check to the collision routine so it only works if the sphere has been fired. Naturally, you have to reset everything when reloading.
   
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.