Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

HTML5 Level Load, Variables in JS


I'm trying to handle multiple levels in my project for HTML5. Our export has been trimmed as much as possible of all unused content, reduced textures and lightmaps to accomodate the size restrictions, etc. We have two levels in our project, with an elevator that connects them. The plan was to have both levels connected by an elevator, with the player starting on the first floor at an external entrance to the building (so coming back down the elevator would spawn you in a different part of the level).

First, I looked up how to get the separate spawns working in Blueprints (though I am a programmer, I'm new to UE and don't want to add on code for a project that doesn't have any right now, expecially because of HTML5 exporting. I've learned quickly to stick with what works and not to fool around with it too much unless you want to start from scratch). I followed examples such as this one, but was unable to make any cast to objects such as MyCharacter or MyHUD (the project was based on the First Person Shooter example), be it in my project or others. I've read that this is a problem in 4.5, and even after fiddling with experimental menus and reinstalling/recompiling engines, I gave it up as a lost cause.

So instead I tried just a simple Open Level command on a box trigger. This worked well, except that the program crashes after making several trips through the elevator due to constantly expanding memory arrays going past the 32 bit limit. Seems there's some sort of memory leak, and I'm not sure where it could be since, aside from the level loads, all that's been added to the Shooter example were assets/maps. So I'm either missing a step in the open level process that requires you to clean up something or there's something else going on.

Finally, we thought we might try just splitting the levels off into separate pages. However, in this case we'd still want the user to be able to enter the elevator and either have the page load the next level, or at least alert the user to click a link to go to the next page, so we'd need some cross communication: a variable to track, or have it call a javascript function, something. The only mention of this I found was in this question but it's not very clear. I read the linked page, but it seems to require knowing function names (assuming they are made available by UE in the first place), which from what I've read is not something that's accessible with Blueprints (at least, I've been told that you can convert Blueprints to straight C/C++, which would be essentially what I would need).

So, tl;dr: Having problems with loading levels. Open Level itself has memory issues, I can't do casting to change spawns like I want, and I don't know how to/if it's possible to access a Blueprint variable from the page's JS. The only other alternative I see is splitting the pages up and forcing users to manually cycle through levels when they're done, which is a poor user experience. Any insight on at least the memory issue? Solving that is likely easier that the JS one, unless it's a UE4.5 issue that I can't solve. Cannot upgrade beyond 4.5 because we can't export in 4.6 and don't have the time to convert the project anyway. I'd be extremely happy to know it's just some little cleanup operation that I have to do manually that was forgotten. Thanks for the help.

Product Version: Not Selected
more ▼

asked Jan 22 '15 at 03:44 PM in Packaging & Deployment

avatar image

31 2 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hi terryrgrs,

Are you still seeing this issue? Please feel free to upgrade to the newest version of the editor, but it is recommended that you do so by creating a copy, rather than converting the project.

more ▼

answered Apr 17 '15 at 07:48 PM

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question