The Daily Click ::. Forums ::. Klik Coding Help ::. TGF newbie - I need help [with reserrecting badies and power bars]
 

Post Reply  Post Oekaki 
 

Posted By Message

Mattis Berngöran



Registered
  17/08/2003
Points
  145
28th August, 2003 at 07:18:29 -

ShadowCaster>
Please change back, thats not my present problem, that was my first! It was ment as a thread where I could write all my future problems, I find it unnecessary to create a new every time I will face a problem.

Well well, I have another question for you all.
I want help with adding a shop to my game. Is it easy? When you´ve killed 10 enemies, for example, you´ve earned 10 litres of blood. For that, you can buy something if you find the right place. Easy or hard to do?

I also need help with the score feature (blood). Its like, when I shoot an enemy, I earn 5 points, but if I shoot him again even after his death, I earn five more and so on... I want it to be possible only once.
I know I can do like "destroy and paste into background" but sometimes that doesn´t work and the enemy just dissapears, I dont want that.

Is there a solve to my riddle?

 
www.mapix.shorturl.com - my own movies and soon games

Kramy



Registered
  08/06/2002
Points
  1888
28th August, 2003 at 13:41:07 -

Ok, to go into a description of how to properly use the ini to save values/strings would take a while, so here is how to do what you want with a global value...

When you shoot an enemy, and alterable value A is different than "dead value"

add 5 to blood score.

Then...
End of Level - Set global value # to blood score
Start of Level - Set blood score to global value #

Just remember to reset the global values when you start a new game, or a player could get lots of points, restart, and keep the points.

Now, when you enter a shop it sets your blood score to the global value...

If Blood score is greater or equal >= to ##
User clicks on button "buy bazooka", etc.

set weapons global value to ##
Subtract ## from blood score.

Now, just add at the start/end of every frame setting the global value to the weapons allowed, or weapons allowed to the global value.

Then add this to your firing event, depending on the value of the "weapon bought".

Firing Events
Global value(Weapon bought) = 0
---Punch---

Firing Events
Global value(Weapon bought) = 1
---Shoot---

Firing Events
Global value(Weapon bought) = 2
---Bazooka---

Firing Events
Global value(Weapon bought) = 3
---Nuke---

Or whatever weapons you have in your game.

Image Edited by the Author.

 
Kramy

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
28th August, 2003 at 18:21:49 -

As you said, Mattis, it was your first problem, and that is what the title usually reflects

The point is it needs to distinguish this post from the 5000 other posts titled "I need help".

Mike ¿

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert

Mattis Berngöran



Registered
  17/08/2003
Points
  145
3rd September, 2003 at 05:03:40 -

ShadowCaster>
Okey

 
www.mapix.shorturl.com - my own movies and soon games

istvan



Registered
  03/07/2003
Points
  1540
3rd September, 2003 at 05:54:08 -

did all this help work?

 
'oh yeah? he's thrown a kettle over a pub, what have you done?'
   

Post Reply



 



Advertisement

Worth A Click