how to do events when you don't know who is going to be in the party

xcom

Veteran
Veteran
Joined
Mar 13, 2013
Messages
241
Reaction score
59
First Language
English
Primarily Uses
Like the title says, how do I script an event when I don't know who is going to be in the party at the time it happens?

I ask this, because the main hero has several different travel companions that they can choose to have in their party.  Here's the scene I'm trying to make.  The player enters this little cave and I want whoever is person #2 in the party to walk over to a chest they notice and attempt to open it.  If it was a set group, this would be very easy to do.  The problem is I don't know who the player is going to have as the #2, or even as the #3 and #4 person in the party.  I know I can do a \P[#] to have that person in the party line appear to talk.  I've been poking around with the options for awhile now and can't seem to figure it out.  The only thing I can think of is a long complicated branch of conditions and switches, but I'm hoping there's and easier way then that. 

Thanks!
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
I think you can fetch the sprite data of an actor, so I guess using that, you can fetch sprite data of party member 2, then fetch the character image used by that sprite, and make the event use it...


all via script calls
 

xcom

Veteran
Veteran
Joined
Mar 13, 2013
Messages
241
Reaction score
59
First Language
English
Primarily Uses
I think you can fetch the sprite data of an actor, so I guess using that, you can fetch sprite data of party member 2, then fetch the character image used by that sprite, and make the event use it...

all via script calls
Now I just need to figure out how to do that.   hmmm.....
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
As a start, it is possible for the game to identify who actor 2 in the active party is.

control variable

on the opening tab select 'Game Data', click on the ellipsis at the right side of the box.  this takes you to another tab

select 7th option down i.e. 'Party'; select member #2 and that will store the actor ID of whoever is actor 2 at that moment.

Not sure how to go from there to getting that actor's graphic, but maybe the variable data is enough?  Dunno.
 

xcom

Veteran
Veteran
Joined
Mar 13, 2013
Messages
241
Reaction score
59
First Language
English
Primarily Uses
As a start, it is possible for the game to identify who actor 2 in the active party is.

control variable

on the opening tab select 'Game Data', click on the ellipsis at the right side of the box.  this takes you to another tab

select 7th option down i.e. 'Party'; select member #2 and that will store the actor ID of whoever is actor 2 at that moment.

Not sure how to go from there to getting that actor's graphic, but maybe the variable data is enough?  Dunno.
I saw that option and have been experimenting with it.  I've even tried adding some conditional branches, and other variables along with the change actor graphic option.  I still can't get anything to work.  Maybe I'm just approaching it wrong.    Hmm...

The only other thing I can think of it a set of switches, along with a variable to determine their place in line. There's 10 possible companion choices and 3 different spots.  Which means I would have to create one event that has a combination of 10 different options to determine who that one person could be! 

There's just got to be a better way then that.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
1) make the event that you're using to walk to the chest with ten pages, and place the sprite for the actor on the same page number as the actor ID. Condition each page to a variable "sprite#2" with the number of the page / actorID


2) in the event controlling the cutscene, do a control variable for "sprite#2" with the Party-member#2 gamedata like described by ksjp17


3) command the moveroute for the event, it will automatically switch to the correct sprite for the actor in slot 2, if you did everything correctly.
 

xcom

Veteran
Veteran
Joined
Mar 13, 2013
Messages
241
Reaction score
59
First Language
English
Primarily Uses
1) make the event that you're using to walk to the chest with ten pages, and place the sprite for the actor on the same page number as the actor ID. Condition each page to a variable "sprite#2" with the number of the page / actorID

2) in the event controlling the cutscene, do a control variable for "sprite#2" with the Party-member#2 gamedata like described by ksjp17

3) command the moveroute for the event, it will automatically switch to the correct sprite for the actor in slot 2, if you did everything correctly.
Okay, I get the multiple event tabs with the various sprites in it.  I don't understand the part about how to condition the variables to the actor ID. 
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
To set a variable to actor ID


Change variables command -> Game Data? Party -> Member #X's actor ID


then on your pages, just use that variable >= ActorID


like if Page 1 should show Actor1, you condition would be


Variable >= 1


then if page 2 should show Actor2


Variable >= 2


and so on
 
Last edited by a moderator:

xcom

Veteran
Veteran
Joined
Mar 13, 2013
Messages
241
Reaction score
59
First Language
English
Primarily Uses
To set a variable to actor ID

Change variables command -> Game Data? Party -> Member #X's actor ID

then on your pages, just use that variable >= ActorID

like if Page 1 should show Actor1, you condition would be

Variable >= 1

then if page 2 should show Actor2

