Question about sprite and object

0 favourites
  • 4 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • I know from when i was using live swif before constuct 2 was made. They had database system where you could copy and copy same image over n over but to allow those image to become sprite and interact you had to re name each one with a new number after the name such as Cat0 cat1 cat2 etc if you wanted them to work.

    So far with seeing construct two basically do that for you problem i have is what if i have two identical image sprite from the database but i want them to not do the same thing. I really dont want to have to create sprite image over n over in database.

    In other word an added plug-in that would say asked if multiple same image sprite on same layout do you want to combine their name as one so code work for all or do you want to have different instance name. so that code does not work for all only for the one.

    Unless if this is already in construct two please do tell me.

  • I'm not quite sure about what it is you want the sprite instances to do differently, but I'll take a crack!

    If you just want two or three identical sprites to behave differently, you can use their unique IDs to select them to tell them what to do.

    You can use instance variables in your sprite object, so you could check that to see what the object should "do". Like:

    If Cat.Sleeping, do nothing. If Cat.Meowing, meow; and so forth.

    That is just for boolean instance variables you create. You can make number variables and text variables as well, so you could theoretically make:

    Check out the man page here =) I'd Link it, but I'm a potential spammer, so they don't let me post links.. yet. mwahahah.

    scirra.com/manual/73/instance-variables

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • errr it doesn't really tell me too much, but you did lead me to which i now know what families are.

    Do you know or can you show me some example of how to do that. Like for instance Sprite A might be like the player and Sprite A'1 might be the enemy. Is there a way to split the one sprite into two different name instances.

  • Sorry, I misunderstood you.

    Have you tried cloning your sprite in the project window? If you right click your sprite, select clone, and then drag the cloned sprite into your layout, that should be what you're after.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)