Collision and score problem
Gamer1992
Member Posts: 83
Hi there,
I have a problem and I was wondering if anyone could help me with it.
Basically in my game I have a real attribute as a score and I also have an actor that if it the main actor collides with that actor, he dies and the game ends.
So the problem I'm facing is, every time the main actor collides with the actor that kills him, the real score attribute score stops working even if I restart the game.
I don't know if this is a bug, but can someone please provide me with advise on how to solve this? As in when I restart the game, the real score attribute continues to work like it did before. I have enemies in my game and when they collide with my actor, it doesn't stop the real score attribute from working, but the collision actor stops it from working which sucks lol. I have been trying to solve this for over 2hours now and I still can't get it to work.
Any help out there?
I have a problem and I was wondering if anyone could help me with it.
Basically in my game I have a real attribute as a score and I also have an actor that if it the main actor collides with that actor, he dies and the game ends.
So the problem I'm facing is, every time the main actor collides with the actor that kills him, the real score attribute score stops working even if I restart the game.
I don't know if this is a bug, but can someone please provide me with advise on how to solve this? As in when I restart the game, the real score attribute continues to work like it did before. I have enemies in my game and when they collide with my actor, it doesn't stop the real score attribute from working, but the collision actor stops it from working which sucks lol. I have been trying to solve this for over 2hours now and I still can't get it to work.
Any help out there?
Comments
And the reason am using real for score instead of an integer is because my game is an endless runner game therefore I'm using the real attribute as a score as a way of displaying the distance travel. I don't think I can use an integer for that, or can I?
The problem with not being able to see a screenshot of the affected code is we've no idea what you're doing with the score and what you've got on the collision actor to make it stop. You've just said it's stops working when collisions happen
This is the rule in my background actor which contains and update the score.
This is my actor that kills my player, as you can see, there is no rule in that one because I have set its collision rule in the player actor.
so basically when I first open my game, everything works excellent but as soon as I collide the actor that destroys my player, the score stops working even if I restart my game by clicking the restart button
I have one question though. My game is currently for ipad and I wanted to make it universal for iPhone 5 and later. And I understand I have to use the universal binary codes which I have done and it works great. However, the physics of the game when I test it on my iphone is different compared to when I test it on my iPad. on my ipad, the physics is exactly what I want it to be, but on my iphone its not. Therefore instead of doing a universal build, I was thinking of making a seperate version for the iphone so I can manually tweak the physics for the iphone one. My game is just a simple endless runner game so it will only take like 2 days to resize or my graphics and stuff for the iphone.
So what's your opinion on this? should I make a seperate iphone version or should I just use the universal build process?
As for the universal build, I won't lie, the whole thing confuses me a little as there seems to be dozens of different ways to approach it. For my next one I'm creating a scene for each aspect ratio and will use stretch when it's finally released in the next public build.
Stretch and a scene for each aspect ratio allows me to position actors appropriately without them distorting when they stretch. That's the theory anyway. It seems to be working ok.
Someone else might be able to give advice on how you should approach it.