Menu

Show posts

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

Messages - Cookie_Wood

#21
Thank you so much :D
#22
Hello everyone :)

I'm really sorry if my post already exists (can't find it :( ) or not on the right place, but I'd like to know where I can find the official AGS logo. I'd like to put it on the intro when the game starts or on my video trailer, but I can't find it in good quality.

I tried to make it myself on vectors, but I'm not really proud of it. Can someone know where I can find it ? Thank you :D

#23
I just set this module, you were right Khris, that completly corrected my problem !

Thank you so much Khris and Ali !

Do not apologies, AGS is such an awesome soft and you're always so kind :)

Thanks again :D
#24
Hi everyone :)

I'm really sorry if this topic already exists, if a tutorial explains how to do this, or if it's an AGS limit, I swear I searched a lot before posting, but : I'd like my player character walking loop to not start over on each walk processclick (if the loop is not finished).
My Backgrounds are sometimes very large (too large I guess) and crossing it from right to left can be unpleasing because the walking loop starting over before it's end cause a slight "shaking effect" on the backgrounds.

Does someone has a solution to get the player character keep on finishing it's walking loop even if the (human) player process several walk click ?

I hope I made myself clear :/
Thanks :D
#25
Hi Khris :)

Thank you, but it's already set on True and it works great for others NPC. But here, it's not really a view/loop, I try to do it adding some "waypoint" into the room rep_execute.
I was hoping I wouldn't have to create a specific view for this, but maybe it is the only solution ?

Thank you again :D
#26
Hey guys,

Re-openning the topic. I had quite the same problem with the error message "way point too complexe" I just delete 2 of the waypoints and it solved the thing perfectly.

