x

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"

Editor: convert actor to blueprint (prefab) saving custom properties

Summary: I want to use procedural map generation based on semi-complete tiles. Think of a tile like a room/floor or something. The game is going to use a grid based movement system. Therefor the level designer need tools to mark which sections of the grid are accessible and which parts are not (something like a brush to easy mark grid sections as valid/not valid). There is some more work to do like placing objects, lights and waypoints and so on.

Now i'm able to show you what i want to achieve via screenshots. I've implemented some automatic collision mechanics to determine which grid tiles are "valid" and "invalid" in editor mode (screenshot 1: valid - green, invalid - red). This is something that has only to be done once the hole grid + assets are created (by the level designer) so i want to save the pre-computed and manually edited results (grid data stored in a TArray) inside a blueprint.

Workflow:

  1. Create "Room"-Actor (creates default grid data)

  2. Add meshes and other items as scene components to the actor.

  3. Automatically AND (later on) manually edit grid data (mark valid and invalid grid tiles)

  4. Create a Blueprint from Actor (to save the final room ready to use ingame)

As you can see on screenshot 2 the grid data is not saved as new "default" data for the TArray (if so it would not get a reset cause i did a check in code if the array is empty before filling it up with default valid flags). How can i achieve that respect the workflow above (or if it is not possible how to achieve it anyway)?

The grid data is defined as a TArray in an USTRUCT that is defined as member in the custom Room-Actor (the owner).

 USTRUCT()
 struct AESTUS_API FRoomTiles
 {
     GENERATED_USTRUCT_BODY()
 [...]
     UPROPERTY(EditAnywhere, BlueprintReadWrite)
     TArray<uint8> Tiles;
 [...]
 };


 UCLASS()
 class AESTUS_API ARoom : public AActor
 {
     GENERATED_BODY()
 [...]
     UPROPERTY(EditAnywhere, BlueprintReadWrite)
     FRoomTiles Tiles;
 [...]
 };

Screenshot 1 alt text

Screenshot 2 alt text

Product Version: Not Selected
Tags:
42421-screen1.jpg (175.5 kB)
42422-screen2.jpg (146.3 kB)
more ▼

asked May 13 '15 at 06:58 AM in C++ Programming

avatar image

Quis
40 5 8 13

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

0 answers: sort voted first
Be the first one to answer this question
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