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 - Peegee

#61
Good morning ! I started a game with this wonderful software, I would like to know to what extent a game can be marketed. How can I contact the authors to ask them the question? Thanks in advance. PG (roll)
#62
Advanced Technical Forum / Re: Backup
Wed 08/12/2021 14:13:34
OK, thanks. I'm afraid it's a bit complex for me. I am moving towards a simpler solution.
#63
Advanced Technical Forum / Backup
Tue 07/12/2021 11:26:47
Hello. I have a problem with backups. I cannot use "SaveGameSlot" which saves the progress of the game. I have to make an independent save of each room. I have to use "ResetRoom" which only saves the objects, and include my other backup elements (characters, variables, inventory) in the room load. It works, until I quit the exe and relaunch it, my "save" is no longer there, unless I make it accessible at the start of the game. Question: Could the program save a variable that would say if the backup is accessible or not?
#64
Ok, it works! Thank you.
#65
Yes I put this:    if (Region.GetAtRoomXY(player.228, player.173) == region[7])
But the program doesn't take it.

He takes that well:     if (Region.GetAtRoomXY(228, 173) == region[7])
But that doesn't change my problem.
#66
Thank you for the answer. I try the first solution (you must not put "player.", Only the positions) but it does not work.
#67
Hello, a general question:

I have a character or an area where the player cannot yet access. If I click on it, the player cannot move to the area, but he still does his action, from where he is. How to avoid this?
#68
(it was a joke)
Yes finally I do almost the reset by hand, in the room load, but I still put ResetRoom, to reset objects, sometimes more problematic. I have currently resolved my backup issues, including double level issues. Regards
#69
Ok Crimson Wizard, thanks for your help. I will do like that, but I apprehend and I protest !
#70
I need to reset several characters their states, their location, the state of the inventory, the objects that I have picked up, or not, all the variables ... I don't understand that it is so complicated. I can also do the backup "by hand", listing everything I want to reset, but I have very rich levels and it can be complex and problematic.
#71
... so how can we do a full backup?
#72
I am in room1, I do some actions, then I go to a special room where I have items to start the save. There I put "player.ChangeRoom (1)" to go to the room and I put ResetRoom (1), I come back to my room1 but it didn't reset anything.
#73
I cannot reset rooms every time I enter them because sometimes I enter a room which must have kept its previous state.
#74
He enters the room, he throws what there is in the After fade in, but he does not reset anything (neither the variables, nor the positions of characters or objects).
Rooms numbered from 300, I can't because I have a level made up of 2 rooms, anyway I don't think you can change the room number along the way.
#75
Hello, actually I don't even need to save the levels. I just need to restart a room in its initial state. I try with "ResetRoom (1)" but it doesn't reset.
#76
Hello ! I'm trying to explain the context to you better (for the next room, I would avoid the "sub-levels"!).

The 3 characters arrive on a boat, room 2, they are positioned in the foreground. There is a cabin, room 3, where only the main goblin, cGob1, can access. When he comes out of the cabin, the 3 characters must have a different location from the start.
This is why I test if they have already arrived on the boat to position them correctly (I give cGob1 its position in the cabin exit code and in the AfterFadeIn). But with the backup system, they always get back to the starting position.

Complication, the first 2 goblins, 1 and 2, access by a mechanism at the top of the boat. That's why I have to test if cGob2 is at the top of the boat (Gob2Haut == true) to position it correctly.

The good news is that when I reload level (2), apparently the cabin room (3) is reset too.

Second problem, I put this variable: Dec2Saved = true; to signal in my loading page to display the object that will allow me to load room 2. It works, except that if I load room 1 in the meantime, the object to load room 2 disappears in the loading page. The reverse is also true.

Thanks for your help.
#77
Hello, thank you for your reply.
What I mean by sub level: It is one more room, where only one of the 3 characters enters, and when he leaves, all the characters are positioned elsewhere than at the entrance to the main level. I will also have to save what happens in this room, and that it is also reinitialized when we load the main room.

Here is what I currently have in the room load of level2:

Code: ags


function room_Load()
{

  Dec2Saved=true;
  
    cGob1.Transparency=0;
cGob1.SetAsPlayer();

cGob2.Transparency=0;
cGob2.FaceDirection(eDirectionDown);

cGob3.Transparency=0;
cGob3.FaceDirection(eDirectionDown);
cGob1.Clickable=true;
cGob2.Clickable=true;
cGob3.Clickable=true;

hCabine.Enabled=false;

RemoveWalkableArea(2);

hotspot[8].Enabled=false;

   cGamin1.FaceDirection(eDirectionDown);
   cGamin1.ChangeView(20);
 
aDesperate_potato.Stop();
aVent_faible.Play(eAudioPriorityLow, eRepeat);

 if (Game.DoOnceOnly("Save level 2")) SaveGameSlot (2," room 2 initial state ");
 else if (!Arriveebateau) RestoreGameSlot(2);
}