But, I had another similar problem. The thing is, I got a big room with 5 NPC including 2 kids who turn around each other with a timer (just like they're playing).

But when I start a dialog with another NPC in the same room, the timers stop and kids stop moving. Sorry if it's a stupid question :'( I tryed to put it into the globalscript with condition if (player.room==9) but I'm not sure it's a good idea. Cheers :D

Here's a bit of code :

Code: ags


function room_Load()
{
SetTimer(1, 1);
SetTimer(2, 1);
}

function room_RepExec()
{
if (IsTimerExpired(1))
 {
cLouna.Walk(1755, 835);
cLouna.AddWaypoint(1395, 915);
cLouna.AddWaypoint(1290, 770);
cLouna.AddWaypoint(1610, 700);
cLouna.AddWaypoint(1700, 735);
SetTimer(1, 200);
 }

if (IsTimerExpired(2))
 {
cLouca.Walk(1290, 770);
cLouca.AddWaypoint(1610, 700);
cLouca.AddWaypoint(1700, 735);
cLouca.AddWaypoint(1755, 835);
cLouca.AddWaypoint(1395, 915);
SetTimer(2, 200);
 }
}


#27
Hi :D

Just coming one very last time on that topic (i promise :D)

I just have one last problem with my Save and Load GUI. My dynamic sprites have a curious behaviour when it comes to delete them. I added 3 little trashbins on my GUI, to delete the saveslot, the screenshot that you guys kindly helped me with and finally a little Date and time label.

It is very weird, but when I try to delete the first ou second save, the 3rd screenshot just "slip" into the 1st screenshot button position !






This is what Khris helped me to do (sorry i misspelled your name last time Khris) + date and time label

Code: ags

DynamicSprite *buttonSprite1;
DynamicSprite *buttonSprite2;
DynamicSprite *buttonSprite3;

DynamicSprite *buttonSpriteLoad1;
DynamicSprite *buttonSpriteLoad2;
DynamicSprite *buttonSpriteLoad3;


function ShowSaveGUI()
{
  // prepare gSave
  buttonSprite1 = DynamicSprite.CreateFromSaveGame(1, 150, 90); 
  if (buttonSprite1 != null) {
  
  bScreenSlot1.NormalGraphic = buttonSprite1.Graphic;
  
  lblDateSave1.Text = Game.GetSaveSlotDescription(1);
  lblDateSave1.TextColor = 3;
  
  }
  
  buttonSprite2 = DynamicSprite.CreateFromSaveGame(2, 150, 90);
  if (buttonSprite2 != null) {
    
  bScreenSlot2.NormalGraphic = buttonSprite2.Graphic;
  
  lblDateSave2.Text = Game.GetSaveSlotDescription(2);
  lblDateSave2.TextColor = 3;
  
  }
  
  
  buttonSprite3 = DynamicSprite.CreateFromSaveGame(3, 150, 90);
  if (buttonSprite3 != null) {
    
  bScreenSlot3.NormalGraphic = buttonSprite3.Graphic;
  
  lblDateSave3.Text = Game.GetSaveSlotDescription(3);
  lblDateSave3.TextColor = 3;

  }

  // show it
  gSave.Visible = true;
}

function ShowLoadGUI()
{
buttonSpriteLoad1 = DynamicSprite.CreateFromSaveGame(1, 150, 90);
if (buttonSpriteLoad1 != null) {
  
  bScreenLoadSlot1.NormalGraphic = buttonSpriteLoad1.Graphic;
  
  lblDateLoad1.Text = Game.GetSaveSlotDescription(1);
  lblDateLoad1.TextColor = 3;
}

buttonSpriteLoad2 = DynamicSprite.CreateFromSaveGame(2, 150, 90);
if (buttonSpriteLoad2 != null) {
  
  bScreenLoadSlot2.NormalGraphic = buttonSpriteLoad2.Graphic;
  
  lblDateLoad2.Text = Game.GetSaveSlotDescription(2);
  lblDateLoad2.TextColor = 3;
}

buttonSpriteLoad3 = DynamicSprite.CreateFromSaveGame(3, 150, 90);
if (buttonSpriteLoad3 != null) {
  
  bScreenLoadSlot3.NormalGraphic = buttonSpriteLoad3.Graphic;
  
  lblDateLoad3.Text = Game.GetSaveSlotDescription(3);
  lblDateLoad3.TextColor = 3;
}
gLoad.Visible = true;
}


Saving or deleting saveslots by clicking on the portrait or the trashbin (and then openning the "confirm gui" before deleting)

Code: ags

//----------------------------------------------------------------------------------------------------
// gSave
//----------------------------------------------------------------------------------------------------


function bSaveSlot1_OnClick(GUIControl *control, MouseButton button)
{
 gSave.Visible = false;
 DateTime *dt = DateTime.Now;
 SaveGameSlot(1, String.Format("%02d/%02d/%04d - %02d:%02d:%02d", dt.DayOfMonth, dt.Month, dt.Year, dt.Hour, dt.Minute, dt.Second));
 lblDateSave1.Visible=true; //////// attention new
 lblDateLoad1.Visible=true;
 Overlay *textOverlaySaving;
 textOverlaySaving = Overlay.CreateTextual(800, 300, 400, eFontfntSpeech, 3, "Partie sauvegardée !");
 Wait(50);
 }



function bSaveSlot2_OnClick(GUIControl *control, MouseButton button)
{
 gSave.Visible = false;  
 DateTime *dt = DateTime.Now;
 SaveGameSlot(2, String.Format("%02d/%02d/%04d - %02d:%02d:%02d", dt.DayOfMonth, dt.Month, dt.Year, dt.Hour, dt.Minute, dt.Second));
 lblDateSave2.Visible=true; //////// attention new
 lblDateLoad2.Visible=true;
 Overlay *textOverlaySaving;
 textOverlaySaving = Overlay.CreateTextual(800, 300, 400, eFontfntSpeech, 3, "Partie sauvegardée !");
 Wait(50);
}

function bSaveSlot3_OnClick(GUIControl *control, MouseButton button)
{
 gSave.Visible = false;  
 DateTime *dt = DateTime.Now;
 SaveGameSlot(3, String.Format("%02d/%02d/%04d - %02d:%02d:%02d", dt.DayOfMonth, dt.Month, dt.Year, dt.Hour, dt.Minute, dt.Second));
 lblDateSave3.Visible=true; //////// attention new
 lblDateLoad3.Visible=true;
 Overlay *textOverlaySaving;
 textOverlaySaving = Overlay.CreateTextual(800, 300, 400, eFontfntSpeech, 3, "Partie sauvegardée !");
 Wait(50);
}

function bCloseSave_OnClick(GUIControl *control, MouseButton button)
{
gSave.Visible=false;
}


function bSaveTrashbin1_OnClick(GUIControl *control, MouseButton button)
{
gSave.Visible=false;  
gConfirm3.Visible=true;
}

function bSaveTrashbin2_OnClick(GUIControl *control, MouseButton button)
{
gSave.Visible=false;
gConfirm4.Visible=true;
}

function bSaveTrashbin3_OnClick(GUIControl *control, MouseButton button)
{
gSave.Visible=false;
gConfirm5.Visible=true;
}


Delete the saveslot, the dynamic sprite and label when "confirm Yes"

Code: ags

//----------------------------------------------------------------------------------------------------
// gConfirm3 DeleteSave1
//----------------------------------------------------------------------------------------------------


function bYesConfirm3_OnClick(GUIControl *control, MouseButton button)
{
DeleteSaveSlot(1);
gConfirm3.Visible=false;
Overlay *textOverlaySaving;
textOverlaySaving = Overlay.CreateTextual(800, 300, 400, eFontfntSpeech, 3, "Partie supprimée !");
Wait(50);

if (buttonSprite1!= null) {
buttonSprite1.Delete();
}

if (buttonSpriteLoad1!= null) {
buttonSpriteLoad1.Delete();
}

lblDateSave1.Visible=false;
lblDateLoad1.Visible=false;
}

function bNoConfirm3_OnClick(GUIControl *control, MouseButton button)
{
gConfirm3.Visible=false;
}


Does someone see why the 3rd screenshot does not want to stay properly on the third button when trying to delete saveslot 1 or 2 ?
I hope I gave enought informations :)
Edit: it's a little bit confusing but : gConfim3 = Save1, gConfirm4= Save2 et gConfirm5 = Save3 (gConfirm 1 et 2 are used to close the game or to return to main menu)
#28
Thank you so much to all of you ! Kris, Cassiebsg and Snarky ! It's totally perfect now.  :-D

#29
Good lord, Kris, you're a super hero. It works great. There's only one thing that I had to change.

I had to put this into the globalscript header.ash to work. It didn't work if i put it into the globalscript.asc (token showsaveGUI unknown) But it's cleary written "do not put any function here" so... what do I risk ?

Code: ags
function ShowSaveGUI() {
  // prepare gSave
  buttonSprite1 = DynamicSprite.CreateFromSaveGame(1, 200, 120);
  if (buttonSprite1 != null) bScreenSlot1.NormalGraphic = buttonSprite1.Graphic;
  buttonSprite2 = DynamicSprite.CreateFromSaveGame(2, 200, 120);
  if (buttonSprite2 != null) bScreenSlot2.NormalGraphic = buttonSprite2.Graphic;
  buttonSprite3 = DynamicSprite.CreateFromSaveGame(3, 200, 120);
  if (buttonSprite3 != null) bScreenSlot3.NormalGraphic = buttonSprite3.Graphic;
  // show it
  gSave.Visible = true;
}


Thank you so much for your help <3
#30
Hi !

Thank you for your quick answers :)

