HeroEngine Forums

HeroEngine Support => Scripting & Programming => Topic started by: Kobaltic on Mar 21, 18, 12:11:58 PM

Title: Starting a game from a refernce world
Post by: Kobaltic on Mar 21, 18, 12:11:58 PM
I want to make a fps. I wanted to use the code from the FPS reference world as a starting point. I can't figure out how to get the code from the reference world into my own world. How would I do that? Thanks in advance.
Title: Re: Starting a game from a refernce world
Post by: FI-ScottZ on Mar 21, 18, 02:07:49 PM
No real trick to it. The main way would be to log into the FPS world with HeroBlade, open the scripts in the Script editor and then copy/paste.

An alternative method is to take advantage of what happens when you save edits to a script: after saving, a local copy of the saved version is stored in your local script cache:

(replace "HeroBladeHC022" with your world number and "Forever_Interactive" with your world name)

In there you'll find folders for client, server, and guixml where these local copies get stored. Once a script is submitted (or the changes abandoned) via Script Editor, these local copies are deleted.

So, what you can do is for any given script, make a trivial change like space,backspace then save. You'll find a copy of that script in the appropriate folder which you can copy or move to somewhere else.

But ultimately, to get it into your game you still need to copy/paste into a script you create in your world.

I haven't tried this last approach much, but the scripts are stored also in the repository under SystemGenerated/compiledScript. They don't have file names, only ID numbers, though you might be able to identify them by the "Last Modified" timestamp and possibly the version number. Also, those are COMPILED scripts, not human-readable, and I don't know if uploading one of those to another world would work or not.

Anyways, we don't get repository access for the reference worlds, but it could be useful if you are transferring among different worlds of your own.