SO FRUSTRATED!!! So close, please give advice!!!
rhysdarambo
Member, PRO Posts: 33
Quick and simple (well..)
I have two attributes
-Score
-Bonus
I want to add the bonus integer to the score integer.
So I go.. Change attribute 'Score' to 'Score + Bonus'.
But when I do this it adds 2 lots of bonus's added to the score!!??
e.g say score = 10 and bonus = 2. It will make score 14 instead of 12???
I tried troubleshooting this by creating an integer attribute called 'pointless' and setting this to 0.
I then went.. Change attribute 'pointless' to 'pointless + Bonus'. and it still gives me double the bonus back!????.
I then went a step further and went.. Change attribute 'pointless' to 'bonus' and it gave me back the CORRECT amount for the bonus!!?? It is driving me insane! Can someone please help ASAP?????
Thank you so much
Comments
hey id be willing to help
would you be show me all the attributes you have?
or i could take a look at your game try to tweak it and tell you whats wrong
Yeah, @camerondaman is right. Post a screen grab of your rules or your project file - otherwise we can't really help you
Just sent you a PM, in case you want me to take a quick look.
Your logic is sound so it's probably a simple problem with the order or layout of your rules.
If you put an actor in the scene, and have it display the values, 'score' and 'bonus'. That will at least ensure the figures going into your rules are correct.
Happy to take a look if you like.
If I encounter troubles like this I usually just cheat and use math to get the value I want. One really simple way is just to do
Change attribute score to SCORE + BONUS/2
That way, the bonus is cut in half to get what you want!
This sticking plaster approach is usually a bad move in any kind of programming, it creates a kind of tech debt, I'd always say it's best to resolve the issue at source.
Absolutely @Socks! You could not be more right.
It may solve it now but later down the track you'll have double the problems.
I have already tried that method (as a troubleshooting method) thanks @Conifer_Apps and It still gives me a crazy answer so I need to address it at the source. Have given it a miss for the last few days, been flat out doing all the other bits and pieces. I'm sure it is something simple and staring me right in the face between my gazillion rules.
Thanks anyway