Sprite Instances of Instances

  • I'm not sure if this is possible.

    I have created a race car AI which has 2 main sprites with multiple instances of each sprite as sensors so the car knows when to turn.

    dataresearch.netii.net/AI

    This is working fine but I now want to create multiple cars to race.

    The problem I have is I want to create another copy of the car and all of the sensor instances without having to create brand new sprites.

    Each Instance has a different instance variable set so the car know how much to turn if that sensor hits a wall.

    I have tried to create a container for this but that creates a new car for every instance of the sensor sprites so I end up with 6 cars driving uncontrollably.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'd do it with a container. Just don't create (in editor or in game) any sensor instances, as they will be created automagically.

    Just pin the sensors to a car at 'on created' event and you should be good to go.

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