Hi! Easy problem... how I can restart a script by a function, for example when player use a command .start I send a gump by decl. a var := SendGump...then player hit X button, X button have function to target something and then when player make a valid target I want to send this gump with full functianolity one more time.
Is this right that I must use a loop? For example while?
I"m really sorry for my bad English.
How to restart script? Gump loop?
Moderator: POL Developer
Re: How to restart script? Gump loop?
I think, the gump have to be in separate function, and you can repeat it with all checks after "X button".
Re: How to restart script? Gump loop?
It's good idea, it will be good for optimalization? Thank you
Re: How to restart script? Gump loop?
create a function to mount your Gump with the entries that you think necessary.
this function must return a Struct, with the items needed to be called a SendDialogGump.
hints a data structure with layout(array) and textlines(array).
if you have some Fixed Gump, you can create this structure in a variable, and use it in infinite loops.
but when you have to change the values that the gump shows, you have to replace some items in your arrays, so you better mount a new gump by calling its function that rides the screen again.
this function must return a Struct, with the items needed to be called a SendDialogGump.
hints a data structure with layout(array) and textlines(array).
if you have some Fixed Gump, you can create this structure in a variable, and use it in infinite loops.
but when you have to change the values that the gump shows, you have to replace some items in your arrays, so you better mount a new gump by calling its function that rides the screen again.