Conditional Branch through a move route.

Zion774

Veteran
Veteran
Joined
Jul 24, 2015
Messages
40
Reaction score
1
First Language
English
Primarily Uses
So, I'm using a script that calls abilities from another map, and plays out their move route.
(XAS Ace is the script name)
https://atelierrgss.wordpress.com/rgss3-xiderowg-action-system-xas/

^There's a link to it

Now what I would want is a way to have a move route only be done IF a certain item is equipped.

Like: "If Shortsword is equipped, then do move route"

I'm sure there is an easy way to do it with a script function in the move route but I don't exactly know what it is.

That's all. If anybody knows how to do a conditional branch in a move route I'd be grateful. Thanks! :D
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
[move]RGSSx Script Support[/move]
What do you mean, you call "abilities" from another map. Maps don't have abilities, actors do. Abilities don't have move routes, actors or NPCs do.

I think you're looking at this the wrong way round. You do the move route if the item is equipped, not check in the move route itself. You say "item equipped", I assume that this means an accessory, or something, otherwise you would have said 'weapon' or 'armor'. However, the structure remains the same, whatever you meant.

Conditional branch
Check to see if the whatever is equipped.
Yes, do the move route
No, do whatever you have as the alternative.

You will need to know the script call that you put in the conditional. This will require exact information from you. For example, if it is that any actor has the item equipped, and that item is e.g. an armour, then the script call would be
$game_party.battle_members.any? {|actor| actor.armors.include?($data_armors[96]) }

That [96] is the armour ID, and you would change it to whatever the ID is of the armour that you want identified.

However, you might want it to be only one actor, or a specific NPC, and it might be a weapon, or an accessory.

Please provide as much detail as you can so as to be able to work out the precise script call you need. At the moment, I don't think the script call itself is shaped by the linked script at all.
 

Zion774

Veteran
Veteran
Joined
Jul 24, 2015
Messages
40
Reaction score
1
First Language
English
Primarily Uses
[move]RGSSx Script Support[/move]
What do you mean, you call "abilities" from another map. Maps don't have abilities, actors do. Abilities don't have move routes, actors or NPCs do.

I think you're looking at this the wrong way round. You do the move route if the item is equipped, not check in the move route itself. You say "item equipped", I assume that this means an accessory, or something, otherwise you would have said 'weapon' or 'armor'. However, the structure remains the same, whatever you meant.

Conditional branch
Check to see if the whatever is equipped.
Yes, do the move route
No, do whatever you have as the alternative.

You will need to know the script call that you put in the conditional. This will require exact information from you. For example, if it is that any actor has the item equipped, and that item is e.g. an armour, then the script call would be
$game_party.battle_members.any? {|actor| actor.armors.include?($data_armors[96]) }

That [96] is the armour ID, and you would change it to whatever the ID is of the armour that you want identified.

However, you might want it to be only one actor, or a specific NPC, and it might be a weapon, or an accessory.

Please provide as much detail as you can so as to be able to work out the precise script call you need. At the moment, I don't think the script call itself is shaped by the linked script at all.
It's hard to explain without showing you the entire map/script! But what you told me gave me my answer!! Thanks :D
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,456
Members
137,821
Latest member
Capterson
Top