I should have misunderstood the manual which mentionned "on_event" concerning the dynamic sprites I think.

I change a little bit of my code, trying to do what you adviced me to do, but I still have the "click twice" problem, and the GUI really doesn't want to desapear... -_-
Kris, what kind of fonctions do you think you need to see to adress that ? I had to start over my game recently, so my "global script" is still very "short".

Here's the whole thing :

Code: ags


//----------------------------------------------------------------------------------------------------
// game_start
//----------------------------------------------------------------------------------------------------
function game_start() 
{
  
}

//----------------------------------------------------------------------------------------------------
// on_event
//----------------------------------------------------------------------------------------------------

DynamicSprite *buttonSprite1;
DynamicSprite *buttonSprite2;
DynamicSprite *buttonSprite3;

function on_event (EventType event, int data) 
{

}


//----------------------------------------------------------------------------------------------------
// repeatedly_execute
//----------------------------------------------------------------------------------------------------
function repeatedly_execute() 
{
  Hotspot* hsurvol = Hotspot.GetAtScreenXY(mouse.x,  mouse.y);
  Object* osurvol = Object.GetAtScreenXY(mouse.x,  mouse.y);
  Character* csurvol = Character.GetAtScreenXY(mouse.x,  mouse.y);
  InventoryItem* isurvol = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
 
  if (player.ActiveInventory != null) Mouse.Mode = eModeUseinv;
  else if (hsurvol != hotspot[0]) Mouse.Mode = eModeInteract;
  else if (osurvol != null) Mouse.Mode = eModeInteract;
  else if (csurvol != null) Mouse.Mode = eModeInteract;
  else if (isurvol != null) Mouse.Mode = eModeInteract;
  else Mouse.Mode = eModeWalkto;
}

//----------------------------------------------------------------------------------------------------
// repeatedly_execute_always
//----------------------------------------------------------------------------------------------------
function repeatedly_execute_always() 
{
}

