-
Thanks Marv,
but I don't fully understand how to do this.
Could you please explain further?
I tried the following with no luck:
- Always set Flag to off
and
When:
- Flag is off
- User left-clicks
Do:
- Flag on
- Shoot/punch
It's not possible to negate "User left-clicks on mouse" so I used the "Always set Flag to off" instead.
What am I doing wrong?
-
User left-clicks is a red event. Red events are immediate events which almost always need to be ON TOP so that they appear red. Furthermore, immediate events do not need to be negated because they are "triggered" if you want to negate "User left-clicks" do "Repeat while left mouse button is pressed (Negated)" + "Only one action per event loop"
-
Thanks ProdigyX. This was useful. Never knew that about "red events" before.
I think i've brought this up in this thread before: but pairing objects has prooven difficult for me.
Atm I have a specific enemy type that glows (every time one of these enemies spawn a glow-effect spawns in aswell).
MMF2 pairs every different glow to every different enemy fine (so that every single enemy has its own glow), but I can't figure out how to destroy the specific enemy's glow when that specific enemy dies.
I've tried using "pick one of", but then MMF2 only picks a glow at random and occasionally destroys some other enemy's glow.
Example:
-Enemy HP is 0
+Destroy enemy
+Destroy glow
This only destroy's that specific enemy, but also destroys ALL glows.
If I instead do this:
-Enemy HP is 0
-Pick one of "glow"
+Destroy enemy
+Destroy glow
then MMF2 picks a glow at randoim (mostly another enemy's glow).
What am I doing wrong?
-
AndyBazooka - I'd suggest setting some kind of flag or Alt Val that an object needs destroying, then copy that flag/Alt Val to the paired objects in an Always event, then check to see if an object is flagged for destruction and destroy it:
-Enemy HP is 0
+Set Alt Val D("enemy")=1
Always
+Set Alt Val D("glow")=Alt Val D("enemy")
If Alt Val D("enemy")=1
+Destroy enemy
If Alt Val D("glow")=1
+Destroy glow
-
Hrm, that didn't seem to work well either AyreGuitar.
I did exacly as you wrote, in the same order and everything. But this still destroys random glows, even several random glows even if i only kill one enemy.
I tried adding: "Pick one of" aswell, with no luck.
Any other ideas? I really need to get this working properly.
-
AndyBazooka - I'm pretty sure it should work.
Make sure you have the same number of enemy and glow objects (pairing won't work properly otherwise). Upload an .mfa if you're desperate!