vlio121

Warper
Member
Joined
Oct 11, 2017
Messages
1
Reaction score
0
First Language
spanish
Primarily Uses
RMVXA
i have a problem i was creating a game with this engine and i search for put a melee atack

#==============================================================================
# Bullpup Shooting Engine Weapons
#==============================================================================
#------------------------------------------------------------------------------
# Créditos: Leon-S.K --- ou --- Andre Luiz Marques Torres Micheletti
#==============================================================================

#------------------------------------------------------------------------------
# ARMAS A SEREM USADAS PELO SCRIPT
#------------------------------------------------------------------------------
module Weapons_To_Be_Used
#------------------------------------------------------------------------------.
# Para criar uma arma, copie: Armas[id] = [a, b, c, d, e, f] e mude:
# ID = Id da arma no database; a = id do item para ser o cartucho da arma
# b = maximo de balas em um cartucho; c = tempo de espera para o proximo tiro
# d = som de tiro, reload e no_ammo
# e = push back sofrido pelo tiro (em frames)
# f = peso da arma (1 muito leve ~ 4 muito pesado)
Armas = {}
Armas[1] = [17, 15, 50, "usp", 10, 1]
Armas[2] = [20, 32, 13, "ump45", 8, 2]
Armas[3] = [20, 32, 10, "mp5", 5, 2]
Armas[4] = [20, 40, 9, "mp7", 5, 2]
Armas[5] = [20, 50, 8, "p90", 5, 2]
Armas[6] = [19, 24, 14, "ak47",9, 3]
Armas[7] = [19, 24, 14, "m4a1", 9, 3]
Armas[8] = [18, 6, 85, "m3", 12, 2]
Armas[9] = [19, 10, 70, "awp", 15, 4]
Armas[10] = [19, 26, 13, "galil", 9, 2]
Armas[11] = [19, 26, 13, "famas", 9, 2]
Armas[12] = [21, 1, 90, "rocket", 20, 4]
Armas[13] = [3, 2, 2, "rocket", 2, 2]
#----------------------------------------------------------------------------
#~ Você pode ainda criar armas com efeito de area (explosivos)
#~ Colocando no comentario da arma => "area"
#~
#~ Você pode ainda criar armas com efeito de perfuração (sniper)
#~ Colocando no comentario da arma => "pierce x"
#~ Onde x é a qnt de inimigos que ela pode atravessar
#----------------------------------------------------------------------------
end
#==============================================================================

#------------------------------------------------------------------------------
# AREA NAO EDITAVEl!
#------------------------------------------------------------------------------

class Scene_Map < Scene_Base

include Weapons_To_Be_Used
alias my_start start
def start
my_start
create_global_weapons(Armas) if $weapons.nil?
end

def create_global_weapons(armas)
$weapons = []
armas.each { |arma|
p1 = $data_weapons[arma[0]]
p2 = $data_items[arma[1][0]]
p3 = arma[1][1]
p4 = arma[1][2]
p5 = arma[1][3]
p6 = arma[1][4]
p7 = arma[1][5]
$weapons.push(Abs_Weapon.new(p1, p2, p3, p4, p5, p6, p7))
}
end
end

#----------------------------------------------------------------------------------#
class Abs_Weapon

attr_accessor :recover
attr_accessor :magazine
attr_accessor :bullets
attr_accessor :max
attr_accessor :weapon
attr_accessor :iconset_id
attr_accessor :name
attr_accessor :wav_name
attr_accessor :pushback
attr_reader :area
attr_reader :pierce
attr_reader :pierce_num
attr_reader :weight

def initialize(weapon, magazine, max, recover, wav_name, pushback, weight)
@weapon, @magazine, @max, @recover, @wav_name = weapon, magazine, max, recover, wav_name
@bullets = 0; @iconset_id = @magazine.icon_index; @Name = @weapon.name
@weight = weight
@pushback = pushback
@pierce = false; @area = false
if @weapon.note.include?("area")
@area = true
else
@area = false
end
if @weapon.note.include?("pierce=")
return if @weapon.note.include?("area")
number = @weapon.note.sub("pierce=","")
@pierce_num = number.to_i
@pierce = true
if @pierce_num == nil
@pierce_num = Module_Of_Config::pierce_Enemies
end
else
@pierce = false
end
end

def sniper?
if @weapon.note == "sniper"
@pierce = true if !@pierce
@pierce_num = Module_Of_Config::Sniper_Pierce if @pierce_num != Module_Of_Config::Sniper_Pierce
return true
end
return false
end
end

#----------------------------------------------------------------------------------#
class Game_Actor < Game_Battler

alias :my_def :change_equip

def change_equip(slot_id, item)
if slot_id == 0
for weapon in $weapons
break if item == nil
if weapon.weapon.id == item.id
$game_player.equipped_weapon = weapon
$game_player.equipped_weapon.bullets = 0 if $game_player.equipped_weapon.bullets.nil?
break
else
$game_player.equipped_weapon = nil
end
end
if item == nil
$game_player.equipped_weapon = nil
end
$game_player.weight = false
my_def(slot_id, item)
else
my_def(slot_id, item)
end
end
end

i make a zombie but he can not atack

only weapon note tags can be used in events

View attachment 73489 View attachment 73490 View attachment 73491 View attachment 73492 View attachment 73489 View attachment 73490 View attachment 73491 View attachment 73492 View attachment 73491 View attachment 73492

example: Armas[6] = [19, 24, 14, "ak47",9, 3]


i really want enemys can do a melee atack! not only use fire weapons

when i put:
Armas[13] = [3, 2, 2, "melee", 2, 2] the enemy char use knife sprite but the damage is a fire ranged atack View attachment 73489 View attachment 73490
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,730
First Language
English
Primarily Uses
RMVXA
None of your images are showing because you have not linked them correctly. I am having to guess at what you might have done, but they need to end in either .JPG or .PNG when linking from other sites. You cannot paste the URL as-is, you need to right click the image and select "copy image location" or something of similar wording.

It is better to provide a link to a script rather than copy/paste it here. The web page where you got it from may well contain other information or description which would help with the problem. Also, because you did not use the "code" button to paste it, some of the coding has turned into smileys.
 

Latest Threads

Latest Posts

Latest Profile Posts

Well, I've decided I'll take a break on making Forgotten Eclipse...and Make a mod for FNF
Trailer for my new game.
last one for a while
MythicRuss wrote on gothicvoid's profile.
hi, i was looking thru ur awesome stuff, and was looking around the internet, how in the heckin heck do i get the hiddendoors to open? im addng them to the doors event but they just appear as solid walls, btw am total noob lol

Forum statistics

Threads
110,308
Messages
1,052,185
Members
143,343
Latest member
DarkValkyrieSin
Top