(RMXP) Script compatibility error

Qeo

Veteran
Veteran
Joined
Jan 12, 2014
Messages
110
Reaction score
22
Primarily Uses
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?


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
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,336
Reaction score
483
First Language
English
Primarily Uses
RMVXA
I do not believe =~ is a ruby operator
 

Qeo

Veteran
Veteran
Joined
Jan 12, 2014
Messages
110
Reaction score
22
Primarily Uses
I do not believe =~ is a ruby operator
Oh hmm, what would I use instead? It fails to work when I get rid of the "~"
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
173
Reaction score
62
First Language
English
Primarily Uses
RMXP
=~ is a valid operator. It's even on the page you linked.

Can you provide the whereabouts on the scripts, or upload your Scripts.rxdata?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,336
Reaction score
483
First Language
English
Primarily Uses
RMVXA
Ah. I see it now. Weird use. You would certainly have an idea of how it would be used.
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
173
Reaction score
62
First Language
English
Primarily Uses
RMXP
My issue is that I'm not familiar with how this Metroid script works, nor do I know where I can get a demo of it in action. Part of me thinks the issue is unrelated to your fix and could--just maybe--be scripts that aren't meant to ever work together.

I probably should have asked for a minimal reproducible demo instead.
 

Qeo

Veteran
Veteran
Joined
Jan 12, 2014
Messages
110
Reaction score
22
Primarily Uses
My issue is that I'm not familiar with how this Metroid script works, nor do I know where I can get a demo of it in action. Part of me thinks the issue is unrelated to your fix and could--just maybe--be scripts that aren't meant to ever work together.

I probably should have asked for a minimal reproducible demo instead.
Oh okay here's a more recent demo than the one I used, only one I could find. It has some scripts by others in Add ons under "Materials" but I'm only using behemoth's stuff above that. A lot of the original rmxp scripts were edited so it's a tough issue.

 

Qeo

Veteran
Veteran
Joined
Jan 12, 2014
Messages
110
Reaction score
22
Primarily Uses
My issue is that I'm not familiar with how this Metroid script works, nor do I know where I can get a demo of it in action. Part of me thinks the issue is unrelated to your fix and could--just maybe--be scripts that aren't meant to ever work together.

I probably should have asked for a minimal reproducible demo instead.
Nevermind, I've just got rid of it - while it was a fun minigame it's not worth ruining the exploration of the world map so I've removed all traces of it so now everything works fine. It has managed to work with a lot of scripts, just not any involving vehicle world map movement so if that's not important to someone, like if there's no world map or it's point to point (mario world style) it's a recommended fun minigame.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

lunarrosecrow wrote on hiddenone's profile.
please don't lurk hiddenone I'm quarantining!!!
lunarrosecrow wrote on Edward.T's profile.
Hello Edward sorry to bother you and didn't start a conversation cause I thought i'd be a little weird or disrespectful but I was wondering do you still have your Generator resources you posted as the links on the page are dead?
Stream will be live shortly! It is my birthday, and thus I am doing an extended stream! I will be doing a variety of things. Among the activities I will be doing: Playing Oceanhorn: Monster of the Uncharted Seas, art, and some Text Adventure~ Feel free to drop by!
It would be cool if you could "copy as code" event commands :< .
Just managed to recover my Yahoo e-mail that i lost 3 months ago. Turns out an IP from U.S had hacked it and set the pass back to normal.. Like WTF ?

Forum statistics

Threads
99,484
Messages
965,913
Members
131,111
Latest member
HannyBee21
Top