Script Call Equivalent of Events

Your correct thatbennyguy. That is exactly what I had to do.  I have another question, perhaps you can help me on this one as well.

I would like to find a script call that would allow me to do a conditional branch that goes something like:

@Conditional Branch: [Techie] or [Thief is in the Party   Now I have to do two conditional branches to check for the existence of first one then the other.

This short cut would certainly allow me to do many things more concisely in my game.

Thanks for the heads up.
You could try something like this (in the script-part of a conditional branch)

$game_party.members.include?($game_actors[X]) or $game_party.members.include?($game_actors[Y])Replace X and Y with the corresponding ids of the actors you want to check. If you do this checking a lot, and maybe for a lot of members at the same time, writing a small method for $game_party might be a better solution, but the above will work.
You can shorten that (I think the conditional branch only allows you up to 100 characters):

Code:
$game_party.members.any? {|a| [X,Y].include?(a.id)}
says "is there any member in the party whose id is X or Y?" Obviously change X and Y to be the actor ids you're interested in.
Question... is there a script call to close the game?(close the entire application) I need this for an evented title.
SceneManager.exit
Thanks Shaz, my backup plan would've been to type something random in the script call to force an error. 😛
I've tried quite a few things, including the scripts to add an actor using a variable for the actor ID but i really can't get anything to work.

For example:

Variable 1 = 10

I want to add the actor with actor id 10.

Currently i used this: $game_party.add_actor[$game_variables[1]]

However the error from game_interpreter came up saying: "Wrong number of arguments (0 for 1)"

I'm no scripter but perhaps this is because the actor isn't initialized through this script call.

Thanks for the help 😛
You're using the wrong style brackets for the call. You want it to be


$game_party.add_actor($game_variables[1])
You're using the wrong style brackets for the call. You want it to be

$game_party.add_actor($game_variables[1])
hehe, i swear i tried it and i was about to write back that i did. But i doubled checked it now and it worked like a charm 😀 , very silly of me thank you 😛

EDIT: Well, that was completely successful, however i have a new problem yay.

I wanted to increase a variable by another variable. But wait theres more. I wanted the first variable id to be set by yet another variable. So...

For example:

I want variable2 to equal variable3. However, variable1= "2". It equals 2 because thats the variable ID i want selected to equal variable3. Confusing.

I had a go of what it should look like following script calls off here:

$game_variables[$game_variables[1]] == $game_variables[3].

Considering variable1 = "2", i want variable2 to equal the value of variable3. 

Does anyone understand where i'm coming from, because after rereading this i doubt people will. But if you do, help is very much appreciated.

Many thanks to anyone who can help me. 

EDIT again: It only wants the one "=" in there. I need coffee! I'll double check and double check again before asking for help, sorry for making the forum messy 😛

EDIT AGAIN: And it's because i don't want to spam but i'm afraid it might cause my plead to go unheard. I want to put an image on the screen but the image is of a variety. The image is chosen through variables in the image name. So let's say i want "card_$game_variables[1]". How would i go about writing a script call to achieve this?

 

screen.pictures[2].show("Card_[$game_variables[1]]", 

0, 10, 20, 100, 100, 

255, 0)

 

It just tries to find the picture name Card_[$game_variables[1]]. I also tried doing it without quotes and ending it with .PNG. Still no luck.

Can anyone help? Thanks 😛
You can shorten that (I think the conditional branch only allows you up to 100 characters):
More like 10000 lol although the editor doesn't do any word-wrapping


So it's probably better to just write the method in the script editor.
oh - you might be right there - I might be thinking of the script you can use in the Control Variables command.
That one is less than 40 characters, which is pretty bad.


I find the editor is very inconsistent when it comes to text fields...some of them are really small like event/actor names, others are just ridiculously large like noteboxes.
Ugh! Then maybe it's the damage formula? I'm SURE I counted SOMETHING out and it only allowed about 100 characters. Not that it matters much - it won't take someone long to figure out if they've reached the limit, wherever it was I was looking 😀
Thanks, this thread is very useful to me. Really glad someone took the time to make this list.
I have tried my to understand exactly how to use the script but i cannot obtain a clear vision or understanding on how to do this.  I want to change a character graphic to a damaged character graphic that is not the default.  i have seen that i must turn the direction and use scripting... i cant even begin to understand where the scripting goes other than maybe the "set move route".  How do i use the script to change the character graphic from one thing to another, period? Where do i put it? And, how is it written? 

I am sorry if this is in the wrong section... but this place is huge.
This is buggy, at best, when trying to do it through the default Move Route command.


Look for Galv's Move Route Extras script (and post any questions about it in a new thread 😉 )
thank you shaz ^.^
Can anybody post the script call equivalent of changing an events Priority? Below, Above and Same As Character.
Completely untested, but event.pages[id].priority_type = type where event is whatever code you happen to be using to get the event,


id is the page id you want to change, and type is 0: below characters, 1: same as characters, 2: above characters.


That's just at looking at the documentation for RPG::Event though, so I don't know if it works in practise.
Question: With the script call can I make a conditional branch with multiple If's. I know the conditonal branch that's built in is setup as follows:

If Something

Something

Else

Something

However, with this script:

if #something
#something
else
#something
end

would this allow me to add as many IF's as I would like? (With more if's in between the first if and the else)

For the record I know I can get the logical equivalents by adding more branches but I find this way easier to follow logically. Thanks for the help in advance.

Original thread: https://forums.rpgmakerweb.com/threads/script-call-equivalent-of-events.6248/