Spawning an actor to a specified position and changing his size...

ryastryast Member Posts: 145
edited December 2014 in Working with GS (Mac)

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

  • JSprojectJSproject Member Posts: 730

    change attribute "self.size.width" to "50" and another one for the height.

  • SocksSocks London, UK.Member Posts: 12,822

    @ryast said:
    2 - and I want to resize that actor to 50 by 50 pixels (not done)

    In the actor's attributes (the actor that is being spawned) change the height and the width to 50.

    @ryast said:
    I really wish GS had a "folders" functionality :(

    Hell yeah, I'd pay money for folders, I really would, people have been asking for folders in GameSalad forever.

  • ryastryast Member Posts: 145

    @JSproject said:
    change attribute "self.size.width" to "50" and another one for the height.

    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 :p

  • JSprojectJSproject Member Posts: 730

    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)

  • ryastryast Member Posts: 145

    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)

  • SocksSocks London, UK.Member Posts: 12,822

    @ryast said:
    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?

    Make a duplicate actor with the new size, and spawn this actor instead.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    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

  • ryastryast Member Posts: 145

    Perfect, thanks guys!

Sign In or Register to comment.