How do I ... ( complicated for me to explain )

0 favourites
  • 3 posts
  • Hello all,

    Needed some help - ( amateur level)

    Im trying to make it so when I click a Sprite ( using as a custom button ) the prog should read the sprites name and play the associated video file ( with the same name )

    I did this with mouse-> on click-> Object (name of sprite)-> set vdo source xyz.mp4

    With this it played just fine, but there are over 700 videos

    I can either do the same for each video/ button or ( and what I am trying todo ) is have the system check the name of the button and play corresponding video with the same name ( regardless of how many buttons/sprites or videos there are, if a sprite is clicked it should look for a video to play with the same name)

    How can I group them together, and how what would I write to make that search/comparison run then trigger the video ?

    Thanks

  • Don't use the sprite name, as you'll have to create 700 sprite objects.

    Add an instance variable VideoName to the button sprite, and play video with name = Button.VideoName

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks, will give it a try

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