Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Party Slot Conditional branch

I was wondering if it is posible to detect witch slot that a party member is on whether through script or events.

Say if (NAME) is in slot two, do something else.
Maybe it is possible to identify each slot with a script tag and check if a condition is true?
Im not fluent with scripting at all, so it would be very helpful if I had some guidance.

The only event that camee close that I found was 'if (NAME) is in party' which is too vauge for what I need.
 
Trust me they are coming if this gets fixed.
My conditional branch is as follows:

Conditional Branch $game_party.name_chk("Colin", 1)
Text: Colin is your Ally

else:
text:You havent a party yet.

Conditional Branch $game_party.name_chk("Colin", 1)
Text: Mia is your Ally

else:
text:You havent a party yet

Conditional Branch $game_party.name_chk("Colin", 1)
text: Sonja is your Ally

else:
text: You havent a party yet
__

Now the XAS system has been modified since I first implemented it. I didnt entirely start this project from scratch. I had problems copying the system from the demo to my project so I merely started my project within the XAS demo. Everything that is XAS was already there. Except to have the Ally's AI work proporly the XAS_SYSTEM had to be redone.

So the person who did re-do the XAS_SYSTEM changed it up and in the read-me just said delete the old one and paste mine in.

If there is any problem with the XAS system it is here. for example when I tried pressing a menu shortcut button I recieved an error that it couldnt load a Sub_Item method..(least I think that was the name..w/e) Low and behold when I checked the original it wasn't called Sub_item, it was called menu_sub_item. So I went back to the script I had pasted in my game and changed the name to fit the original. Geuss what. It now worked. I found similar errors several times and fixed them all(hopefully) but god knows if there are are other errors in the system of XAS that are causing this. Im going to send you the original XAS script so you can compare the systems. That will be the best place to look.
 

Atoa

Member

if you do as I said, it would work fine, just add an else:
Code:
case $game_party.actors[1].name
when "Colin"
  $game_temp.message_text = "Colin is your Ally"
when "Mia"
  $game_temp.message_text = "Mia is your Ally"
when "Sonja"
  $game_temp.message_text = "Sonja is your Ally"
else
  $game_temp.message_text = "You havent a party yet"
end

In this example, I added the text as normal message.
I tested it in a event and it shown the rigth message.

Exacly when you want de message to be shown?

PS.:if i'm not wrong, XAS is a one player ABS. '-'
 
The message shown is just a test to see if it works. Ill try the method you described now, but the issue at hand is if I have errors that shouldnt be there
, theres a good chance that more errors are going to occur in the future, so if I can debug whats going wrong I can prevent future mishaps.

Although I might have to, I dont like the idea of just sweeping the failed code under a rug and pretending it didnt happen.

What I want to do with the code is when it is run it check s to see if slot two is occupied by one of the three actors( and not crash if there is no actor there).
Once the actor is identified switch the event that calls the code with a preplace event on the map that represents that actor, so it looks like the seccond person in
your party is helping you while your other party members just stay on the status screen.

And people have turned it into more than just a single player game. Ive played a demo that had 4 members fighting at once, I just did not want that.

Edit: Its working now... at least for now. But I have no idea what I did. I just progressed with other aspects of my project and after editing a few switches...I stopped getting errors.
This is really puzzling. I dont know what caused it, dont know what ended it.. but alls well that ends well?

..hmm if anything else arises i will refer back here
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top