The force field is invisible, it only works if hit by a ball. when hit it plays an animation of lightning.
I made an active object, I imported the animation frames for the lightning under a new animation. I think as default it calls it animation 12, but you can re name them if wanted, I changed it to force field, for the stopped animation its just a giff image with a line on to give the ball something to hit. Only this is set to invisible, I want the ball to play the animation of the force field lightning when it hits the stopped image, that is invisible of course, its only their to give the ball something to hit.
So how do I make animations play when something happens, its not to clear like, when this does this, play animation, then it asks you which one to play from a list of available.
What can I do, also, did I do right by having an image for the force field but in visible at start in its properties I don't tick it. I need something for the ball to hit right? but I don't want that visible, I only want the animation of the lightning field to be visible once the ball has hit the force filed area, place, object, you know the invisible object I stuck in to give it something to hit.
The ball will still detect collisions with an invisible object. So you can have it START invisible.
Then, open up the "event editor"
In here, on the left side of the screen, create an event under "Add new condition"
Set it to "collision between BALL and FORCE FIELD"
Then, look where that line on the grid intersects the line going vertically below the "force field object"
Click on that empty space, and add this event:
*Play animation 12
*Make object visible.
You can find these under:
Forcefield Object---> Animations ---> Change Animation Sequence (then it pops up, and asks you which one to choose)
Forcefield Object---> Visibility ---> Make Object Reappear.
Now, that will make it only work once. You'll quickly find that it will stay visible, which is a problem. So add this next line of code:
On the right column, add an event:
*Force field's animation 12 is finished playing
(find this by right clicking on the force field icon, and bringing up Animations---> Animation has finished playing?)
Then add these events inside the grid:
*Change Animation Sequence to STOPPED
*Make Object Invisible
You'll find those 2 commands in the same places as before.
You can also add any effects to your ball you want, in that same event for the collision.
For example, you can add a "Bounce" command in the grid under where the ball is located. This will make it bounce when it hits the forcefield.
You actually use the event editor? I could never stand that thing - it makes it so much harder to see what you're doing and spot mistakes (with the order of actions especially). If you have loads of objects it's even worse.
It works, but the ball sometimes pases through the force field, its the act of changing its graphic that messes something up, if its just hit this bounce, fine, but on this as its hitting something then showing a graphic it must upset something, perhaps its better to do hit this bounce, then if ball is over barrier play animation of another object at that place, Im not sure, I just know that the ball is passing through the barries sometimes, also sometimes the animations of the electric are sometimes staying on and not disapearing, its rare but it looks very bad when it does it. So its seems this way isnt perfect.
Ok i have downloaded the file and fixed your problem. Firstly delet ALL the code in the event editor and replace it with the following:
Create a new condition which says:
Ball leaves play area on top, right or bottom then bounce ball.
Create another condition which says:
If there is a collision between ball and electro whilst electro is invisible then:
(do this in this order very important)
make Electro reappear
Change animation sequence to activated
Animation activated is finished:
Change animation to stoppped
Make electro invisible.
There you have it. finished. also just a quick note. check your hot spot and action points as they dont appear quite right.