Jibble

Author Topic: Suggestion for Improvement: eBlockNone  (Read 1530 times)

Armageddon

  • Posts: 1,443
  • Likes apples and nuts
Suggestion for Improvement: eBlockNone
« on: 29 Jan 2013, 05:53 »
Basically putting Khris' GotThere module into a single eBlock type called eBlockNone (or whatever). So,

Code: Adventure Game Studio
  1. cPlayer.Walk(82, 132, eNoneBlock, eWalkableAreas);

Would walk the player to the coords, he can cancel it and click somewhere else while walking there, once he gets there it will play the rest of the script. Sorry if this isn't what this forum is for, if if this has been asked already.

Crimson Wizard

  • Local Moderator
  • Posts: 8,794
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on a game that won an AGS Award!
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
Re: Suggestion for Improvement: eBlockNone
« Reply #1 on: 29 Jan 2013, 07:25 »
So, basically this is about adding new behavior type, which makes action blocking, but interruptible by some user action.

Armageddon

  • Posts: 1,443
  • Likes apples and nuts
Re: Suggestion for Improvement: eBlockNone
« Reply #2 on: 29 Jan 2013, 07:54 »
You can set the actions to do whatever you want, it just walks there before continuing the script, but you can still change your mind while the character is walking and walk somewhere else to cancel it. So if you look at something now and when you look you have the player say "That's interesting.", if you use eNoBlock he will say it before/while he's walking to the location you want him to walk to. So I guess what eBlockNone should do is have everything in the game run normally, unlike eBlock, except the function in the room script won't continue?

I know it sounds really confusing but it shouldn't be. :-[

Crimson Wizard

  • Local Moderator
  • Posts: 8,794
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on a game that won an AGS Award!
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
Re: Suggestion for Improvement: eBlockNone
« Reply #3 on: 29 Jan 2013, 08:08 »
I think there's a lot to consider. How the interrupting action is set up, how the script should behave after action was interrupted.

MurrayL

  • Posts: 195
    • I can help with AGS tutoring
    • I can help with backgrounds
    • I can help with play testing
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • I can help with voice acting
    • I can help with web design
Re: Suggestion for Improvement: eBlockNone
« Reply #4 on: 29 Jan 2013, 17:57 »
At the moment this can be (sort of) done like this:

Code: Adventure Game Studio
  1. function myInteraction(){
  2.     cEgo.Walk(360, 240, eNoBlock);
  3.    
  4.     StartCutscene(eSkipAnyKeyOrMouseClick);
  5.     while(cEgo.Moving && !Game.SkippingCutscene){
  6.         Wait(1);
  7.     }
  8.     cEgo.StopMoving();
  9.     EndCutscene();
  10. }
  11.  
« Last Edit: 29 Jan 2013, 17:59 by MurrayL »

RickJ

  • Posts: 2,871
  • fix'n one thing and break'n two ...
    • I can help with scripting
    • I can help with story design
    • RickJ worked on a game that was nominated for an AGS Award!
Re: Suggestion for Improvement: eBlockNone
« Reply #5 on: 29 Jan 2013, 21:11 »
It sounds to me that something like eNoBlock, eBlockSelf, and eBlock is what is being described.  The first and last are of course what we have now.  The eBlockSelf would simply allow the script to continue (as in eNoBlock) until the originating entity (character, object, etc) tried to execute another action.  At that point the script would block (as in (eBlock). For example if Ego is set walking with eBlockSelf.  The script doesn't block until Ego is set walking to another point.

Code: Adventure Game Studio
  1.     cEgo.Walk(360, 240, eBlockSelf);    // Ego starts walking
  2.         :                               // Script continues
  3.         :
  4.     cEgo.Walk(400, 500, eBlockSelf);    // Script blocks here and waits for Ego to
  5.                                         // stop at which time the new walk instruction
  6.                                         // is executed.
  7.  

It's sort of a poor man's multi-threading feature that could be very effective and useful.

Armageddon

  • Posts: 1,443
  • Likes apples and nuts
Re: Suggestion for Improvement: eBlockNone
« Reply #6 on: 30 Jan 2013, 00:00 »
It's the only thing that has ever bothered me about AGS. :P

monkey0506

  • Posts: 7,031
  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
Re: Suggestion for Improvement: eBlockNone
« Reply #7 on: 07 Feb 2013, 21:56 »
This belongs in Engine Development. The only thing that would change for this on the editor-side would be the internal script header.