Problem getting a replicated actor to destroy on collision with the player
I posted links to how I have the code set up below but this is the problem:
I have it so when a boolean is false if the player collides with an object the player is destroyed. This works on everything perfectly. I have a tag set up for both the player and the enemy actors.
The problem is when I set the boolean to true the player won't destroy the actor in question. He can destroy all the other actors I have the exact same behavior on except for this one. The player will just pass through the actor with nothing happening. Do you guys have any ideas? I'm stumped. Thanks!
Enemy Actor Code:
http://s3.amazonaws.com/data.tumblr.com/tumblr_m1xypknf0R1r4qsqko1_1280.jpg?AWSAccessKeyId=AKIAI6WLSGT7Y3ET7ADQ&Expires=1333606599&Signature=p99VDCkVF4skTGfUuYPRoMYIsTU=
Player Actor Code:
http://s3.amazonaws.com/data.tumblr.com/tumblr_m1xypknf0R1r4qsqko2_1280.jpg?AWSAccessKeyId=AKIAI6WLSGT7Y3ET7ADQ&Expires=1333606533&Signature=VOO5R047XxLp/gJWdt5F2kxMjiQ=
I have it so when a boolean is false if the player collides with an object the player is destroyed. This works on everything perfectly. I have a tag set up for both the player and the enemy actors.
The problem is when I set the boolean to true the player won't destroy the actor in question. He can destroy all the other actors I have the exact same behavior on except for this one. The player will just pass through the actor with nothing happening. Do you guys have any ideas? I'm stumped. Thanks!
Enemy Actor Code:
http://s3.amazonaws.com/data.tumblr.com/tumblr_m1xypknf0R1r4qsqko1_1280.jpg?AWSAccessKeyId=AKIAI6WLSGT7Y3ET7ADQ&Expires=1333606599&Signature=p99VDCkVF4skTGfUuYPRoMYIsTU=
Player Actor Code:
http://s3.amazonaws.com/data.tumblr.com/tumblr_m1xypknf0R1r4qsqko2_1280.jpg?AWSAccessKeyId=AKIAI6WLSGT7Y3ET7ADQ&Expires=1333606533&Signature=VOO5R047XxLp/gJWdt5F2kxMjiQ=
Best Answer
-
tenrdrmer Posts: 9,934
yeah basically your actors cannot change sizes and detect collisions at the same time. Its a GS bug they hope to squash by the time they go 1.0
Answers
I'm trying to get blocks to fall from the sky in line with a random number like [] [] [] [] so I figured I could just use replicate. Is there a better way?
Edit: I took away replicate and just left spawn actor on and it's spawning them straight across the screen. Weird but everything works but I wish I knew how to get that replicate functionality where I could have them come down in 2s through 7s.
Im not sure what you are trying to do so I cant really suggest any better way for you to accomplish your goal.
Cheers
The problem is, is that it only works one way. The blocks will kill him but when he is in the mode to kill the blocks he just passes right through them.
So I revamped the code I have the blocks spawning from an actor on a timer on the top of the screen and that looks like this: http://s3.amazonaws.com/data.tumblr.com/tumblr_m26qht7eEn1r4qsqko4_1280.png?AWSAccessKeyId=AKIAI6WLSGT7Y3ET7ADQ&Expires=1334016352&Signature=H2XgEYRkkPKpV1fIO1g2ax8CAeU=
The code for the non functioning enemy blocks is here: http://s3.amazonaws.com/data.tumblr.com/tumblr_m26qht7eEn1r4qsqko3_1280.png?AWSAccessKeyId=AKIAI6WLSGT7Y3ET7ADQ&Expires=1334016724&Signature=RORmrOWFPlEyuY5hxOF1ktY34xU=
The crazy part is it works for every other enemy block and it looks like this: http://s3.amazonaws.com/data.tumblr.com/tumblr_m26qht7eEn1r4qsqko5_1280.png?AWSAccessKeyId=AKIAI6WLSGT7Y3ET7ADQ&Expires=1334016799&Signature=2ICCZFk+i5pZzFgP5DsySQsgGck=
And lastly this is the code I have for the player's character is here in two images:
http://s3.amazonaws.com/data.tumblr.com/tumblr_m26qht7eEn1r4qsqko1_1280.png?AWSAccessKeyId=AKIAI6WLSGT7Y3ET7ADQ&Expires=1334016881&Signature=hLL6LZwKIc9tryZoBuuqM8LJRus=
http://s3.amazonaws.com/data.tumblr.com/tumblr_m26qht7eEn1r4qsqko2_1280.png?AWSAccessKeyId=AKIAI6WLSGT7Y3ET7ADQ&Expires=1334016893&Signature=tuRq8MDTkDyahRXYpvxZPPxSjI4=
I'm not sure why this bug is going off when it's working just fine everywhere else, I thought the collision bug was only on size grow and not on interpolate?
Thanks again for all your help.