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.

Why doesn't this script work?

if $game_party.actors == 4
  $game_player.move_up
end

It was supposed to make the player move up if there were 4 players in the party. It has a syntax error. Help?
Also, how would I make it display text when it pushes me forward? In case your wondering what this is for, I'm making a monster collecting game. When you try to enter the ranch (moving down into it) with 4 actors already, it kicks you out and you have to go deposit some.
 
Assuming you are already using that in an event command, you can change the commands to:

Code:
@>Conditional Branch: Script: $game_party.actors.size == 4
   @>Script: $game_player.move_up
   @>Text: Whatever you want to say here
   @>
 :  Branch End
@>

If it's in a script in the script editor, just add...

Code:
if $game_party.actors == 4
  $game_player.move_up
  $game_temp.message_text = "Whatever you want to say here"
end
 

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