My game event script has changed since it was used for Behemoth's metroid script, but when used at the same time as Lambchop and DerVVulfman's vehicle script there's errors.
the "return if" part on the 2nd line was to make them both work together - it makes both of them Almost work except for one thing, the samus character's bullets no longer affect anything. Is there a better part to put the "return" or another way to make sure that works as well?
the "return if" part on the 2nd line was to make them both work together - it makes both of them Almost work except for one thing, the samus character's bullets no longer affect anything. Is there a better part to put the "return" or another way to make sure that works as well?
Code:
#--------------------------------------------------------------------------
def check_event_extras
return if @event.name =~ Vehicles::VEHICLE_FORMULA
text = @event.name
s= text["*"]
if s=="*" #Shot trigger
@trigger = 6 #if a shot triggers
end
s = text["monster"]
@monster = s=="monster"
@tint=0
@thp=0
text.gsub!(/\\[Ii]\[([0-9]+)\]/) { "\001[#{$1}]" }
text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\002[#{$1}]" }
# Get 1 text character in c (loop until unable to get text)
while ((c = text.slice!(/./m)) != nil)
# If \I[n]
if c == "\001"
# Change text color
text.sub!(/\[([0-9]+)\]/, "")
@tint = $1.to_i #computer intelligence
next
end
if c == "\002"
# Change text color
text.sub!(/\[([0-9]+)\]/, "")
@thp = $1.to_i #computer HP
next
end
end
#print("trigger=" + @trigger.to_s)
#print("int=" + @tint.to_s)
#print("hp=" + @thp.to_s)
end