Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Creating your own Shelter

Author
Message
vitinho444
14
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 6th Feb 2012 23:02
Hey guys

So a friend of mine gave me a awesome idea for my game: Shoot2Survive 4

The idea is:
You have some block's in the game (map), if you touch them you will catch them and then when you want, press space bar and it will drop the block where it is, and by using some blocks you can make your own shelter

But this is just the idea.. i tried putting it to pratice but after 10 hours spent in this... i just cant find a way... (the 10 hours were divided by 3 days xD)

Here's what i made ("diagram")

If player collide with block and HoldingBlock[BlockNumber] = false
HoldingBlock[..] = true

Then if HoldingBlock
Update the Block X and Y to the same Player X and Y.

Then if Press space bar
HoldingBlock = false;
int LastX = player.x
int LastY =player.y
dbSprite(BlockID, LastX, LastY, BlockImage);


----------------------------
But the problem is.. the block keep following me

If you have a better idea, anything is better than this one , please say xD

C++ Medium 3.5/5
www.oryzhon.com <-- My company's website (W.I.P)
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 6th Feb 2012 23:46
Are you using if(HoldingBlock[]==true)? =true will set holdingblock to true!

= is not the same as ==

vitinho444
14
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 7th Feb 2012 18:58
no i just used = but there was ==

:S

C++ Medium 3.5/5
www.oryzhon.com <-- My company's website (W.I.P)

Login to post a reply

Server time is: 2024-11-23 00:30:21
Your offset time is: 2024-11-23 00:30:21