How to restart script? Gump loop?

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.

Moderator: POL Developer

Post Reply
User avatar
Ciechu
New User
Posts: 29
Joined: Mon Oct 15, 2018 5:36 am
Location: Poland

How to restart script? Gump loop?

Post by Ciechu »

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.
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am
Location: Germany

Re: How to restart script? Gump loop?

Post by Harley »

I think, the gump have to be in separate function, and you can repeat it with all checks after "X button".
User avatar
Ciechu
New User
Posts: 29
Joined: Mon Oct 15, 2018 5:36 am
Location: Poland

Re: How to restart script? Gump loop?

Post by Ciechu »

It's good idea, it will be good for optimalization? Thank you ;)
guialtran
Grandmaster Poster
Posts: 120
Joined: Wed Jul 30, 2008 12:42 pm

Re: How to restart script? Gump loop?

Post by guialtran »

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.
Post Reply