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.

W00T I DID IT MYSELF :)

poccil

Sponsor

Just a sketch of how it could work:

Code:
class Game_System
 attr_writer :houseCreatures
 def houseCreatures
   return @houseCreatures ? @houseCreatures : []
 end 
end

def pbDepositToHouse(partyIndex)
   # Unknown what mechanism you use for storing creatures in party
   if $party.length<6
     creature=$party[partyIndex]
     $party.delete_at(index)
     # Unknown what mechanism you use for storing creatures in party
     $game_system.house_creatures.push(index)
  end
end
def pbWithdrawFromHouse(index)
   if $party.length<6
     creature=$game_system.houseCreatures(index)
     $game_system.houseCreatures.delete_at(index)
     # Unknown what mechanism you use for storing creatures in party
     $party.push(index)
  end
end

I don't know what mechanism you use for storing creatures in a party.  If you are using my Pokemon Essentials project, I can tell you better how it may work.
 
poccil":2r7i8gkr said:
Just a sketch of how it could work:

Code:
class Game_System
 attr_writer :houseCreatures
 def houseCreatures
   return @houseCreatures ? @houseCreatures : []
 end 
end

def pbDepositToHouse(partyIndex)
   # Unknown what mechanism you use for storing creatures in party
   if $party.length<6
     creature=$party[partyIndex]
     $party.delete_at(index)
     # Unknown what mechanism you use for storing creatures in party
     $game_system.house_creatures.push(index)
  end
end
def pbWithdrawFromHouse(index)
   if $party.length<6
     creature=$game_system.houseCreatures(index)
     $game_system.houseCreatures.delete_at(index)
     # Unknown what mechanism you use for storing creatures in party
     $party.push(index)
  end
end

I don't know what mechanism you use for storing creatures in a party.  If you are using my Pokemon Essentials project, I can tell you better how it may work.
Thanks Poccil.  I'll try it out but I'm not the most knowledgable on scripts.  Actually, I know next to nothing about them, so how would I go about getting it to work?

Also, I noticed in the script it says if "$party.length<6", I assume this means that you can have 6 creatures in the party?  Well I need it so you can have 3 creatures plus you, but you cannot be taken out of the party. If I set it to 4, would that do change it?
 

poccil

Sponsor

Oops, a mistake on my part.  It should have read:

def pbDepositToHouse(partyIndex)
  if $game_system.houseCreatures.length<50
    creature=$party[partyIndex]
    $party.delete_at(index)
    # Unknown what mechanism you use for storing creatures in party
    $game_system.houseCreatures.push(index)
  end
end
 
poccil":1uevlywq said:
Oops, a mistake on my part.  It should have read:

def pbDepositToHouse(partyIndex)
   if $game_system.houseCreatures.length<50
     creature=$party[partyIndex]
     $party.delete_at(index)
     # Unknown what mechanism you use for storing creatures in party
     $game_system.houseCreatures.push(index)
  end
end
I appreciate the help, but I don't really understand how it works.

Thanks Poccil ^_^
 
I was just going to say, this post wasn't in the scripts section, so it probably means that he wants to do it using events.  But if you've got him all helped out, then I hope that script works.  I was also thinking about something like this.  But I've only got 6 main characters to deal with and none of them are creatures, so mine isn't that complicated. 

I just used a switch after each character joined the party.  Mostly because that triggers other events also, but you could easily use a "character1party" variable of some sort.  But with 50 different variables, that'll get VERY confusing.  So yeah... a script seems easier. lol  Good luck!
 
Mikee":3g2hr4j2 said:
I was just going to say, this post wasn't in the scripts section, so it probably means that he wants to do it using events.  But if you've got him all helped out, then I hope that script works.  I was also thinking about something like this.  But I've only got 6 main characters to deal with and none of them are creatures, so mine isn't that complicated. 

I just used a switch after each character joined the party.  Mostly because that triggers other events also, but you could easily use a "character1party" variable of some sort.  But with 50 different variables, that'll get VERY confusing.  So yeah... a script seems easier. lol  Good luck!
That's what I tried, but I need it got really complicated and hard.

I still can't figure out how to use the script :(
 

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