Need An Alternative To Collision

Game Editor comments and discussion.

Need An Alternative To Collision

Postby SuperNoob » Wed Sep 22, 2010 3:30 am

I have come up against a wall in my game development: I have been trying for days to figure out why my game crashes when I shoot the enemies on the left in the head who are using code copied and pasted from the functioning enemies on the right, and I just can't find a clear reason. All the appropriate names and variables have been accurately substituted, so it's not that, and I have tried several different methods involving collisions with the player sprite and collisions with attack regions, and nothing has worked so far.

I was told it is possible to use distance to determine certain actions, like, if my enemy is close enough to my player when my player fires her gun, the enemy will react as though there had been a collision, though I am uncertain how to specify the particular clone when they are being generated from a spawn actor on a timer. For collisions you would use "event actor" or "collide actor" depending on where the script was, but if I were to use "enemy", it would affect all the enemies of that actor type, would it not?

Does anyone know how I would use distance to determine if an enemy is close enough to react to being shot in the head as an alternative to collisions, which seems to crash my game in this one particular instance no matter how many combinations I come up with, and how I would specify the particular clone close enough to me?
SuperNoob
 
Posts: 12
Joined: Thu Aug 26, 2010 6:55 pm
Score: 0 Give a positive score

Re: Need An Alternative To Collision

Postby zxcvbnm » Wed Sep 22, 2010 5:23 am

That sounds very wierd , if you want, email me your GED and let me have a look at it.
Check out Momo AlienStarcatcher , featured in apples new and noteworthy and has 5 star reviews!!!
http://itunes.apple.com/us/app/momo-ali ... 61779?mt=8
zxcvbnm
 
Posts: 248
Joined: Sun Aug 22, 2010 7:57 pm
Score: 10 Give a positive score

Re: Need An Alternative To Collision

Postby SuperNoob » Wed Sep 22, 2010 5:35 am

Do you have any suggestions of how I could use "distance" to determine if an enemy is within range to trigger an event, and how I would specify the clone closest to the player? I would rather not send out my ged just yet, because the data file is over 100MB and I would prefer to figure this out for myself with a little guidance. I've spent the last few days trying everything I could think of to circumvent this problem, and collisions in this one particular instance just do not seem to work, so I need a non-colliding alternative, like distance. Do you know how I can do that?
SuperNoob
 
Posts: 12
Joined: Thu Aug 26, 2010 6:55 pm
Score: 0 Give a positive score

Re: Need An Alternative To Collision

Postby skydereign » Wed Sep 22, 2010 5:39 am

Actually, now that I have thought about it a little more, you could use the draw of the zombie anyways. Since the player state is all that you would need to cause a trigger within the zombie actors. So put in a switch for the state, and within it compare distances from the zombie to the player, and if it is within range, act as if the zombie collided with the bullet.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Need An Alternative To Collision

Postby lcl » Thu Sep 23, 2010 12:38 pm

Could you send your GED, so I could look at it. :D There must be some simple thing that makes it crash. :D
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Need An Alternative To Collision

Postby SuperNoob » Thu Sep 23, 2010 9:53 pm

Actually, I already solved the problem, but thanks for your help anyhow.
SuperNoob
 
Posts: 12
Joined: Thu Aug 26, 2010 6:55 pm
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron