Hi, I’m new with BPs and I’m struggling to implement what I want to achieve. Figured best to start again! I want to create a simple tool for viewing a masterplanning model of a university campus. It’ll basically be an interactive visual database - each of the simple building forms will have various ratings under categories like Age, Capacity, Fire Rating, etc. I want for the user to be able to press a key or click a UI icon and view the model in ‘Age’ mode, or ‘Capacity’ mode or whatever, with the app then colouring the model based on the current mode and the buildings’ various values. I’d also like to be able to click on individual blocks and bring up extra info.
How best to set this up with Blueprints? I’ve had some success turning individual building StaticMeshActors into Actor BPs and adding some functionality that way (with building ratings stored in both Actor and Component tags), and with the ‘OnKeyPress’ code sitting in the Level Blueprint. But I don’t want to remake the material change script in every single mesh, as that’ll be massively time consuming.
My thoughts were:
- Set up two global variables (or equivalent): CurrentMode (string), and ModeChanged (boolean)
- Set up all meshes to turn into individual Actor BP subclass which contains some sort of Function like ‘if mode changed, change mesh colour’
- Set up code in the Level BP to record the current ‘mode’ on KeyPress / UI Click, and flag up that the mode has changed.
- I guess the function within the individual building elements would then need to trigger every Tick to check if the mode has changed?
Is this the best way to do it? I’ll only have one ‘level’ so don’t object to heavy use of the Level BP. Another approach could be to pull all building meshes into one BP - would that be better, as there’d be less code passing between BPs? And where would I put the ‘OnClick’ function for the individual building data?
The aim is to structure this in a way that we could bring in different models of different universities yet keep the code pretty consistent, so separating the script and the meshes initially would be great.
Any advice appreciated! Thanks.