Main Menu
  • Welcome to The RPG Maker Resource Kit.

[RESOLVED] Kills Counter

Started by Owlsey, May 07, 2009, 08:52:19 PM

0 Members and 2 Guests are viewing this topic.

Owlsey

<Battle Counter>
<5-7-09>




Summary
<<It needs to add constant 1 to variable 0009 every time a troop is defeated.>>

Features Desired

  • Does not add 1 for every enemy defeated, only troop.
  • Optional: Turn switch 145 on when variable 009 reaches 10.
  • Optional: Turn switch 146 on when variable 009 reaches 50.
  • Optional: Turn switch 147 on when variable 009 reaches 200.
  • Optional: Turn switch 148 on when variable 009 reaches 9001.

Games its been in

  • Thing Thing Arena 3 (When you unlock awards for killing a number of enemies, except I intend to do this with troops.)

Did you search?
<<Yes, no results.>>


tSwitch



FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

Owlsey

I doubted I would get any results if I did search, and I was right.

tSwitch

Quote from: Owlsey on May 07, 2009, 09:02:12 PM
I doubted I would get any results if I did search, and I was right.

have you tried eventing it?
it's not very difficult at all.


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

Owlsey

I have over 100 troops, and I don't want to have to event them all. If it really is so easy (which I don't doubt), then please just make it.

modern algebra

#5
Why the switches? Any conditional that can check a switch can check a variable.

And yeah, why not event it? The script is easy too, but it's kind of pointless to write a script that would only be used by people who cannot event and therefore cannot possibly make a good game. I'll write this script because it will take 5 seconds and you took the effort to fill in the template, which is always a plus, but you really ought to learn how to event. This is simpler than almost any other event you could conceive of.

modern algebra

Place this code above Main and below all other custom scripts:


class Scene_Battle
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Battle Ends
  #     result : results (0:win 1:lose 2:escape)
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_owlsey_ynotevnt_killcounter_52b4 battle_end
  def battle_end (result)
    # Add to counter if a victory
    $game_variables[9] += 1
    # Run Original method
    modalg_owlsey_ynotevnt_killcounter_52b4 (result)
  end
end

Owlsey


tSwitch

Quote from: Owlsey on May 07, 2009, 09:10:56 PM
I have over 100 troops, and I don't want to have to event them all. If it really is so easy (which I don't doubt), then please just make it.

translation:
I really don't feel like doing it, I realize it's easy, just do it for me.

anyway, request fulfilled, please add [resolved] to the topic title, I know it's easy, but I'm too lazy to do it.


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

Irock

Wouldn't he have to go back and add a variable increase to all 100 troops? That could take a bit of time.

Owlsey

Look, i'm not going to argue with you, I don't know RPGXP scripting yet. And I could do the same for 100 troops, but a script would prevent unintentional "glitches" where I forgot to do so, and I WILL make more troops. Rather just take 5 minutes to request here than 30 doing what you suggested.

tSwitch

Quote from: Irock on May 07, 2009, 09:33:16 PM
Wouldn't he have to go back and add a variable increase to all 100 troops? That could take a bit of time.

ctrl + c
ctrl + v


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

Owlsey

No duh. A script is still way faster.

Irock

Not everyone wants to double click on 100 different scattered items and paste something into each one of them.