Creare Videogiochi - Game Developer

Versione completa: Actor counter kill
Al momento stai visualizzando i contenuti in una versione ridotta. Visualizza la versione completa e formattata.
Actor Kill Counter

Descrizione
Questo piccolo ma molto utile script permette di contare tutti i mostri/nemici/antagonisti uccisi dall'eroe che s'impersona =).

Autore
Script di Sandgolem

Allegati
///

Istruzioni per l'uso
Come sempre, aprite lo script editor di rmxp, create una nuova classe sopra Main e chiamatela SG Actor Kill Counter, e inseriteci dentro questo script:
Codice:
#=============================================================================
# ** SG Actor Kill Counter
#=============================================================================
# sandgolem
# Version 1
# 26.06.06
#=============================================================================
#
# To check for updates or find more scripts, visit:
# http://www.gamebaker.com/rmxp/scripts/
#
# To use this script, copy it and insert it in a new section above "Main",
# but under the default scripts and the SDK (if using).
#
# Have problems? You can leave me a message at:
# http://www.gamebaker.com/users/sandgolem
#
## Per richiedere assistenza italiana, visita: http://rpg2s.net/forum/
#
# Segnalato da Marigno =).
#
#=============================================================================

#--------------------------------------------------------------------------
# * SDK Log Script
#--------------------------------------------------------------------------

begin
  SDK.log("SG Actor Kill Counter", "sandgolem", 1, "26.06.06")
  if SDK.state("SG Actor Kill Counter") != true
    @sg_killcount_disabled = true
  end
  rescue
end

#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if !@sg_killcount_disabled
  
class Game_Actor < Game_Battler
  attr_accessor :sg_kills
end

class Scene_Battle
  def sg_killcheck_add(enemy)
    if @active_battler.sg_kills == nil
      @active_battler.sg_kills = 1
    else
      @active_battler.sg_kills += 1
    end
  end
  
  alias sandgolem_killcount_battle_ph4s6 update_phase4_step6
  def update_phase4_step6
    if @active_battler.is_a?(Game_Actor) && @target_battlers != nil    
      for i in @target_battlers
        if !i.exist?
          sg_killcheck_add(i)
        end
      end
    end
    sandgolem_killcount_battle_ph4s6
  end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end
UtileWink
Fai conto che ad ogni gruppo di mostri metti condizione:
If Monster (1,2,3,4,5,6.....) HP 0/0
set variable: "mostri_ammazzati" relative +1 (relative a game maker, + a rpgmaker)

Poi metti:

Mes: TI LASCERò PASSARE SOLO SE MI DIRAI IL TUO NUMERO DI MOSTRI UCCISI. SE IL TUO CUORE è MALVAGIO, NON TE NE IMPORTERà NULLA DELLE PERSONE UCCISE E SBAGLIERAI. MENTRE SE INCONSCIAMENTE INDOVINERAI, SIGNIFICHERà CHE NEL TUO CUORE LA BONTà PERSISTE ANCORA. Non puoi semplicemente indovinare...

GET: Number (0 cifre - 1000000 cifre) in var. "PROVA"
If var. "prova" = "mostri_ammazzati", allora:
MES: Hai un cuore puro e puoi passare.
ELSE:
MES: Ora pagherai le tue colpe amaramente...
Imposta bgm battaglia: boss1
battaglia: sfinge

Come vedi, non è molto utile sapere il numero di nemici uccisi... se l'eroe lo potesse vedere, enigmi come questo sarebbero inutili seingh...Wink
si ma potrebbe essere utile in questo
puts(puoi passare solo se hai ucciso 1000 mostri);
if (sg_kills >= 1000)
puts(bene puoi passare);
exit
end
(tradotto in rpg makerese (non ruby))
<>mess: puoi passare solo se hai ucciso 1000 mostri
<>if sg_kills >= 1000
<>mess: bene puoi passare
<>end
<>