Spawning an actor to a specified position and changing his size...
ryast
Member Posts: 145
GS noobie here
1 - I want to spawn an actor to X,Y position (done)
2 - and I want to resize that actor to 50 by 50 pixels (not done)
how do I do the second part? Or would you recommend I just make smaller duplicate images and create new actors to get the same effect.
My only reasons for not making smaller actors is that it is going to clutter up my images panel + actors panel with a whole lot more images, I really wish GS had a "folders" functionality
going to increase my game size
possibly increase my performance footprint
Suggestions?
Comments
change attribute "self.size.width" to "50" and another one for the height.
In the actor's attributes (the actor that is being spawned) change the height and the width to 50.
Hell yeah, I'd pay money for folders, I really would, people have been asking for folders in GameSalad forever.
I am already using those actors in other places (in their normal size), so if I change self.size.width and height for the prototype, wont it effect it everywhere?
@socks, I'm new here but catching on fast
Yes, you would need to wrap those size changes in a rule so the size only change when you would want it to (otherwise normal size)
Thanks!
I think I can figure out which rule/s to use to do what you wrote, but if you have any suggestions please let me know (I'm new to GS and still figuring things out)
Make a duplicate actor with the new size, and spawn this actor instead.
No, changing the prototype size won't affect the size of the instances of the actors that are already on the scene. It would mean that any new instances you drag onto the scene would have the new size.
The prototype size determines the size of spawned actors.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Perfect, thanks guys!