Announcement

Collapse
No announcement yet.

2D Game + Sprite + texture dynamics

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    2D Game + Sprite + texture dynamics

    Hello everybody,
    Sorry for my English, I am French ^^

    I'm new in C++ Unreal and I want to create a dynamic Sprite (Wall).
    I create a grid (Tmap) with FVector2D and one other class but I don't know how use classes. I want a 2D sprite class with multi-texturing and for this to change depending on certain conditions (ex : if I place a wall and another next to it I want this wall to change texture to adapt to the situation) but I don't know how do that. I create a new class (actor) to make a child and I set this class to my TMap, I want a link between my wall and the grid to create a function to check the number of connections with objects of the same class.

    Place a Wall
    Call setup display (To Wall bp)
    Ask grid for number of connections with objects of same class and return a number
    Set texture using the number

    And if it is possible I want just 1 texture, i just multiply the return number by the scale of the texture and it moves the UV etc

    Here are my textures :
    Click image for larger version

Name:	WallTilesMap.png
Views:	60
Size:	585 Bytes
ID:	1646692

    Ask me a question if you need more precision/clarification

    Thank you for reading
    Attached Files
Working...
X