Multi-Resolution Game Development With GameBuilder Studio Check it out!
NEW Version 0.9.7 has arrived! New Blazing Fast Particle Engine & More Game Actions. Check it out
Is there a component can spawn Entity by string?
  • Is there a component can spawn an  Entity by  string not select an entity?  

  • 3 Comments sorted by
  • @meishijiemeimei No, why would you need this? Can you explain your use case a bit more? maybe I can give you a work around
  • My english is not well.
    It was a Tower defense like game.
    On the map there are many blank block entitys,put data container components with string elements (tower names) in these block entitys.
    Click one of the blank block entitys, it shows 2-3 buttons , click one of the button ,the blank block will spawn a tower entity by use data container component strings .
    So if i want add another tower later , just add the element of data container.
  • @meishijiemeimei To get around this you could just use three Rules Components and have a condition to check a number or a selected string and have the three different spawn actions to spawn the three different types of entities. We will consider adding an expression property to the spawn action in the future. Here is an example

    RuleComp1 - If @Data.towerType = 1 -> SpawnEntity ("tower1")
    RuleComp2 - If @Data.towerType =2 -> SpawnEntity  ("tower2")
    etc...

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion