ship force field

Game Editor comments and discussion.

ship force field

Postby ESL » Wed Nov 02, 2011 5:47 am

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.
ESL
 
Posts: 96
Joined: Mon Jun 28, 2010 2:05 am
Score: 1 Give a positive score

Re: ship force field

Postby master0500 » Wed Nov 02, 2011 8:30 am

what if you use a normal actor with zero transparency or just destroy the bullet actor on collision
master0500
 
Posts: 409
Joined: Sun Jun 26, 2011 9:42 pm
Score: 27 Give a positive score

Re: ship force field

Postby skydereign » Wed Nov 02, 2011 8:32 am

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: ship force field

Postby ESL » Wed Nov 02, 2011 11:40 pm

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.
ESL
 
Posts: 96
Joined: Mon Jun 28, 2010 2:05 am
Score: 1 Give a positive score

Re: ship force field

Postby master0500 » Thu Nov 03, 2011 6:59 am

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
master0500
 
Posts: 409
Joined: Sun Jun 26, 2011 9:42 pm
Score: 27 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest