I'm trying to create a game in Google Slides and need to have a system where if the user is on a certain slide, a variable is changed. How is this possible?
I have already tried to use SlidesApp.getActivePresentation().getSlides() SlidesApp.getActivePresentation().getSelection().getCurrentPage();
var currentPresentationSlide = SlidesApp.getActivePresentation().getSlides()[3];
var currentPage = SlidesApp.getActivePresentation().getSelection().getCurrentPage();
var selection = SlidesApp.getActivePresentation().getSelection();
if (currentPage = currentPresentationSlide) {
var shape = currentPresentationSlide.insertShape(SlidesApp.ShapeType.TEXT_BOX, 100, 200, 300, 60);
var textRange = shape.getText();
textRange.setText('demo');
}
I want Slides to place the text box (demo) on the slide (in this case it slide 3) It doesn't even place the text box anywhere.