Variable >= 2

and so on
Still not working for me.  Is there any way I can get a screen shot of what you're doing?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
post a screenshot of what ur doing instead...


and first of all, make sure that ur setting the variable before the scene starts...


EDIT: got a bit not so lazy


Page 1

1.PNG
Page 2

2.PNG
Parallel event that sets variable

3.PNG
What it does?


If Member 1 is Actor 1, it shows page 1, if it's Actor 2, it shows page 2
 
Last edited by a moderator:

xcom

Veteran
Veteran
Joined
Mar 13, 2013
Messages
241
Reaction score
59
First Language
English
Primarily Uses
Okay, I've been experimenting with it for awhile now, and I still can't get it to work.  

This is what I have when the player is selecting which party members they want.

The ( player # ) variable to control the order in which they are selected since I do not know which order the player will select his companions.
The ( player # data ) variable which follows is to set the members ID # to that variable.  

If I understand it all correctly, and programmed it all correctly it should be doing the following:
When the player selects his first companion, the conditions should be checking the order.
So if PLAYER 2 variable is = 0, it adds 1 to that variable and then it should be SETTING the member #2 data to the PLAYER 2 DATA variable.
So when the player selects his 2nd companion, since the PLAYER 2 variable = 1 instead of 0, it should move to the next condition branch and repeat the process.

So all that data is set when the player picks his 3 companions.

Then the chase happens and they move onto the map where I want the event to happen and the problem for me begins.

So the player enters this cave where they chased the bad guy to, and the bad guy is no where to be scene.  
What I'm trying to do is create a small event in that cave, but I don't know who the player picked to be in the group.
I want all 4 of the people in the group shown on the map, actor 1 (who is the player), and actors 2-4 who are selectable by the player.
What I'm trying to do is have whoever actor #2 is, notice a chest and move over to it and a short conversation happens before they get ambushed.

I just can't seem to figure out what I'm doing wrong trying to make the selectable show on the map.  I made 3 events on the map named player 2, player 3, and player 4.  I just can't seem to understand how to make the data carry over from what was set when he player selected his companions to those events to show the proper companion.  I made 10 tabs in the events, each tab has 1 of the selectable companions in it.  I just can't seem to understand what you are saying to make it work.   :banghead: Either no one is showing, or it's showing the last person in the tabs.
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
I need to see the other event, the one which uses the variable value as a condition... you're clearly doing something wrong since the one I posted above works totally fine for showing a different graphic depending on who is on party slot#2 so if you copy how I did it (I even posted screenshots), it should work fine... you would be using the player data variable


I think you most probably have the condition set up wrong...


PS: You just might wanna use switches instead of variables for that party add thing (replace the player variable with a switch) since you only really need to know if there's already an actor there or not...


or you can also just check out if the certain slot already has an actor via checking the actor ID of that slot... if yes then move to the next slot...


PS 2: I'm leaving in about 1 hour so if you don't get to reply before that, I can't help until tomorrow... :)


PS 3: btw, you might need to initialize the actor in case you didn't...
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
If this is JUST for a cutscene, where you want the player to walk to a certain spot, then the #2, #3 and #4 all appear around him, move around a bit, and at the end all disappear again, I would do it this way - a lot shorter than those mentioned, but it does involve using a Script call in a Move Route:

1. Have events that have no graphics and no commands - just set their speed to whatever your game player's speed is (usually 4). Let's assume I've got events 2, 3 and 4 as my "party placeholders" - event 1 is the controlling event that will make them all do things.

2. In your controlling event, do the following:

Set Move Route (EV002): Script: set_graphic($game_player.followers[0].character_name, $game_player.followers[0].character_index)Set Move Route (EV003): Script: set_graphic($game_player.followers[1].character_name, $game_player.followers[1].character_index)Set Move Route (EV004): Script: set_graphic($game_player.followers[2].character_name, $game_player.followers[2].character_index)If you are not SURE if you're going to have that many members, then enclose each of those in a conditional branch so they're only run if the party size is >= that number.When you want them to disappear, just run another Set Move Route on each event, using the Change Graphic command (within the Set Move Route), and select None as the graphic to display.

Sorry if this adds to the confusion - just wanted to throw it out there as maybe a more simple solution.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
Here are two screenshots of how to setup the events I described a few posts above.

There is no need either for parallel process or for the complex branching and variables as used in the select group event - if the event used for displaying the party member #2 is setup in the following way, you only need the single control variable command as displayed in the controlling event...



 

xcom

Veteran
Veteran
Joined
Mar 13, 2013
Messages
241
Reaction score
59
First Language
English
Primarily Uses
I need to see the other event, the one which uses the variable value as a condition... you're clearly doing something wrong since the one I posted above works totally fine for showing a different graphic depending on who is on party slot#2 so if you copy how I did it (I even posted screenshots), it should work fine... you would be using the player data variable

I think you most probably have the condition set up wrong...

PS: You just might wanna use switches instead of variables for that party add thing (replace the player variable with a switch) since you only really need to know if there's already an actor there or not...

or you can also just check out if the certain slot already has an actor via checking the actor ID of that slot... if yes then move to the next slot...

PS 2: I'm leaving in about 1 hour so if you don't get to reply before that, I can't help until tomorrow... :)

PS 3: btw, you might need to initialize the actor in case you didn't...
Sorry about the delay, I called it a night shortly after that last post.  Then I had to work a full shift at the real job today.

PS:  I thought about it more today while at work.  I think switches might be better for me.  I'm going to have to make 30 switches for it to work.  (10 characters with 3 spots that they could be in.)

PS 3:  How do you do that?

Here are two screenshots of how to setup the events I described a few posts above.

There is no need either for parallel process or for the complex branching and variables as used in the select group event - if the event used for displaying the party member #2 is setup in the following way, you only need the single control variable command as displayed in the controlling event...



Okay I tried that, and it kinda worked.  It showed the actors I selected, but they weren't the right ones.  I don't understand the part where I select a actor for that tab.  The problem is I don't know who is going to be in that spot. 
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
I never said switches to determine which actor is at a place, I said use switches to determine if a spot is already taken... so that should be only 1 switch per spot...


The graphic per tab should correspond to the graphic of the actor ID that you set on the conditions part... In his example, that event named Player #2 will be showing whoever is your party's second member...


for your case, you need 10 pages, page 1 checks for the value of the Player 2 variable [All pages of the Player 2 event should check for this same variable] and uses condition, equals to 1, page 2 uses equals to 2 and so on...


If you did understand my and his posts you should have done it right by now... so if ur still having problems, I think you're setting it up wrongly, so you need to post a screenshot of what ur doing since we cannot predict what ur doing...
 
Last edited by a moderator:

xcom

Veteran
Veteran
Joined
Mar 13, 2013
Messages
241
Reaction score
59
First Language
English
Primarily Uses
If this is JUST for a cutscene, where you want the player to walk to a certain spot, then the #2, #3 and #4 all appear around him, move around a bit, and at the end all disappear again, I would do it this way - a lot shorter than those mentioned, but it does involve using a Script call in a Move Route:

1. Have events that have no graphics and no commands - just set their speed to whatever your game player's speed is (usually 4). Let's assume I've got events 2, 3 and 4 as my "party placeholders" - event 1 is the controlling event that will make them all do things.

2. In your controlling event, do the following:

Set Move Route (EV002): Script: set_graphic($game_player.followers[0].character_name, $game_player.followers[0].character_index)Set Move Route (EV003): Script: set_graphic($game_player.followers[1].character_name, $game_player.followers[1].character_index)Set Move Route (EV004): Script: set_graphic($game_player.followers[2].character_name, $game_player.followers[2].character_index)If you are not SURE if you're going to have that many members, then enclose each of those in a conditional branch so they're only run if the party size is >= that number.When you want them to disappear, just run another Set Move Route on each event, using the Change Graphic command (within the Set Move Route), and select None as the graphic to display.

Sorry if this adds to the confusion - just wanted to throw it out there as maybe a more simple solution.
Yes this is just for a cut scene, and I want them to do just what you said.

So I made the place holder event like you said.

I copied and pasted the script into the SET MOVE ROUTE like you said.  

Nothing shows up though.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
just show us what you did following Andar's post, it seems that you're near already, just that you're setting it up in a wrong way... :)


or doing Shaz' way, please post the complete script call


and the whole event page of where you added the set move route
 
Last edited by a moderator:

xcom

Veteran
Veteran
Joined
Mar 13, 2013
Messages
241
Reaction score
59
First Language
English
Primarily Uses
First and foremost I want to thank the people who have been trying to help me understand this.  I know you don't have to take time and explain it to novice like myself.  Which is why I really appreciate your help in this matter.  The kids have been keeping me busy the last couple hours, and I'm kinda stressed at the moment.  So I'm going to put this down for the night and try again when I get back from work tomorrow. 
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
Okay I tried that, and it kinda worked.  It showed the actors I selected, but they weren't the right ones.  I don't understand the part where I select a actor for that tab.  The problem is I don't know who is going to be in that spot.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,015
Members
137,563
Latest member
MinyakaAeon
Top