(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,326
Reaction score
482
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
170
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,326
Reaction score
482
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
170
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

Is it strange that dropping acid is improving my game development?
I'm starting to wonder if I should go the Half Minute Hero route with my game. The character's main weapon is logistically way too strong. So I can't really let the player continuously grow it.... But if they had to build it up each time like HMH, that could work. Also it lets me take advantage of my randomly generated maps so much more. Hmm... This could work! :LZSexcite:
std::vector, std::map and std::string. Three reasons why I'd take C++ over C. :D

Forum statistics

Threads
99,201
Messages
962,967
Members
130,785
Latest member
nutsackjack
Top