Forcing a party of four?

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

Post Reply
User avatar
Mewmew
Red Slime
Posts: 47
Joined: Thu May 05, 2011 5:19 am
Contact:

Forcing a party of four?

Post by Mewmew »

Hi everyone! Sorry again if this is a simple question. I was wondering if there's a way to force the player to pick 4 party members through the in game's "party order" menu?

If not, is there a simple copy/paste example that someone can kindly provide through hamster speak? I'm really bad when it comes to scripting, things beyond "walk hero to x" would fry my mind. Though I'm always open to learning... baby steps!

I basically don't want people forming parties of 3 or less... however I want to give them -some- freedom in choosing who to bring instead of throwing them a fixed locked party. XD

難しい~☆

Thank you for taking the time to read this message, and thank you in advance if you answer!
ImageImage Arien and Fran HD Sprites
User avatar
Mogri
Super Slime
Posts: 4598
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

You could keep throwing the player back to the party menu until he finally comes up with a party of 4. That's the easiest way.
User avatar
charbile
Metal Slime
Posts: 576
Joined: Tue Jun 21, 2011 6:18 am

Post by charbile »

following what Mogri said, call this in the text box conditions "always do this after":

Code: Select all

plotscript, choose_four_party, begin

variable (loop)
loop:= true

while (loop) do
(
team menu
wait(1)
if
(
hero by slot&#40;0&#41;<>-1
&& hero by slot&#40;1&#41;<>-1
&& hero by slot&#40;2&#41;<>-1
&& hero by slot&#40;3&#41;<>-1
&#41;
then &#40;loop&#58;=false&#41;
&#41;

end
and i'm not sure if you still need the wait(1)
User avatar
JSH357
Liquid Metal Slime
Posts: 1340
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

Post by JSH357 »

Further simplifying Charbile's script:

Code: Select all

plotscript, choose_four_party, begin

variable &#40;loop&#41;
loop&#58;= true

while &#40;loop&#41; do
&#40;
team menu
wait&#40;1&#41;
if
&#40;
roominactiveparty<>0
&#41;
then &#40;loop&#58;=false&#41;
&#41;

end 
My website, the home of Motrya:
http://www.jshgaming.com
User avatar
Mewmew
Red Slime
Posts: 47
Joined: Thu May 05, 2011 5:19 am
Contact:

Post by Mewmew »

Aaaah! Thank you so much for the response and for the script as well! Sorry for the trouble. I'll definitely use this script XD Thanks again! &#9829;
ImageImage Arien and Fran HD Sprites
TMC
Metal King Slime
Posts: 4101
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Further simplifying Charbile's script:

Code: Select all

plotscript, choose four party, begin
  team menu
  while &#40;room in active party&#41; do &#40;team menu&#41;
end 
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Complexifying TMC's simplification of OF JSH's simplification of Charbile's script:

Code: Select all

plotscript, choose four party, begin
  team menu
  while &#40;room in active party&#41; do &#40;
    show text box &#40;5&#41; #this box should explain that you need 4 party members
    wait for text box
    team menu
  &#41;
end 
Last edited by Bob the Hamster on Sat Jun 25, 2011 2:29 pm, edited 1 time in total.
User avatar
Mewmew
Red Slime
Posts: 47
Joined: Thu May 05, 2011 5:19 am
Contact:

Post by Mewmew »

Wow! Thanks for the revisions, TMC and James! I tried them all, but I think I'll use the one James provided. XD Just in case people hold onto the [esc] button during team party, which for some reason, causes an infinite loop and crashes the game. :o Thanks everyone!
ImageImage Arien and Fran HD Sprites
Post Reply