Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Actors name control

This script let you check if actors names have banned words in they.

Code:
#==============================================================================

# Actors name control

# By gerkrt/gerrtunk, Heretic86(Idea)

# Version: 1.0

# License: MIT, credits

# Date: 12/07/2011

# IMPORTANT NOTE: to acces the more actualitzed or corrected version of this

# script check here: [url=http://usuarios.multimania.es/kisap/english_list.html]http://usuarios.multimania.es/kisap/english_list.html[/url]

#==============================================================================

 

=begin

 

------INTRODUCTION------

 

This script let you check if actors names have banned words in they.

 

-------INSTRUCTIONS---------

 

Add any new words in Banned_words list, adding a , 'X' each time.

The switch is actived when the scripts call found what where seeking. 

Note that yu can use the scripts in a conditions and efects.

 

is_banned?(actor_id): Call script that check if the actor have a  banned name.

  is_banned?(1) --> check for alexis actor id 1

  

is_word?(actor_id, word): Call script that check if the actors name is the word.

  is_word?(1, 'Wep')  --> check for alexis actor id and the word 'Wep'

 

Note that this script is case unsesitive.

=end

 

module Wep

  Banned_words = 'Wep', 'Joan', 'melodic'

  Switch_for_banned = 1

end

 

class Interpreter

 

  #--------------------------------------------------------------------------

  # * Is banned?

  #--------------------------------------------------------------------------

  def is_banned?(actor_id)

    for bw in Wep::Banned_words

      if bw.upcase == $game_actors[actor_id].name.upcase

        $game_switches[Wep::Switch_for_banned] = true

        return truerir

      end

    end

    return false

  end

  

  #--------------------------------------------------------------------------

  # * Is word?

  #--------------------------------------------------------------------------

  def is_word?(actor_id, bw)

    if bw.upcase == $game_actors[actor_id].name.upcase

      $game_switches[Wep::Switch_for_banned] = true

      return true

    end

    return false

  end

   

end

 
 
I think that it would be more useful to prevent the player from naming the character the same as other characters in the game. I mean it would be pretty confusing in battles and menus if all your dudes had the same name.
 
This script was a request, xD, i dont think is a lot useful but... using the name as a playable idea is not that bad and its alot original and immersive... anyway it was for a fun game
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top