If you havent played the game TrafficJam, it is a puzzle game where u need to move cars around a restricted space and the cars only go one direction in order to get a selected car out of the "parking lot". I need to know how to use the hit test and basic coding to:
- make sure the cars cannot go out of a selected area (I have created lines and put them in a movie clip).
- the cars cannot "overlap" each other (using hit test, if true you cant move the car...)
so it looks something like this (on a directional button):
on (press) {
if (_root.car 1, hittest (_root.car 2)) {
-need code to do nothing-
}
else if {
(_root.car 1, hittest (_root.car 3)) {
-need code to do nothing-
}
etc.... then...
else {
with (_root.car 1) {
-need code to move car (direction) x pixel/space or whatever the unit needs to be-
}
As you can tell, I know nothing about coding and this is possibly all wrong and impossible so if anyone can, please help me fix up the code. With this code I drafted up I am only trying to give an impression of what I want to do. Any questions regarding what I want, please feel free to ask me. Thank you.
Making "TrafficJam"
Started by
cng
, May 18 2005 05:59 PM
1 reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users