I have tried this, it is counting them but getting to the max aint working
The Frame Script:::
Global pPowerMinus,countCollection, countCollectionMax
Property pTimex, pCounter, pLimit, pTimexz
on beginSprite me
pTimex = 0
pCounter = 0
pLimit = 900
countCollection = 0
end beginSprite me
on enterFame me
if the framelabel ="scene001" then
countCollectionMax=5
if countCollection<=countCollectionMax then
beep
end if
end if
else
if the framelabel ="scene002" then
countCollectionMax=18
if countCollection=countCollectionMax then
beep
end if
end if
end
The Object Script :
Global gScore, countCollection
on exitFrame me
if sprite 88 intersects sprite(me.spritenum) then
sprite(me.spriteNum).locH=-200
gScore=gScore+1
countCollection=countCollection+1
put gScore into member "scoreE"
end if
end
Cheers, I am just trying to use the one script for each frame,
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Colin Holgate
Sent: 19 January 2001 07:49
To: [EMAIL PROTECTED]
Subject: Re: <lingo-l> counting s prites on the stage
>So, on each frame how can I count how many sprites are whithin channel 100
>to 150, then how can I count how many of those sprites loch is <200 using
>the
>loch<200 to determine that the sprite have been eaten.
You should look at sendallsprites #message. Here's one easy approach:
in your exitframe script, say this:
global nodots
on exitframe
set notdots = true
sendallsprites #checkdot
if notdots then go "next level"
go the frame
end
Then in each dot sprite have this routine:
on checkdot
global nodots
if the loch of sprite the currentspritenum < 200 then set nodots = false
end
What happens is that each dot will check its own location to see if
it's still on the screen, and if it is it sets the notdots global to
false. If no single dot sets it to false, then all of the dots are
off the screen, regardless of how many there were in the level to
start with.
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]