Save-Point
Change character script - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Archives (https://www.save-point.org/forum-105.html)
+--- Forum: Creation Asylum Archives (https://www.save-point.org/forum-90.html)
+---- Forum: Scripts & Code Snippets (https://www.save-point.org/forum-92.html)
+----- Forum: RPG Maker XP Code (https://www.save-point.org/forum-93.html)
+----- Thread: Change character script (/thread-6961.html)



Change character script - jaigai - 11-19-2006

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


This script makes it so u can change the character sprites by pressing the A button.

In Game_Player, after this block of code:
Code:
# If C button was pressed
      if Input.trigger?(Input::C)
        # Same position and front event determinant
        check_event_trigger_here([0])
        check_event_trigger_there([0,1,2])
      end


add:
Code:
# If A button was pressed to cycle party
      if Input.trigger?(Input::A) && !moving?
        $game_variables[3]+=1
      end
      if $game_variables[3] >= $game_party.actors.size
        $game_variables[3] = 0
      end
      refresh


And then change this line:
Code:
actor = $game_party.actors[0]


to:
Code:
actor = $game_party.actors[$game_variables[3]]


That's it...it's my first script, so it's pretty simple. I couldn't find a script that did this, so I did it on my own. If there's any better way, feel free to tell me. Also, I used a variable for a reason, but you don't have to.