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.

Squad Based Movement Help

Hello all,

I'm new to all of this and really don't know anything about scripting yet, but I'm getting there - I apologize in advance for scripting ignorance.

Anyway, I downloaded near's Squad Based Movement Script, and put it into my existing game. Everything worked great, until I got to one part of a map where an event transfers you to another map. When I transported, only my main character appeared on the new map - the one who had been following him was seemingly gone. When I switched to have the second character in the lead, I found that he was stuck in a wall up in the very top left square of the map. Oddly, some of my other transfer player events worked just fine, but I tried creating a bunch of new ones that went back and forth between various maps as a test, and none of them worked - every time my ally was sent to the top left corner of the map, and I couldn't recover him after that.

As someone who doesn't know much about scripts, what I'm wondering is if this has to do with the fact that I added the Squad Based Movement script after I'd already started my project and built my maps. In order for it to work does the script have to be in there from the beginning? I even went so far as to just replace the scripts.rxdata file from my game (since I hadn't customized any scripts) with the one from the Squad Based Movement demo - and it still didn't work.

Any help would be appreciated, thank you very much.
 
The problem is in the script and has nothing to do that you pastet the script later(that's never a reason!). I use it myself and I know about it!
It depends on the map size. If the map you're transfering to is bigger then the map you're transfering your characters from, they appear in the top left corner of the bigger map! the other way round it is no problem!
So the leader of the party is always send to the right position, but as I already said all the others are sent to the top left corner of the map!
A solution to this is available, but I myself did not understand how it has to be done...
I saw a solution on http://www.creationasylum.net/ but when I looked again I couldn't find it anymore... :'(
So sadly I don't know how to solve the problem......

Edit: I found it again!! But still I don't know how to put it in correctly.
http://www.creationasylum.net/index.php?showtopic=535&hl=

Code:
name.x = ($game_player.real_x - $game_map.display_x) / 4
name.y = ($game_player.real_y - $game_map.display_y) / 4

It's if you want to define a sprite like:
Code:
name = Sprite.new
name.bitmap = (a bitmap, like RMXP::Cache.picture(imagename) )
 

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