RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Earthbound Confusion Walk

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 85
1-This script was made by Maximilian
credit gose to him

This script copys the confusion walk from earthbound,but to make it work you need to make "Confusion" last after battle or the script wont take effect

Hears the script:

Code: [Select]
#===============================================================================
# Earthbound Confusion Walk Script
#    Max
#    rainkimahri@gmail.com
# This script will test to see if an Actor is confused, and, if so, it will
#  change the controls for movement rotating them randomly.
#===============================================================================
class Game_Player < Game_Character
  @maxtemp = 0
  alias max_move_by_input :move_by_input
  def move_by_input
    return unless movable?
    return if $game_map.interpreter.running?
#Here, 001 is the Actor ID of the
#party member I'm checking for confusion
      if $game_actors.[](001).confusion?
          case @maxtemp
          when 0
            case Input.dir4
            when 2;  move_down
            when 4;  move_left
            when 6;  move_right
            when 8;  move_up
            end
          when 1
            case Input.dir4
            when 4;  move_down
            when 8;  move_left
            when 2;  move_right
            when 6;  move_up
            end
          when 2
            case Input.dir4
            when 8;  move_down
            when 6;  move_left
            when 4;  move_right
            when 2;  move_up
            end
          when 3
            case Input.dir4
            when 6;  move_down
            when 2;  move_left
            when 8;  move_right
            when 4;  move_up
            end
          end
          if Input.dir4 != 0
#Here, 10 means 10% chance on player walk
#that the direction keys rotate
            if rand(100) <= 10
            @maxtemp = rand(4)
            end
          end
      else
            case Input.dir4
            when 2;  move_down
            when 4;  move_left
            when 6;  move_right
            when 8;  move_up
            end
      end
      max_move_by_input   
    end
end

class Game_Battler
attr_accessor :hidden
  alias max_confusion? :confusion?
  def confusion?
    return (not @hidden and restriction == 3)
    max_confusion?
  end
end

*
A Random Custom Title
Rep:
Level 96
wah
Erm... Isn't a script kinda unnecessary? Just check if the person has a "Confusion" state and if he does, choose a random number for a variable, turn on another common event that fixes it so that if the number is 1, it makes down go up, left go right, etc. and if the number is 2, etc.

Of course, that's just if you want to event it. It's also off the top of my head so it's probably buggy. :V Stupid comp won't let me use RMXP/VX. >_>

Anyways, if it works, that's cool but the only problem I have with it is that making a script like that seems too much work (that is if my method works but the guy still aliased so w/e) But I guess I should be taking it up with the guy who made it :V

*
Resident Cloud
Rep:
Level 91
this does it RANDOMLY :D

its not too much work its quite simple :D

*
A Random Custom Title
Rep:
Level 96
wah
My way would do it randomly, too. >_>