Spawn Reference
FreshlyMinted
Member Posts: 14
Is there any way to reference a newly spawned actor like
change attribute : mostrecentlyspawned.size or something of that nature? Or do I have to pre-create them off screen and move them into position
change attribute : mostrecentlyspawned.size or something of that nature? Or do I have to pre-create them off screen and move them into position
Comments
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
So maybe try a game attribute called SpawnNewSize. that way you can get other actors already on your screen to change SpawnNewSize to, let's say, 1, 2 or 3.
then in the actor's rules that spawns, in one, change attribute SpawnNewSize to 1, in another change to 2, and yet another to 3, these changes in spawnNewSize made with a timer or triggered by collision, or another attribute being true...(difficult to say, not knowing anything about the gameplay).
Already in your Prototype actor's Rules, the one to be spawned, add the Rules
When SpawnNewsize is 1
change attribute self.Size.width to....(whatever you want)
change attribute self.Size.Height to...
When SpawnNewSize is 2
change attribute self.Size.width to....
change attribute self.Size.Height to...
(different height and width from the previous)
Then for when SpawnNewSize is 3
So you can automatically change it's size to be different whenever you want via another actor by changing SpawnNewSize.
Another idea is, instead of changing the height and width in one go, you could replace the Change attributes with Interpolate, changing the size over a few seconds perhaps.
Hope that helps and I haven't confused you with an unclear explanation.
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
In your Prototype actor to be spawned, put in the Rules
When SpawnNewSize is 1
then change width and height with change attributes. There you go.
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps