Author Topic: Flow Conrol Event and Event Attributes  (Read 624 times)

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9809
Flow Conrol Event and Event Attributes
« on: July 08, 2016, 01:46:57 PM »
Is there any documentation for this event?
Is there any documentation for the Event Attributes feature?

I know. I'm the guy that writes the stuff. But, I can't write anything if I don't know how they work. ;)

I saw this thread for the Flow Control Event, but the thread author doesn't talk about it, we only really have Paul's post telling us it exists and to download the Data forlder for Milos' design.
http://ua.reonis.com/index.php?topic=2881.msg45250#msg45250

And I found this from the same thread - me saying how easy it looked....but my mini-mod has a couple of things in it and only one of them works. Don't know if it's broken or not implemented or me doing it wrong.
http://ua.reonis.com/index.php?topic=2881.msg45174#msg45174

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9809
Re: Flow Conrol Event and Event Attributes
« Reply #1 on: July 12, 2016, 02:19:54 PM »
Well, I am under the impression until somebody tells me how to use this event that it does not work likely due to not being implemented or more likely due to my not being able to figure out what is going on.

In my test, I have created a chain of events. Images 1 and 2 show the chain and what I have selected for the Flow Control. What is wrong with this? I have looked at the example in Milos' Towers of Magic. I don't want a l oop, so I left the looping bit out.

Also, not in this example, but I can't imagine what I would use "Call Marker", "Return" or "Pop Return Stack" to do.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9809
Re: Flow Conrol Event and Event Attributes
« Reply #2 on: July 12, 2016, 02:50:15 PM »
I can't find any references to using Event Attributes. I recall that it was used in conjunction with chainging the name of a menu button for an event. I found some info on Hooks for this, but don't know if the hooks get called by an Event Attribute or if they are even related.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2170
    • Nol Drek's Web Site
Re: Flow Conrol Event and Event Attributes
« Reply #3 on: July 12, 2016, 06:11:20 PM »
Also, not in this example, but I can't imagine what I would use "Call Marker", "Return" or "Pop Return Stack" to do.

I have no idea how Flow Control events work. But that won't prevent me from taking a guess.

You can use a chain of events to define a function with a Marker at the beginning and a Marker at the end of the function. To call the function, use a Flow Control event and call the marker which defines the beginning of the function. At the end of the function is a marker with Return selected to transfer control back to where the function was called from.

If a function is called from within a function, recursively for example, there might be more than one function which is currently on the stack. Pop Return Stack might terminate all of the functions that are currently on the stack, effectively forcing each of them to return control back to the point in the event chain from which the first function was called. The functions would each pop off of the stack in the usual "first in last out" order.

That's my guess, having never used a Flow Control event in the past and being unaware (until now) of their existence.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2229
Re: Flow Conrol Event and Event Attributes
« Reply #4 on: July 12, 2016, 06:17:53 PM »
Answers (paraphrased and not in order):

Q) What is Call Marker:
A) Call instead of Goto.  A subroutine call.

Q) What is Return
A) Return from subroutine

Q) What is Pop Return
A) Remove topmost entry from LIFO subroutine return stack.

Q) What is wrong with this?
A) nothing that I can see offhand

Q) Why doesn't this work
A) What makes you think it does not work?  If you have
an example of something that does not work, maybe you
should submit a bug report.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9809
Re: Flow Conrol Event and Event Attributes
« Reply #5 on: July 12, 2016, 07:15:23 PM »
Thank you both for your answers. :)

I didn't want to start off with a bug report, because I thought thee was a good chance that I was doing something wrong. I am still not convinced that I am not. It seems pretty straight-forward - I have a Question List, and for each button another Question List and for each button for the new buttons, more Question Lists. From each of these last/lowest Question Lists, I want to be able to bump back up to the first Question List event.
I think that is what I am telling the Flow Control to do.

I will submit a bug report. There is another Flow Control issue as well, one that is editor related or Eric related. ;)

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9809
Re: Flow Conrol Event and Event Attributes
« Reply #6 on: July 13, 2016, 01:02:07 PM »
Okay, I am now the master of Event  Attributes! I will upload a short dmo to show just what an awesome tool Paul has given us.

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2229
Re: Flow Conrol Event and Event Attributes
« Reply #7 on: July 13, 2016, 01:19:09 PM »
One problem at a time:

The editor error:  "Undefined Marker".... That is
my problem.  Editor version 2.47 fixes this.

Now you have "Doubly defined marker".  That is
your problem.

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2331
    • Dinonykos Dungeon Craft
Re: Flow Conrol Event and Event Attributes
« Reply #8 on: July 13, 2016, 01:20:04 PM »
I have totally missed this until now, but I assume from what I have seen so far that this might also be interesting for several kinds of mini games... :D
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9809
Re: Flow Conrol Event and Event Attributes
« Reply #9 on: July 13, 2016, 02:07:26 PM »
Thanks, Paul. I will download and try it out.

Dinonykos, I was actually thinking specifically of you when creating the little demo. :D I actually need to redo the demo because I did something that I now know how to do more efficiently and will wait until a related minor bug is fixed.

Edited to add:

My issue seems to be resolved. Thank you, Paul.
« Last Edit: July 13, 2016, 04:03:16 PM by manikus »

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2331
    • Dinonykos Dungeon Craft
Re: Flow Conrol Event and Event Attributes
« Reply #10 on: January 31, 2017, 02:40:19 PM »
Wow! I just checked how to make a simple loop with this event type. Great function!!! Thanks for adding it to DC!
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2229
Re: Flow Conrol Event and Event Attributes
« Reply #11 on: January 31, 2017, 05:13:48 PM »
Quote
how to make a simple loop

You will soon learn how to make an infinite loop!

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9809
Re: Flow Conrol Event and Event Attributes
« Reply #12 on: January 31, 2017, 05:22:31 PM »
Quote
how to make a simple loop

You will soon learn how to make an infinite loop!

that was teh first kind of loop that I learned to make. :D

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2331
    • Dinonykos Dungeon Craft
Re: Flow Conrol Event and Event Attributes
« Reply #13 on: February 01, 2017, 12:06:09 AM »
I put a "yes/no" question into my test loop to avoid such an effect...  8)

But I have to admit that it happened to me earlier (using the transfer module event to create a loop)...  :-[

The Flow Control event is in any case a much more elegant way than using the "transfer module approach".
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9809
Re: Flow Conrol Event and Event Attributes
« Reply #14 on: February 01, 2017, 01:57:11 PM »
I must confess thta with the transfer Module approach, I made an infinite loop just to do it. :D :D :D

 

anything