//----------------------------------------------------------------------------------------------------
// on_key_press
//----------------------------------------------------------------------------------------------------
function on_key_press(eKeyCode keycode) 
{
  if (IsGamePaused()) keycode = 0;
  
  // "System Keys"
  if (keycode == eKeyCtrlQ) QuitGame(1); // Ctrl-Q
  if (keycode == eKeyF9) RestartGame(); // F9
  if (keycode == eKeyF12) SaveScreenShot("scrnshot.pcx");
  if (keycode == eKeyI) {
  if (gInventoryBar.Visible) gInventoryBar.Visible=false;
  else {
  gInventoryBar.Visible=true;
  gPause.Visible=false;
  }
  }
  if (keycode == eKeyEscape) {
    if (gPause.Visible) gPause.Visible=false;
    else {
      gInventoryBar.Visible=false;
      gPause.Visible=true;
    }
  }

  // Debugger Keys
  if (keycode == eKeyCtrlS) Debug(0,0); // Ctrl-S, give all inventory
  if (keycode == eKeyCtrlV) Debug(1,0); // Ctrl-V, version
  if (keycode == eKeyCtrlA) Debug(2,0); // Ctrl-A, show walkable areas
  if (keycode == eKeyCtrlX) Debug(3,0); // Ctrl-X, teleport to room
}

//----------------------------------------------------------------------------------------------------
// on_mouse_click
//----------------------------------------------------------------------------------------------------
function on_mouse_click(MouseButton button)
{
	// all mouse clicks are handled in TwoClickHandler.asc!
}

//----------------------------------------------------------------------------------------------------
// dialog_request
//----------------------------------------------------------------------------------------------------
function dialog_request(int param) 
{
}


//----------------------------------------------------------------------------------------------------
// gTitle
//----------------------------------------------------------------------------------------------------

function bNewgame_OnClick(GUIControl *control, MouseButton button)
{
player.ChangeRoom(1, 600, 920, eDirectionDownRight);
}

function bLoad1_OnClick(GUIControl *control, MouseButton button)
{
gTitle.Visible=false;
gLoad.Visible=true;
}

function bQuit1_OnClick(GUIControl *control, MouseButton button)
{
QuitGame(0);
}

//----------------------------------------------------------------------------------------------------
// gPause
//----------------------------------------------------------------------------------------------------

function bCommandes_OnClick(GUIControl *control, MouseButton button)
{
gPause.Visible=false;
gControl.Visible=true;
}

function bSave_OnClick(GUIControl *control, MouseButton button)
{
gPause.Visible=false;
gSave.Visible=true;
}

function bReturnTitle_OnClick(GUIControl *control, MouseButton button)
{
gPause.Visible=false;
gConfirm.Visible=true;
}

//----------------------------------------------------------------------------------------------------
// gSave
//----------------------------------------------------------------------------------------------------

function bSaveSlot1_OnClick(GUIControl *control, MouseButton button)
{
gSave.Visible=false;  
buttonSprite1=DynamicSprite.CreateFromSaveGame(1, 200, 120);
if (buttonSprite1 != null) {
bScreenSlot1.NormalGraphic=buttonSprite1.Graphic;
SaveGameSlot(1, "Save 1");
gSave.Visible=true;
}
}

function bSaveSlot2_OnClick(GUIControl *control, MouseButton button)
{
gSave.Visible=false;
buttonSprite2=DynamicSprite.CreateFromSaveGame(2, 200, 120);
if (buttonSprite2 != null) {
bScreenSlot2.NormalGraphic=buttonSprite2.Graphic;
SaveGameSlot(2, "Save 2");
gSave.Visible=true;
}
}

function bSaveSlot3_OnClick(GUIControl *control, MouseButton button)
{
gSave.Visible=false;
buttonSprite3=DynamicSprite.CreateFromSaveGame(3, 200, 120);
if (buttonSprite3 != null) {
bScreenSlot3.NormalGraphic=buttonSprite3.Graphic;
SaveGameSlot(3, "Save 3");
gSave.Visible=true;
}
}

function bCloseSave_OnClick(GUIControl *control, MouseButton button)
{
gSave.Visible=false;
}


//----------------------------------------------------------------------------------------------------
// gLoad
//----------------------------------------------------------------------------------------------------

function bCloseLoad_OnClick(GUIControl *control, MouseButton button)
{
gLoad.Visible=false;
}

//----------------------------------------------------------------------------------------------------
// gControl
//----------------------------------------------------------------------------------------------------

function bQuitControl_OnClick(GUIControl *control, MouseButton button)
{
gControl.Visible=false;
gPause.Visible=true;
}

