Script Call Equivalent of Events

Status
Not open for further replies.

Bethins

Villager
Member
Joined
Nov 4, 2012
Messages
69
Reaction score
0
First Language
English
Primarily Uses
Is there a script call for the page 3 conditional branch option for the  direction the player is facing?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,470
Reaction score
12,018
First Language
English
Primarily Uses
RMMV
$game_player.direction


2 = down


4 = left


6 = right


8 = up
 

Bethins

Villager
Member
Joined
Nov 4, 2012
Messages
69
Reaction score
0
First Language
English
Primarily Uses
So...

$game_player.direction==2

Would provide a true if player was facing down?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,470
Reaction score
12,018
First Language
English
Primarily Uses
RMMV

Shion Kreth

White Knight
Veteran
Joined
Jan 28, 2013
Messages
281
Reaction score
47
First Language
English
Primarily Uses
Could we use a command like this to check a character's oisition within the party(1st, 2nd, 3rd, etc..) when battle starts and assign each a TRG based on their position?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,470
Reaction score
12,018
First Language
English
Primarily Uses
RMMV
A command like what?


To find a character's position in the party, you just do $game_actors[id].index where id is the actor id, and index is their position (0 is the leader).
 

Shion Kreth

White Knight
Veteran
Joined
Jan 28, 2013
Messages
281
Reaction score
47
First Language
English
Primarily Uses
Umm.. when requesting a script on the script forum one guy's response was:

this seems simple enough, at the start of each battle you'd have to run common event that checks the player's position in the party, then sets their trg value depending on the result, conditional branches and all that. i don't know the script equivalent of the player's position in the party, so you'd have to ask for that in this thread

 
and perhaps I'm inquiring the wrong way, this stuff is a bit advanced for me.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,470
Reaction score
12,018
First Language
English
Primarily Uses
RMMV
$game_actors[id].index will give you the position in the party of that character. Now you should take that information back over to your other request thread and find out how to use that to do exactly what you're after, as anything outside of that script snippet is also off topic for this thread :)
 

Adon

ADONKADONK
Veteran
Joined
Mar 24, 2012
Messages
93
Reaction score
15
First Language
English
Primarily Uses
Back in the earlier pages of this topic, there was the Show Choices command equivalent and the branches equivalent. Unfortunately, I am having some troubles with the branch part.
 
 I am using the script calls with Fomar's Aeon Party script, and am using this in my summoning skill's common event script call:
 

command_skip if @branch[@indent] != @params[0]if @branch[@indent] == 0RPG::SE.new("evil laugh", 125, 150).playa = $game_actors[9]$game_party.aeons.push(a)$game_actors[9].change_level($game_actors[6].level, FALSE)SceneManager.scene.create_spritesetcommand_314 # this probably needs fixingelsif @branch[@indent] == 1RPG::SE.new("079-Monster01", 125, 50).playa = $game_actors[10]$game_party.aeons.push(a)$game_actors[10].change_level($game_actors[6].level, FALSE)SceneManager.scene.create_spritesetcommand_314endThis shows the choices, but whenever I select a choice, nothing happens and the battle continues on its merry way.

Does anyone know what I am doing wrong?

(is this the correct place to post it?)
 
Last edited by a moderator:

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,255
Reaction score
611
First Language
English
Primarily Uses
For the move picture equivalent:

screen.pictures[n].move(0/1 (top left or center), x, y, zoom1, zoom2, opacity, blend type (0,1, 2), wait)I'm assuming "wait" means the Time in frames?

There's also a check mark for "Wait for Completion" in the event command, but I don't see where you would put that parameter in the script call.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,470
Reaction score
12,018
First Language
English
Primarily Uses
RMMV
screen.pictures[@params[0]].move(@params[2], x, y, @params[6],
@params[7], @params[8], @params[9], @params[10])


wait(@params[10]) if @params[11]

Yes, the wait is the number of frames the process should take. Wait for Completion doesn't actually get passed through to the method. You can see the next line tells the interpreter to wait for that many frames, if the box (@params[11]) is checked.
 

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,255
Reaction score
611
First Language
English
Primarily Uses
interesting. So how would you go about changing the 11th parameter if it isn't passed through to the method?
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,470
Reaction score
12,018
First Language
English
Primarily Uses
RMMV
The method doesn't care about it. It's just a true/false, and it tells the interpreter not to process any more commands until the delay is over.
 

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,255
Reaction score
611
First Language
English
Primarily Uses
So I suppose the easiest workaround is to simply add a wait event command equal to the move picture duration, after the script call. Thanks Shaz~
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
Back in the earlier pages of this topic, there was the Show Choices command equivalent and the branches equivalent. Unfortunately, I am having some troubles with the branch part.


 I am using the script calls with Fomar's Aeon Party script, and am using this in my summoning skill's common event script call:


