Should check for each red object colliding with the floor, and making it stop. And it does, but only for the least created object.
For instance, if i rapidly click twice, the first object stand still, while the 2nd one falls and stop then collides with the obstacle
Also, them seem to fall faster as the number of objects increase
Thank you guys, you solved my problem. The thing is that i am used to use the built-in fastloop but i'm trying out the extension coz i've seen it on a tutorial
But you think the built-in loop is better? Why?
n/a
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
19th February, 2010 at 04:21:59 -
The built in fast-loop is better simply because it is built in. I don't think speed differences would be noticeable but it's a good idea to not use an extension for a function that is built in. MMF's loops are also named which is a lot more useful for debugging and general usability than numbered loops.
Like Sketchy said, the fastloop extension is now obsolete because it is now built into MMF's core.
I have multiple detectors, like lines of sight
For testing purpose, i wanted them to change from orange to purple (just changing animation direction) when the player were overlapping them
But if i keep on overlaping any of them, they all turn purple as i collide with them, and all get orange at once if i stop overlapping any
Images to explain better: ^^
On loop "spread1"-
-Set direction of "Detector" to 0
On loop "spread1" and "Player" is overlapping "Detector" and Alterable Value B of "Detector" is equal to LoopIndex("spread1")
-Set direction of "Detector" to 8
You don't need a fastloop for that.
The problem is that you need to check for the detectors overlapping the player, not the player overlapping the detectors.
It's as simple as this:
+ Always
-> Detector: Set direction to RIGHT
+ Detector is overlapping Player
-> Detector: Set direction to UP
Also, I think you'll save yourself some trouble later on if you use maths rather than detectors (ie. Calculate the distance from the player using Pythagoras' theorum). Matching objects and detectors can be a pain, and is best avoided where possible (embedded detectors are great too - there's an article on it somewhere).
When i try to destroy an enemy, all of them are destroyed at once
This is the code:
The Alterable Value J of the sprite and the spreadValue variable of the enemy are the variables that I use to store the spread values, and they work just fine
It's the order of conditions again - just swap them round and it'll work.
The way you have it, it works like this:
If Alterable Value J of the most recently created Hedgehog(?) is equal to Spread Value of the most recently created RedBox...
...and HP of the most recently created RedBox is less than or equal to 0...
...then destroy all Hedgehogs and destroy all RedBoxes.
If you put "HP of RedBox <= 0" at the top of the list, it works like this:
Select each RedBox whose HP is less than or equal to 0...
...and select each Hedgehog whose Alterable Value J is equal to the SpreadValue of one of the selected RedBoxes...
...then destroy each selected Hedgdehog and destroy each selected RedBox.