//----------------------------------------------------------------------------------------------------
// gConfirm
//----------------------------------------------------------------------------------------------------

//----------------------------------------------------------------------------------------------------
// gInventoryBar
//----------------------------------------------------------------------------------------------------
function btnInvScrollLeft_OnClick(GUIControl *control, MouseButton button)
{
	InventoryWindow1.ScrollDown();
}

function btnInvScrollRight_OnClick(GUIControl *control, MouseButton button)
{
	InventoryWindow1.ScrollUp();
}

//----------------------------------------------------------------------------------------------------
// unhandled_event
//----------------------------------------------------------------------------------------------------

function cSuli_Look()
{
player.Say("C'est moi.");
}

function cSuli_Interact()
{
player.Say("Hé ! Arrête, ça chatouille !");
}





#31
Hi there !

I'm quite a newbie and English is not my mother tongue, I apologize in advance <3

Re-openning the topic, I'd like to do basically the same thing as Silent Bob wanted to. I'm doing quite well. The thing is working almost perfectly, BUT it works only if I click twice on my save button. Why ? I'd like the screenshot to appears on my dynamicsprite button even if I click only once on the save button. (which sounds legit ?)

Do you have any idea of what i'm missing ? By the way, how can i make disappear the gSave GUI very quickly before the screenshot is taken ? Because right now, i do have a screenshot, but we bearly cant see the background because of my huge save GUI on the foreground. I do know how to make it disappear but, not in that precise case.


Here's some of my code :

Code: ags

//----------------------------------------------------------------------------------------------------
// on_event
//----------------------------------------------------------------------------------------------------

DynamicSprite *buttonSprite1;
DynamicSprite *buttonSprite2;
DynamicSprite *buttonSprite3;

function on_event (EventType event, int data) 
{
buttonSprite1=DynamicSprite.CreateFromSaveGame(1, 200, 120);
if (buttonSprite1 != null) {
bScreenSlot1.NormalGraphic=buttonSprite1.Graphic;
}
buttonSprite2=DynamicSprite.CreateFromSaveGame(2, 200, 120);
if (buttonSprite2 != null) {
bScreenSlot2.NormalGraphic=buttonSprite2.Graphic;  
}

buttonSprite3=DynamicSprite.CreateFromSaveGame(3, 200, 120);
if (buttonSprite3 != null) {
bScreenSlot3.NormalGraphic=buttonSprite3.Graphic;  
}
}


And

Code: ags
  
//----------------------------------------------------------------------------------------------------
// gSave
//----------------------------------------------------------------------------------------------------

function bSaveSlot1_OnClick(GUIControl *control, MouseButton button)
{
SaveGameSlot(1, "Save 1");
}

function bSaveSlot2_OnClick(GUIControl *control, MouseButton button)
{
SaveGameSlot(2, "Save 2");
}

function bSaveSlot3_OnClick(GUIControl *control, MouseButton button)
{
SaveGameSlot(3, "Save 3");
}

#32
Ok, thank you so much. :grin:

That was very dumb...I found out where was my problem.

Sorry for the disturbance, I will think a little bit more before asking something here... :-D
#33
Hi VampireWombat :)

Thank you for your quick answer !

Actually, I did create my own "gConfirm" GUI with buttons, but they are both displaying at the same time when I try to Quit ! Mine and the hardcoded one... I just want mine to be displayed :'(
What I am missing ?
#34
Hi folks !

First of all, I apologize if I don't make myself totally clear. English is not my mother tongue.

I'm working on my very first game on AGS, so I'm what we might called "a big newbie". I'm using the LW BASS template which is great ! I only have one big problem with it that i'm not able to solved by myself...

I created some GUI's (save, load, pause etc...) on which there's some buttons including a "Quit Button".

When I script like this :

Code: ags
function Button3_OnClick(GUIControl *control, MouseButton button)
{
QuitGame(0);
}


The game is just quitting without any confirmation dialog (Are you sure you want to quit? Yes, No")

Which is totally normal BUT, when I script like this :
Code: ags
function Button3_OnClick(GUIControl *control, MouseButton button)
{
QuitGame(1);
}


There's a very ugly grey "by default" confirmation dialog that open and I really can't find anywhere on my project tree where I can custom that with my own background image and button...etc... Is that "hard-coded" or somethhing like this ?

Where can I set that default confirmation dialog ? Because I really don't want the game to close directly even if this would be solving my problem^^

Thanks :)
SMF spam blocked by CleanTalk