Posts: 10
Threads: 2
Joined: Apr 2014
So... I'm getting all the scripting out of the way before starting over with a project and this one has been bothering me.
I'm using a script to switch the party order (you press a key outside of battle and the second party member becomes the first, the first becomes the last, etc.) but I'd like to make a very basic edition to the script to disable its use if a switch is on.
For cutscenes, for instance, players can still fuck around and switch party members so you end up with an NPC adressing a secondary character as if they were the protagonist. With said secondary character standing right next to it.
I've attached the script in question as a txt. I have no scripting skills aside from Pascal, so I'd largely appreciate some help.
Change party order.txt (Size: 667 bytes / Downloads: 3)
"No, that's the fourth one. The one where you shoot your head to summon demons is the third one."
- Me, trying to explain Persona 3 without sounding like a madman.
Posts: 10
Threads: 2
Joined: Apr 2014
Uh... yeah, it's been like two weeks and no reply. Is there a way to bump this? Because I have no idea how to do that.
"No, that's the fourth one. The one where you shoot your head to summon demons is the third one."
- Me, trying to explain Persona 3 without sounding like a madman.
Posts: 422
Threads: 23
Joined: Aug 2011
posting in your own thread to move it to the top of the list is called a bump. Which is what you just did o:
Code:
class Scene_Map
alias modern_algebra_change_leader_modification update
def update
modern_algebra_change_leader_modification
if Input.trigger? (Input::Letters["Q"]) && $game_switches[36] == true
# Remove the Lead Actor
old_lead = $game_party.actors.shift
# Add the old leader back into the party
$game_party.add_actor (old_lead.id)
end
if Input.trigger? (Input::Letters["W"]) && $game_switches[36] == true
# Remove the last actor in the party
new_lead = $game_party.actors.pop
# Insert him as the lead actor
$game_party.actors.unshift (new_lead)
# Refresh $game_player to reflect new leader
$game_player.refresh
end
end
end
It's just that simple.
Posts: 10
Threads: 2
Joined: Apr 2014
Wow, that WAS simple. Great, thanks.
"No, that's the fourth one. The one where you shoot your head to summon demons is the third one."
- Me, trying to explain Persona 3 without sounding like a madman.
Posts: 10
Threads: 2
Joined: Apr 2014
Wait. No. It's not working.
"No, that's the fourth one. The one where you shoot your head to summon demons is the third one."
- Me, trying to explain Persona 3 without sounding like a madman.
Posts: 422
Threads: 23
Joined: Aug 2011
Whoops. Change the = to ==. I also edited my original post.
Posts: 1,038
Threads: 36
Joined: Oct 2011
can i ask why you would want to do this with a script? what makes that less work?
Posts: 422
Threads: 23
Joined: Aug 2011
How would you do this without a script? Because I cannot imagine any way to write this using events unless you've hard coded the party characters or use a bazillion case statements.
Posts: 10
Threads: 2
Joined: Apr 2014
There you go, thanks! Even if the switch was off, every time you pressed either key the switch turned itself on, so there was no way to turn it off and disable the function.
As for doing it without a script... why? Why go crazy with common events and conditionals when there's a very simple script that does it for you?
"No, that's the fourth one. The one where you shoot your head to summon demons is the third one."
- Me, trying to explain Persona 3 without sounding like a madman.
Posts: 1,038
Threads: 36
Joined: Oct 2011
(05-04-2014, 10:17 PM)MechanicalPen Wrote: How would you do this without a script? Because I cannot imagine any way to write this using events unless you've hard coded the party characters or use a bazillion case statements.
like this. it worked with a
character select map like this. the default party members were ghosts who had to inhabit mortal bodies to escape a dungeon. the gimmick is up to you though