S&M style speech dialog

Started by piraatlife4me, Thu 18/12/2003 20:01:26

Previous topic - Next topic

piraatlife4me

Hey I was just wondering if anybody knows of a good way to set up a sam and max style speech dialog gui.  I know how to create it, but what is the best way to run it through script and plug it into the ags built in dialog? I also want the buttons purpose and graphics to constantly change with the dialog like in sam and max.  Any ideas?  I have a couple ideas but I need something more stable.

Daniel
Winebarger

p.s. Does anyone know the correct way to use a set timer, and Istimerexpired function.  I set it up according to what the manual said and put it inside a Global int inside my repeatedly execute room script but for some reason it dosent work when I set the timer function elsewhere im my script.
Do I have to set it in the games repetedly execute script instead?

Isegrim

About the timer:

Is the SetTimer inside the repeatedly execute?
That would mean that it is reset to its initial value every cycle and never expires.

And, what do you mean by "...and put it inside a Global int..."
This post was generated automatically and therefore bears no signature.

piraatlife4me

What I am trying to do is simulate a car alarm going off and a parking valet guy leaving his post in to go turn it off.  What I want is when the alarm is set off I want a timer set so after a certain amount of time while displaying speech in the background over him, and then when the times up the sound  stops and he returns.  I have code set up to run only when the player is in a specific room and when they use a specific inventory item on the player character.  The reason I use a global integer is so the timer can be accesed by the room script and the global script, since the global script is where the code is for the action.  I thought this was a good solution but that is only my guess  I just need to know a good way to fix this, because I only want the timer to be set when the player uses the inventory item on the player character.  And when it expires I want to stop the sound and set movecharacter blocking command moving the npc back to his post, reseting everything enabling it to happen again, and again.

Scorpiorus

Check that thread about a sprite based dialog: http://www.agsforums.com/yabb/index.php?board=2;action=display;threadid=8476


About a timer:
So you have an If (IsTimerExpred()) inside the repeatedly execute and SetTimer within the interact and you can't catch the moment when timer expires?

As you put an If (IsTimerExpred()) inside the repeatedly execute, you need to ensure the repeatedly execute is called at the same time. The AGS engine doesn't call repeatedly executes while the script is blocked with a command like MoveCharacterBlocking() or something.

SMF spam blocked by CleanTalk