Spawn Actor – it's illogical, Captain...
gyroscope
I am here.Member, Sous Chef, PRO Posts: 6,598
Hi, I'm doing a simple test to try out Spawn Actor Behaviour. And it doesn't do what I expected it to do:
Two actors, called Button and Actortospawn, both on a level, one above the other. In Button, I have a Rule: when touch is released, Spawn Actor Actortospawn, position a bit away from Actortospawn. In Actortospawn, the Rule is when touch is released, change its colour.
When I click off of Button, not only does it spawn ActorTo Spawn, but runs Actortospawn's Rule to change its colour.
Also, when I click off of Actortospawn, it changes colour as expected, but then spawns a copy of itself, even though the Spawn Actor Behaviour "belongs" to Button.
Finally, whichever way it's spawned, it spawns it in it's original state, i.e white. This is expected. But, I thought a Spawned Actor would be identical to the original, like a clone, including any rules; but clicking on the spawned actor, it doesn't change colour like its parent. I can't really see the point of Spawn Actor at all, if it hasn't got the parent's Rules...
Any light shed on this appreciated, thanks!
---------------------------------------------------------------
Spiral Gyro Games
Two actors, called Button and Actortospawn, both on a level, one above the other. In Button, I have a Rule: when touch is released, Spawn Actor Actortospawn, position a bit away from Actortospawn. In Actortospawn, the Rule is when touch is released, change its colour.
When I click off of Button, not only does it spawn ActorTo Spawn, but runs Actortospawn's Rule to change its colour.
Also, when I click off of Actortospawn, it changes colour as expected, but then spawns a copy of itself, even though the Spawn Actor Behaviour "belongs" to Button.
Finally, whichever way it's spawned, it spawns it in it's original state, i.e white. This is expected. But, I thought a Spawned Actor would be identical to the original, like a clone, including any rules; but clicking on the spawned actor, it doesn't change colour like its parent. I can't really see the point of Spawn Actor at all, if it hasn't got the parent's Rules...
Any light shed on this appreciated, thanks!
---------------------------------------------------------------
Spiral Gyro Games
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Comments
The way I see it now:
All Actors shown in the Scene Editor Inspector are Prototypes. I've (only just) discovered that I can double click on one of these, and put Rules into it, just like the ones on screen. When I drag one across to place it on the screen, what's there is an Instance of the Prototype. If I add, delete or amend the Rules in the Prototype, all Instances are immediately updated to be the same. However, if I double click on one of the Instances, it takes me to the Instance's Actor Editor page. (Despite this being an Instance, it still says, over to the left, Edit Prototype, not Edit Instance, as I would have thought it should, though). By clicking Edit Prototype (which I'm thinking should be Edit Instance), this is exactly the same as clicking the lock on the right hand side, to "edit the behaviour of this actor". If I delete, amend or add something to this particular Actor Instance, it will be a change only in that one Instance; all other Instances on screen will still have the same Rules of the Prototype.
So, if I click on an unchanged Instance of one actor in Preview, with it's inherited Rules from its Prototype, including asking it to Spawn Actor2, this new spawned actor will have its Rules based on those of its Prototype, being the one in the Inspector.
I think it's correct the way I understand it now; thank you for giving me the opportunity to work it through.
:-)
---------------------------------------------------------------
Spiral Gyro Games
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
There is one button "Revert to Prototype" that you will see in an actor instance above where you add the behaviors. By pressing that button, you will lose any changes made to the actor instance (behaviors list only) but that actor will now have all the behaviors set in the prototype.
There is another "Revert to Prototype" button underneath the attributes of an actor instance. You can use that button to revert individual attributes back to the prototype's value by selecting an attribute then pressing the button.
I made a suggestion in the Suggestions Forum section yesterday, that Edit Prototype button be called Edit Instance, but understand now that the Edit Prototype button is just that, but to edit an Instance, is by clicking the padlock.
A thought here: when an Instance is double clicked, and the Actor Editor page with it's particular Attributes and locked inherited Rules for that particular Instance is brought up, I'm thinking that 99% of the time, that's exactly what is needed, i.e editing an Instance Rules + Attributes; and perhaps only 1% of the time would editing of the Prototype be needed via this Actor Instance Page. So I'd think that the majority of the time, GS users would click on a Prototype in the Inspector to edit it in its own Prototype Actor Editor page?
Then I'm thinking that the Edit Prototype button should have less prominence on the Edit Instance Editor window, and maybe sit next to the small Revert to Prototype button? (Thanks for pointing that smaller button out; I never noticed it before!) And that, for clarity's sake, there's another button, either next to the larger Revert to Prototype button at the top, or in the middle of the padlock graphic, named Edit Instance?
I don't know what you and the other guys at Gendai would think about these suggestions; I would add that, as a relatively new user of GS, the large Edit Prototype button when clicked, seeming to unlocking the Edit Instance button, exactly the same as if the padlock was clicked, totally confused me...
---------------------------------------------------------------
Spiral Gyro Games
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps