ship force field
Posted:
Wed Nov 02, 2011 5:47 am
by ESL
I tried to make one by making the ship the parent actor of a frame region and a keydown event of hitting F to give the frame actor a physical response to repel the objects hitting it but no dice, the bullets still go through and destroy the ship.
Re: ship force field
Posted:
Wed Nov 02, 2011 8:30 am
by master0500
what if you use a normal actor with zero transparency or just destroy the bullet actor on collision
Re: ship force field
Posted:
Wed Nov 02, 2011 8:32 am
by skydereign
What do you want the forcefield to do? Repel them, block them, or just destroy them? If you wanted to destroy them, then that should be the collision event, instead of PhysicalResponse. If you want to block them (as in knock them back) you would use PhysicalResponse, but chances are you would want to create a normal actor, give it a round animation, and if you didn't want it visible, use VisibilityState to not draw but enable events. That way it can have a PhysicalResponse. For gravity repulsion, you'd best put that in the bullet's draw code, and when a variable is flipped, it accelerates away from the player. And setting transp to 1 will have some problems, so VisibilityState is a better choice.
Re: ship force field
Posted:
Wed Nov 02, 2011 11:40 pm
by ESL
I want the force field to temporarily repel the bullets so that when the player pushed the f button the shield turns on for 5 seconds.
Re: ship force field
Posted:
Thu Nov 03, 2011 6:59 am
by master0500
make sure force field is a normal actor
key down/ create actor/ force field
then make a timer for 5sec
then timer> destroy actor> force field
then use physical response as normal