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: 12
Joined: Mon Oct 15, 2018 5:36 am
Location: Poland
Contact:

How to restart script? Gump loop?

Post by Ciechu » Sat Nov 03, 2018 3:38 am

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.
"Live Fast, Die Fast"
- GG Allin

Harley
Forum Regular
Posts: 313
Joined: Sat Mar 18, 2006 1:41 am
Location: Germany

Re: How to restart script? Gump loop?

Post by Harley » Sat Nov 03, 2018 1:54 pm

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: 12
Joined: Mon Oct 15, 2018 5:36 am
Location: Poland
Contact:

Re: How to restart script? Gump loop?

Post by Ciechu » Sat Nov 03, 2018 11:33 pm

It's good idea, it will be good for optimalization? Thank you ;)
"Live Fast, Die Fast"
- GG Allin

guialtran
Grandmaster Poster
Posts: 108
Joined: Wed Jul 30, 2008 12:42 pm

Re: How to restart script? Gump loop?

Post by guialtran » Sun Nov 04, 2018 7:53 pm

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.
@CronosKing
Image ZuluHotel Forgotten Realms
www.zuluhotel.com.br

Post Reply