Created
July 9, 2020 05:22
-
-
Save collinticer/87a7b69a06b3c6ca1bbe08a048df8f74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var instance = argument0;//instance should be a "standard_obj" with the objectProperties attribute | |
var textToAdd = argument1;//the text the new "new_dialog" obj should init | |
var typeOfDialog = argument2;//dialog type of click or delay. default to click | |
var delayTiming = argument3;//delay time in seconds if typeOfDialog is delay. default is 3 seconds | |
with( instance ) | |
{ | |
var tmpDialog = new_dialog(); | |
ds_map_set( tmpDialog, "text", textToAdd ); | |
ds_map_set( tmpDialog, "type", typeOfDialog ); | |
ds_map_set( tmpDialog, "delay", delayTiming ); | |
var tmpObjProps = instance.objectProperties; | |
var dialogsList = tmpObjProps[? "dialogs"]; | |
ds_list_add( dialogsList, tmpDialog ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment