Announcement
Announcement
| 2nd Quarter Contest Announcement posted! See the Community Announcements section. |
![]() ![]() |
Apr 15 2012, 10:34 PM
Post
#1
|
|
![]() ![]() Type: Designer Alignment: True Neutral |
Hi everyone,
When I remove the main character from my party, the sprite walking on the map changes, and I don't want that. I want the character on the map to always be the same, even if he's not in my party. But I'd also like to be able to change the graphic to "invisible" for cut-scenes where he shouldn't be there. I need a script for this, because I can't just put the same graphic for every actor. Their graphics must appear during battle, so they can't all be the same. I use KGC_LargeParty Thanks a lot! Why I need this: I don't want to have to "lock" the main character and force people to use him every battle, but I still want him to appear on the map. In my project, you should be able to switch characters even during battle, just like in Final Fantasy X. This post has been edited by TheDrifter: Apr 16 2012, 05:09 PM |
|
|
|
Apr 16 2012, 11:53 AM
Post
#2
|
|
![]() ![]() Type: Coder Alignment: Neutral Good |
Hi, in the "Game Player" script search that :
CODE def refresh if $game_party.members.size == 0 @character_name = "" @character_index = 0 else actor = $game_party.members[0] # Get front actor @character_name = actor.character_name @character_index = actor.character_index end end and just change it for that : CODE def refresh
if $game_party.members.size == 0 @character_name = "" @character_index = 0 else @character_name = "filename" # The filename of your character ex : Actor1 inside the " " (for default) @character_index = 0 # The index of the character ex : 0 (for default) end end -------------------- |
|
|
|
Apr 16 2012, 04:55 PM
Post
#3
|
|
![]() ![]() Type: Designer Alignment: True Neutral |
Hi, in the "Game Player" script search that : CODE def refresh if $game_party.members.size == 0 @character_name = "" @character_index = 0 else actor = $game_party.members[0] # Get front actor @character_name = actor.character_name @character_index = actor.character_index end end and just change it for that : CODE def refresh if $game_party.members.size == 0 @character_name = "" @character_index = 0 else @character_name = "filename" # The filename of your character ex : Actor1 inside the " " (for default) @character_index = 0 # The index of the character ex : 0 (for default) end end Thank you very much, kind sir. That helps a lot! However, I still need to be able to change the graphic mid-game... Is there a way I can do that with events? |
|
|
|
Apr 16 2012, 05:00 PM
Post
#4
|
|
![]() ![]() Type: Coder Alignment: Neutral Good |
you can use a condition like this :
CODE def refresh if $game_party.members.size == 0 @character_name = "" @character_index = 0 else if $game_switches[IDOFTHESWITCHYOUWANT] == true @character_name = "filename" # The filename of your character ex : Actor1 inside the " " (for default) @character_index = 0 # The index of the character ex : 0 (for default) end end end juste replace the IDOFTHESWITCHYOUWANT by the id of the switch you want This post has been edited by Zarby: Apr 16 2012, 05:00 PM -------------------- |
|
|
|
Apr 16 2012, 05:09 PM
Post
#5
|
|
![]() ![]() Type: Designer Alignment: True Neutral |
Thanks, that's awesome! Thank you for the quick reply and everything.
This issue is now [Solved]. This post has been edited by TheDrifter: Apr 16 2012, 05:13 PM |
|
|
|
Apr 19 2012, 04:23 PM
Post
#6
|
|
![]() Meowthos the zombie cat!! ![]() Type: Coder Alignment: Lawful Good |
I know you put solved, but I just thought I'd post this, it's basically the same idea as Zarby's but I tweaked a couple of things:
First, it doesn't require changing the default scripts, you can just paste it in 'Materials' Second, It uses the value of one game variable (you pick which one at the top of the script) to control which party memeber is displayed, you can just change the value of that variable in an event. CODE class Game_Player DISPLAY_VARIABLE = 4 #Set this to the number of the game variable that will control the active character def refresh if $game_party.members.size == 0 @character_name = "" @character_index = 0 else actor = $game_party.members[$game_variables[DISPLAY_VARIABLE]] @character_name = actor.character_name @character_index = actor.character_index end end end Hope it's useful to ya -------------------- I've been away for a while. Here's my really quite old stuff
Spoiler: |
|
|
|
Dec 12 2012, 02:56 AM
Post
#7
|
|
![]() ![]() Type: Designer Alignment: True Neutral |
I know you put solved, but I just thought I'd post this, it's basically the same idea as Zarby's but I tweaked a couple of things: First, it doesn't require changing the default scripts, you can just paste it in 'Materials' Second, It uses the value of one game variable (you pick which one at the top of the script) to control which party memeber is displayed, you can just change the value of that variable in an event. CODE class Game_Player DISPLAY_VARIABLE = 4 #Set this to the number of the game variable that will control the active character def refresh if $game_party.members.size == 0 @character_name = "" @character_index = 0 else actor = $game_party.members[$game_variables[DISPLAY_VARIABLE]] @character_name = actor.character_name @character_index = actor.character_index end end end Hope it's useful to ya Thank you very much. I kinda moved to VX Ace since then, but I still work on my previous VX project from time to time, so this is still useful. |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 23rd May 2013 - 12:02 AM |
|
|