In the AfterFadein : (the variables are there to exit the sub level, to say that I have already arrived in the boat, and that the second character is either at the top, at the bottom.
function room_AfterFadeIn()

Code: ags

{
 if (Arriveebateau==false)
{
  Wait(40);
aGob1Talk.Play (eAudioPriorityHigh,  eRepeat);
  player.FaceDirection(eDirectionDown);
  player.Say("Voici le Palamède,[de la marine aérienne[de notre bon roi Angoulafre.");
  aGob1Talk.Stop();
  Wait(40);
   player.FaceDirection(eDirectionRight);
   
   cGob2.Transparency=0;
cGob2.FaceDirection(eDirectionDown);

cGob3.Transparency=0;
cGob3.FaceDirection(eDirectionDown);
cGob1.Clickable=true;
cGob2.Clickable=true;
cGob3.Clickable=true;

cGob2.ChangeRoom(2, 347, 766, eDirectionDown);
cGob3.ChangeRoom(2, 432, 785, eDirectionDown);
   
}
 if (Arriveebateau==true)
{
    cGob2.Transparency=0;
cGob2.FaceDirection(eDirectionDown);

cGob3.Transparency=0;
cGob3.FaceDirection(eDirectionDown);
cGob1.Clickable=true;
cGob2.Clickable=true;
cGob3.Clickable=true;
  
cGob1.ChangeRoom(2, 268, 639);
  
 if (Gob2Haut==false)
{
cGob1.ChangeRoom(2, 268, 639);
cGob2.ChangeRoom(2, 493, 650);
cGob3.ChangeRoom(2, 613, 725);
}
if (Gob2Haut==true)
{
cGob1.ChangeRoom(2, 268, 639);
cGob2.ChangeRoom(2, 602, 292);
cGob3.ChangeRoom(2, 613, 725); 
}  
}
}



I have two problems:
- He always gives me the characters in the first position of arrival on the boat, even when I leave the sub level.

- The backup system works, I can reload level 2. But if I reload level 1, and I try to reload level 2 afterwards, the object in the loading room that allows me to launch the backup has disappeared. (object that I display thanks to the variable Dec2Saved = true;)


#78
Hello. In fact, I am not doing at all with the saving of level 2. It works to reload the level with the saving, he puts the characters back in place and the character says his intro phrase. But I have an additional sub-level room (only one of the characters goes there), and when I leave it, the characters must have a different positioning and the character must not say anything. I put a boolean variable "ArriveeBateau". It worked before but not anymore with this function:

if (Game.DoOnceOnly ("Save level 1")) SaveGameSlot (1, "room 1 initial state");

You told me about this function:

else if (hasFinishedLevel1) return;

... that I do not understand well (especially the "return"). I put my variable like this:

   else if (Arriveebateau == true) return;
... but it always ends up putting the game back in the starting position (code which is in the AfterFadein). So Currently, I have this (the variable "Dec2Saved" is used to display the object to load in the loading room):

------------------------------------------------------------

function room_Load()
{
Dec2Saved=true;
 
    cGob1.Transparency=0;
cGob1.SetAsPlayer();

cGob2.Transparency=0;
cGob2.FaceDirection(eDirectionDown);

cGob3.Transparency=0;
cGob3.FaceDirection(eDirectionDown);
cGob1.Clickable=true;
cGob2.Clickable=true;
cGob3.Clickable=true;

hCabine.Enabled=false;

RemoveWalkableArea(2);

hotspot[8].Enabled=false;

   cGamin1.FaceDirection(eDirectionDown);
   cGamin1.ChangeView(20);

aVent_faible.Play(eAudioPriorityLow, eRepeat);

  if (Game.DoOnceOnly("Save level 2")) SaveGameSlot (2," room 2 initial state ");
 
  else if (Arriveebateau==true) return;
}
--------------------------------------------------------------------
And in the AfterFadeIn:

--------------------------------------------------------------------
function room_AfterFadeIn()
{
if (Arriveebateau==false)
{
  Wait(40);
aGob1Talk.Play (eAudioPriorityHigh,  eRepeat);
  player.FaceDirection(eDirectionDown);
  player.Say("Voici le Palamède,[de la marine aérienne[de notre bon roi Angoulafre.");
  aGob1Talk.Stop();
  Wait(40);
   player.FaceDirection(eDirectionRight);
   
   cGob2.Transparency=0;
cGob2.FaceDirection(eDirectionDown);

cGob3.Transparency=0;
cGob3.FaceDirection(eDirectionDown);
cGob1.Clickable=true;
cGob2.Clickable=true;
cGob3.Clickable=true;

cGob2.ChangeRoom(2, 347, 766, eDirectionDown);
cGob3.ChangeRoom(2, 432, 785, eDirectionDown);

}
----------------------------------------------------------------------
It's a hassle, and again, I don't know how I would reset the sub-level?
#79
Hello. Indeed, in my loading room, the inventory is displayed anyway, even with the function:

gInventoryBar.Visible = false;

I am using BASS initially.
#80
Ok, great, with that I can manage. Thanks    PG
SMF spam blocked by CleanTalk