Actors attaching at seemingly random points

darrigaz

  • Posts: 124
Evening all

I'm trying to make my platformer character shoot when he as enough bullets in his gun and you hit the fire button. However something odd is going on and the bullets are being attached somewhere seemingly off screen. At present if you fire, move in the direction you fired and then wait a bit, you'll see the bullets come in from off screen behind you. I'm completely stuck as to working out the cause of this. Weirdly If you shoot in the direction of one of my test enemies they'll still detect the collision and get bounced around by it (even though whatever hit them is invisible).

Also only the jumping+shooting anims ever get switched too, the rest just never happen.

I'm assuming it's a code ordering thing I'm unable to spot/fix?

I've been struggling with this for days. Any advice would be much appreciated

Thanks


« Last Edit: August 10, 2013, 07:02:07 am by darrigaz »

LontaBeans

  • Posts: 200
When you use the "x of self" block, use the ([] + []) or the ([] - []) block on the x or y. Helped me a lot. If that's not the case, then I'm not sure. It fires from a specific spot on your actor. You set it up using those blocks.

Might I add:

That is a heck of a code for an apprentice. lol
Skype name: lontabeans (add me)

darrigaz

  • Posts: 124
Urm thanks I guess....

Nope sadly that's not it...thanks for the suggestion though.

darrigaz

  • Posts: 124
Grah I'm still unable to solve this. Part of the problem was that my bullets were disappearing when they hit non-alert actors (i'd set them up as sensors with a massive bounding box). I know how to fix that now.

The second part is that bullets work just fine in the left corner of my game but if you move forward a bit it all goes to hell.

I'm still desperate for help...

(On a side not, you can only fire when enemies are alerted (which happens at random on collision) so for testing purposes it might be necessary to re-load the game a couple of times)

darrigaz

  • Posts: 124
Sorted it out! It's part code ordering part badly made HUD attachment behaviour. The code I was using for my HUD had an always update function that move the last created actor to the HUD position. Killing off that behaviour has fixed it! Yay!