Equip and collision
|
During this week I have worked on making a collision found and then removed. This process entailed me making a lot of things and finding out that some codes are not as easy as they sound. Why I have done a collision is pretty obvious you have to be able to take a vector and rectangle, get the data and use it like loading the current weapon and then equip said item and ”removing” said item from the ground. I pretty much nailed the first part in this and that is getting a vector in and finding a collision. The thing I fail to do is remove said item and because of that the item will load several times instead. Working on this must be one of the more fun things I have done. If you can’t read sarcasm I will tell you that the last line is sarcasm.
When I walk over a item I use a bit of simple collision code found on Google and it works just fine as you can tell by my response that the collision is working fine. Now the player collide with an item and then I added the code std::cout << ”I have collided with a item” << std::endl and I can see the first times standing on the item that I am inside the item. But from certain angles and running into the item causes the text to run wherever I go. So I need the weapon to do like a magician and disappear. But it won’t so that is what I am working on currently. I have not succeeded in removing the rectangle sprite I collide with and making it clear is not working either. So I have my work cut out for me. Tomorrow is Beta and I am not able to attend because of sickness and it makes me kinda angry. Now to talk about being sick. I have used all my time this week for just that. Being sick is a full time job and it is hilariously fun thing to do. I am suppose to add up in a total of 400 words in this blog but this week I just won’t manage that. I can bullshit for an other 150 words and continue to do so until I fill my quota. I won’t do that, you all will get the important work I have done and if I can give you any advice it’s never get sick. |
