Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Search the Community

Showing results for tags 'FAQ'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Administration
    • Announcements
  • General
    • Sonic & SEGA Discussion
    • Video Game Discussion
    • General Discussion
    • Artists' Showcase
  • Game Development
    • Game Project Showcase
    • Game Project Assistance
    • Development Forums
    • Game Creation Research & Discussion

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Location


Interests


Fan Gaming Specialty


Current Project

Found 1 result

  1. So, from a few private requests on how to do certain things, I decided it would be a good idea to create a thread with various tutorials and answers. Questions: Q: Where does all of the initialization code go, such as setting key inputs, fonts and such? A: Game Start event of objGlobal. objGlobal is the only object that is persistent through the entire game. Q: How do I add/remove levels from the level list, or edit level names? A: This is done with the initialization in the Game Start event. Look for: global.LevelList, global.LevelNames, global.LevelActs, LvlMusic, and LvlAnimals. Level Name is the name of each level, Level acts is what act the level is, LvlMusic is the music to use, and lvl animals, is the id of animals to use(Just set to 0 if unsure). Tutorial 1 - Parallax: The parallax system is quite easy, for each sprite in the parallax you'd use scrParallaxAddBG to add a sprite. Parallax sprites are added in the Game Start event of objGlobal. The arguments are: scrParallaxAddBG(sprite_index, layers, layer_speed, speed, id) sprite_index obviously means the sprite it uses. layers is the amount of parallax layers(If you don't want layers, just set it to 1). layer_speed is the difference in movement between the layers. The higher the layer speed the more the layers spread apart when moving. Set this between 0 to 1. speed means the difference in speed between the entire parallax and the camera. If it's set to 1 it will follow the camera perfectly, if it's set to 0.5, it will move at half the speed. id is a individual id that you give each parallax sprite. Make sure no parallax sprite has the same id. An example: scrParallaxAddBG(sprEHZParallax1, 1, 0, 0.95, 0); To draw parallax use scrDrawParallax(id, y, image_index) id is the id you gave the sprite when creating the parallax. y is the y position subtracted by the view y. So if you want it on the top of the screen set it 0, if you want it 128 pixels below the top of the screen set it to 128. image_index is the current frame of the sprite. Now just create an object, add the draw parallax scripts in the draw event, and place it in the room. I will be adding more tutorials and answers with time, if you have a quick question or request a tutorial ask here, unless it requires it's own topic.
×
×
  • Create New...