This shows the choices, but whenever I select a choice, nothing happens and the battle continues on its merry way.


Does anyone know what I am doing wrong?
I will just say that you are not going to do very well with trying to create choice branching using script calls.


This is because you have no control over the event command's branch which is critical for correct branching functionality.


I have not looked into an actual working solution so I can't give you any useful info.
 
Last edited by a moderator:

Dragonduke

Villager
Member
Joined
Jun 23, 2012
Messages
22
Reaction score
1
First Language
English
Primarily Uses
If this topic is not closed, I would appreciate help with a script call to determine if an actor is in position one.

Idea:  You have a member of your party that you need to speak with an NPC.  You move them up to leader position.

Then when the member interacts with the NPC, the NPC can use a conditional branch to check if that party member

is in the party, then a second conditional branch to check if that person is the actual one talking to them.

This is the script call I need.  How to determine if player X that was in position 4, now moved to position 0 is really there

as far as the NPC would know.
 

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
826
Reaction score
346
Primarily Uses
$game_party.leader.id == n


where n is their position in the database.
 

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
14,709
Reaction score
14,547
First Language
Filipino
Primarily Uses
VNM
Can smeone consolidate all of these script call equivalents? I wanted to get the one for self_switches yesterday and it took me a while to find it.. it's in there somewhere and I know the answer to my question now (it's soooooo handy to be able to check and set self_switches on other events) but it would be handy to have all this information in a concise and consolidated format.
I will soonish after I get some stuff sorted out.

And thanks for all the help so far guys! You guys rock <3
 

Dragonduke

Villager
Member
Joined
Jun 23, 2012
Messages
22
Reaction score
1
First Language
English
Primarily Uses
Thanks Rachael.  I will give that a try immediately.  Again thanks so much.

Here is what I did.

@Conditional Branch: [Techie] is in the Party

    @Conditional Branch: Script: $game_party.leader.(5) == 5.  (the Techie was 5 in the database and 5th in the party)

        Text:

                Yes

        Else

                No

       Branch End

Error message I receive is Script'Game_Interpreter' line 450: NoMethodError occured.

undefined method 'call' for #<Game_Actor:0x8bafd1c>

This occurs whether or not the Techie has actually been placed as the party leader through the player menu system.

No idea what is wrong here.  Should I not have the (    ) around the 5 as in .(5)?

Duh, so stupid of me.  just put in the $game_party.leader.id as given and voila!  Again thanks to you and everyone in this forum for all they help everyone accomplish.
 
Last edited by a moderator:

C-C-C-Cashmere

Veteran
Veteran
Joined
May 18, 2012
Messages
585
Reaction score
281
First Language
English
Primarily Uses
Thanks Rachael.  I will give that a try immediately.  Again thanks so much.

Here is what I did.

@Conditional Branch: [Techie] is in the Party

    @Conditional Branch: Script: $game_party.leader.(5) == 5.  (the leader was 5 in the database and 5th in the party)

        Text:

                Yes

        Else

                No

       Branch End

Error message I receive is Script'Game_Interpreter' line 450: NoMethodError occured.

undefined method 'call' for #<Game_Actor:0x8bafd1c>

This occurs whether or not the Techie has actually been placed as the party leader through the player menu system.

No idea what is wrong here.  Should I not have the (    ) around the 5 as in .(5)?
I'm no expert, but I think you're supposed to go "$game_party.leader.id == 5" to check if actor 005 is the party leader. Correct me if I'm wrong.
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Person: "Taxes are bs and money is, too! Anarchy!!" *Literally anything goes wrong* Same Person: "Why hasn't the government fixed this???"
Stream will be live shortly with a session of Haunting Ground! Feel free to drop by!
As for the Coronavirus? Well: "People that spend their life avoiding death are already dead (they're also rich, and I like to spend my life with their money.)"
- R. Sanchez, "Edge of Tomorty: Rick, Die, Repeat"
making pierogi and corrupting my game files wbu

Forum statistics

Threads
94,345
Messages
920,111
Members
124,105
Latest member
acelaces
Top