Laps

I ave no idea how to do laps…

This is my code for the laps.
But i need it so when it hits it it only goes up once not 1 while stying on it.

Here is the code

onClipEvent (enterFrame) {
    if (this.hitTest(_root.car)) {
        _root.lap += 1;
    }
}

No one at all.

::The man in blue goes on his knees and crys for mercy::
:*(

Laps, huh, explain more precise, dan is confused (likes talking in third person)

onClipEvent (enterFrame) {
	if (this.hitTest(_root.car)) {
		if (!laps) {
			_root.lap += 1
			laps ++
		}  else {
			_root.lap = _root.lap
		}
	} else {
		delete laps
	}
}

thank ilyas!!
http://www.kirupaforum.com/showthread.php?s=&threadid=11093

Kax my old friend.
How does this work
Do i put it on the finish line.
I did that dont work.
Did you undertand what i said if not
Exaplined better
I am making a car game so far one level one car and one finish line.
When my car hits the Finish line i want it so the lpas(Dynamic text)
Goes up only one.
Then when it hits the checkpiont and all the checkpoints.
It will make it so when i hit the finishline again it will o up.
See what i mean.
Maybe an example will help me.

paste the script in the finish line actions and your dynamic text should have “_root.lap” [size=1][no quotes][/size] as variable

that’s all

That works good
But i dont have to go in a the track
I only have to go up and down and get filled up on the laps.
Maybe checkPints can help ill try that.

You’re welcome, Kax, but that line looks strange, doesn’t it?

_root.lap = _root.lap

lol … I wrote the code when I was replying

didn’t notice that :stuck_out_tongue:

Can someOne please help please.
I want checkPints i guess i almost had it but it messed up.
Maybe an example
Do you want my FLA
::He crys a river and will die the next day::

just an idea

car actions

onClipEvent (load) {
	_root.checkpoint1._visible = true
	_root.checkpoint2._visible = false
	_root.checkpoint3._visible = false
	// and so on
}

onClipEvent (enterFrame) {
	if (this.hitTest(_checkpoint1)) {
		_root.checkpoint2._visible = true
	}
	if (this.hitTest(_root.checkpoint2)) {
		_root.checkpoint3._visible = true
	}
	// and so on
}

or something like that should work

NeverMind forget it i wont make this then…