Ooooh thank you so much! It worked perfectly now.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu// new module script
DynamicSprite*messagetext;
#define GWIDTH 300
#define GHEIGHT 30
#define GTIMER 1
void MySay(this Character*, String message) {
if (messagetext == null) messagetext = DynamicSprite.Create(GWIDTH, GHEIGHT);
DrawingSurface*ds = messagetext.GetDrawingSurface();
ds.Clear();
ds.DrawingColor = this.SpeechColor;
int w = GWIDTH - 20;
int wt = GetTextWidth(message, Game.SpeechFont) + 5;
if (wt < w) w = wt;
gSpeech.Width = w + 20;
gSpeech.X = (Screen.Width - w - 20) / 2;
int y = (GHEIGHT - GetTextHeight(message, Game.SpeechFont, w)) / 2;
ds.DrawStringWrapped(10, y, w, Game.SpeechFont, eAlignCenter, message);
ds.Release();
gSpeech.BackgroundGraphic = messagetext.Graphic;
gSpeech.Visible = true;
SetTimer(GTIMER, ((message.Length / game.text_speed) + 1) * GetGameSpeed());
WaitMouseKey(((message.Length / game.text_speed) + 1) * GetGameSpeed()); //I added this but doesn't work
}
function repeatedly_execute_always() {
GUI*g = gSpeech;
gBlack.Visible = g.Visible;
if (g.Visible) {
gBlack.SetPosition(g.X, g.Y);
gBlack.SetSize(g.Width, g.Height);
}
if (IsTimerExpired(GTIMER)) gSpeech.Visible = false;
}
// new module script
DynamicSprite*messagetext;
#define GWIDTH 300
#define GHEIGHT 30
#define GTIMER 1
#define TEST 1
void MySay(this Character*, String message) {
if (messagetext == null) messagetext = DynamicSprite.Create(GWIDTH, GHEIGHT);
DrawingSurface*ds = messagetext.GetDrawingSurface();
ds.Clear();
ds.DrawingColor = this.SpeechColor;
int w = GWIDTH - 20;
int wt = GetTextWidth(message, Game.SpeechFont) + 5;
if (wt < w) w = wt;
gSpeech.Width = w + 20;
gSpeech.X = (Screen.Width - w - 20) / 2;
int y = (GHEIGHT - GetTextHeight(message, Game.SpeechFont, w)) / 2;
ds.DrawStringWrapped(10, y, w, Game.SpeechFont, eAlignCenter, message);
ds.Release();
gSpeech.BackgroundGraphic = messagetext.Graphic;
gSpeech.Visible = true;
SetTimer(TEST, (message.Length / game.text_speed));
SetTimer(GTIMER, ((message.Length / game.text_speed) + 1) * GetGameSpeed());
}
function repeatedly_execute() { //this was supposed to work like "Blocking" but don't work
if (gSpeech.Visible) {
Wait(TEST);
}
}
function repeatedly_execute_always() {
GUI*g = gSpeech;
gBlack.Visible = g.Visible;
if (g.Visible) {
gBlack.SetPosition(g.X, g.Y);
gBlack.SetSize(g.Width, g.Height);
}
if (IsTimerExpired(GTIMER)) gSpeech.Visible = false;
}
function btnReyes_OnClick(GUIControl *control, MouseButton button)
{
if (player == cReyes) {
}
else {
cReyes.SetAsPlayer();
btnReyes.NormalGraphic = 325; //Button Sprite with the Reyes face off
btnRay.NormalGraphic = 322; //Button Sprite with the Ray face on
}
}
function btnRay_OnClick(GUIControl *control, MouseButton button)
{
if (player == cRay) {
}
else {
cRay.SetAsPlayer();
btnRay.NormalGraphic = 326; //Button Sprite with the Ray face off
btnReyes.NormalGraphic = 323; //Button Sprite with the Reyes face on
}
}
Quote from: Khris on Fri 24/04/2020 19:28:46But the avi files are in the compiled folder and I get the message, I don't know why.
That's the thing though, ogg videos are supposed to end in *.ogv and go into the game folder, all other video file types go in the compiled folder.
Quote from: Khris on Fri 24/04/2020 19:28:46Yes
Is "video playback error" the only message you're getting? Or is there additonal info?
Quote from: Slasher on Fri 24/04/2020 17:26:31No no, I put the ogg/avi in the conpiled folder
You said .ogg.... in your game folder (not compiled folder)... right?
.avi goes in compiled folder..
Quote from: Slasher on Fri 24/04/2020 17:05:16Yes, that was my first thought. I tried 5 other new videos yet and get the same problem
Why not try another video and see it that appears ok....
Quote from: Crimson Wizard on Fri 24/04/2020 11:18:07It was playing in 3.5.0 initially, I started making a new game all in this version.
I forgot to ask, you mentioned it played before, have you updated to 3.5.0 only recently and it stopped playing then, or it was playing in 3.5.0 initially?
Quote from: Crimson Wizard on Fri 24/04/2020 03:11:53The file is avi (But i tried with ogg tooo and the result is the same). I test the game running from the editor and the compiled folder too, and in windowed and fullscreen mode. In all of the possibilities I get the error.
Please tell what is the video format, and whether you test the game running from the editor or from compiled folder, in windowed or fullscreen.
Quote from: Danvzare on Wed 24/04/2019 18:20:42Yeah maybe I like it because the nostalgia, but it's not a incredible amazing game, it's simple but funny I thought.
Hey, I remember that being one of the first AGS games I ever played.
I also remember disliking it.
So um... two conflicting emotions there. Hmm, I'm sure nostalgia will win over.
Hmm... Don't Escape 4?
Quote from: josiah1221 on Thu 25/04/2019 04:45:06Yeeees, it is. Is a game that I played a few months ago and I really like it. Well, you can go with the next.
Midnight Scenes!
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.059 seconds with 16 queries.