Hi MonkeyPunch. I have an commented open source Spread Value Example on my website that may help.
Marv









Hi MonkeyPunch. I have an commented open source Spread Value Example on my website that may help.
Marv
458 TGF to CTF 2.5+ Examples and games
http://www.castles-of-britain.com/mmf2examples.htm
Heya, thanks for that. There seem to be quite a few tuts there that might help me.
On the note of Spread Value - I'm still not understanding it completely... in fact I'm not even sure any more that it's what will help my problem.
The problem I have is that I have a gun in my game that uses a fastloop for a specific projectile.
When I shoot more than one projectile and the first hits a wall it disappears but so do any other airborne projectiles.
Should I be trying to solve this problem with Spread Value?
Hmm... Your problem sounds more like an issue with the order of events and conditions. We'd have to see an example to be sure.Originally Posted by MonkeyPunch
For example, say you had a Bullet object with a Alterable Value named "Type" and use that to represent different projectiles (1=bullet, 2=missle, 3=laser, etc).
Normally, a "Collision" event in MMF triggers only for the specific objects that collide:
+ Bullet: Collisions with Backdrop
+ Type = 2
=> Create Explosion
=> Destroy Bullet
The above event should check for collided objects, then checks if they are "Missle Type," creates explosion, and destroys. Everything is perfect. Here is another example:
+ Type = 2
+ Bullet: Collisions with Backdrop
=> Create Explosion
=> Destroy Bullet
When ordered this way, it first checks for Missle Type. If the Type = 2, then the event will be considered "True." This will select ALL objects with Type 2. Now MMF moves on to the next line. It checks for collisions on all Bullets. If ONE bullet collides with Backdrop, the condition remains "True." But the first line already selected ALL bullets Type = 2.
What this means is that when the first bullet collides, MMF has already "selected" all bullets with Type = 2. Therefore, it will destroy all bullets with Type = 2. This is why we have to make sure Collision conditions are first in the event order. By putting collision conditions first, MMF selects only the objects that collide
This may help your situation.




Regarding object selection and collision masks, why not set an alterable value of the multiple-instance object to the collision mask? That way there's no need for loops and you just check if the alterable value is 0 or 1 for collisions.