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

#21
It's working well with script compatibility level 3.5.0 Alpha but not with 3.5.1 i think because of:
GetViewport

#22
Quote from: Crimson Wizard on Thu 01/12/2022 17:38:57
Quote from: actaria on Thu 01/12/2022 16:54:12Do i simply have to copy the ".scm" file to my Adventure game studio directory ?

You need to right click on "Scripts" and select "Import script module", then choose the scm file. The scm file may be anywhere. The Editor will unpack scm into the script files and add to your project.

Because the module is so old, there may be problems with it running in the contemporary version right away. In this case you'll have to adjust some settings in "General Settings - Backwards Compatibility", but I cannot tell which without trying the module first.


Hello,

Now i will be busy with all that this is perfect  :-D
Let's try to use my 1st module and i will try many backwards compatibilty settings in case it's not working well.

Thanks again Crimson Wizard
#23
Do you also have the documentation ?

I tried to lauch the demo but it's not working maybe because of my AGS version 3.5.1

This is the first time i use a module because i am not satisfied with:
Character.IsCollidingWithChar and AreThingsOverlapping

Do i simply have to copy the ".scm" file to my Adventure game studio directory ?

Thank you
#24
Looks like this one is still up:
Quote from: Mehrdad on Mon 20/06/2016 07:59:45Here you are:
https://www.dropbox.com/s/kn03yyfbzpucosm/PPCollision.zip?dl=0
 

This is really kind heltenjon thanks a lot  :-D
#25
 Hello,

Does anyone have a working link to download the module and the documentation please ?

I would like to try it.

Thanks a lot.
#26
Quote from: Khris on Thu 01/12/2022 11:12:18I've edited my post above accordingly. :)

Thank you Khris i will change my code then to do things the right way  :-D
#27
Quote from: Crimson Wizard on Thu 01/12/2022 02:25:09
Quote from: actaria on Thu 01/12/2022 00:29:32I don't know maybe this is just me  :-D
I managed to do the scrolling thing after a few times reading it so the manual is good.
I just though that i had to create a new camera to do the scrolling.

I just checked it, and the example makes no sense. At the same time there's no example of a proper simple scrolling (for example, for SetAt article).


True this is exactly what i was thinking wihle i was reading the manual i wanted a proper example of a simple scrolling like the one i used

This would be nice if you can write a simple scrolling example from top to bottom or from left to right and how to change the scrolling speed.

Thanks again for all the things you are doing to make AGS even better.
#28
Quote from: Crimson Wizard on Thu 01/12/2022 00:01:44
Quote from: actaria on Wed 30/11/2022 23:27:39This is the first time i use Camera functions so i copy paste the manual

I guess this means that the example in the manual is misleading, I will try to change it.

I don't know maybe this is just me  :-D
I managed to do the scrolling thing after a few times reading it so the manual is good.
I just though that i had to create a new camera to do the scrolling.
#29
Hello Crimson Wizard,

This is the first time i use Camera functions so i copy paste the manual  :-D

It's good to know that i can use the main camera to get the exact same result.

I will try this soon since i have another room where i will need the camera.

So i have to test this and also:

function on_mouse_click(MouseButton button) {
  if (player.View == DEATH) ClaimEvent();
}

that you told me for my player deaths, she will die soon again no worries

Thank you.
#30
Hello Kris,

My savior as usual, well what can i say many big thanks you are really amazing each time.

It works really well thanks you so much i can continue the spiders cave now  :-D


#31
Hello,

It's me again. :-D
Today i am learning Camera function.

I have a 1980x5500 room and i wanted to make a Camera scrolling from the top to the bottom of the room to show the player what he will have to climb.

I managed to do the scrolling i wanted with this code and it works really well

Code: ags

// Create and setup a temporary camera
Camera* myCam = Camera.Create();

myCam.SetAt(0, 0);


// Save the old camera in a temp variable
Camera* oldCam = Screen.Viewport.Camera;
// Assign the new camera to the primary viewport
Screen.Viewport.Camera = myCam;

// Scroll the new camera across the room
while (myCam.Y < (Room.Height - myCam.Height))
{
    myCam.SetAt(myCam.X + 1, myCam.Y + 10);
    Wait(1);
}

// Delete the camera and reset the old camera back
myCam.Delete();
Screen.Viewport.Camera = oldCam;


The only little problem i have is that when you enter the room the camera shows the player for like 1 second before going to the top of the room to begin the scrolling down.

I thought that myCam.SetAt(0, 0); was what the camera shows at start but even if i changes the values it still shows the player at start.

Any help to explain would be appreciated.

Thank you.
#32
Quote from: Khris on Wed 30/11/2022 08:56:50Here's one relatively quick way to do this:

Add this to the room script:
Code: ags
function on_mouse_click(MouseButton button) {
  if (player.View == DEATH) ClaimEvent();
}

This will disable all non-GUI (i.e. room) clicks based on the view. ClaimEvent() tells AGS to no longer run the global on_mouse_click function after the room's, effectively disabling all global room click handling.


Hello,

This is exactly what i was looking for
I will try it for the next player death  :-D
Thank you
#33
Quote from: Snarky on Tue 29/11/2022 23:15:26
Quote from: actaria on Tue 29/11/2022 22:29:32But I can't do any blocking animation here because i want the spider to keep moving a little bit while the deeath music plays.

You can have a non-blocking and a blocking animation running simultaneously, so if you make the spider animation non-blocking that shouldn't be an obstacle.

Hello,

Now i have used this solution "will make an object using the last frame of the death loop and make the character(player) invisible for exemple."

But i was curious and went back to this room code:
-The spider kill the Character and i have some blood spreading on the wall (animation that goes till the game goes back to sxreen title)

So maybe i should've just put the blood animation on Blocking and maybe it would bave been ok my character wouldn't have been able to move till the game returns at title screen.

I am not giong to try because it's working well now and I am a lazy girl  :-D

Tonight i am trying to learn Camera and it's not easy but i begin to understand how it works.

I have lots of room but none used camera yet so now it's time.

The scary spider





#34
Quote from: newwaveburritos on Tue 29/11/2022 22:26:17One thing I have learned that I've found useful is that the player doesn't have to be the "player" the player just has to look like the player.  If it's easier for you to use something else  like maybe like maybe an object or even a GUI that can't move and keep the player as the player then you could do that rather than try scripting very specific behavior.

O yes this is a pretty good idea maybe i will make an object using the last frame of the death loop and make the character(player) invisible for exemple.
That sould work.

Thank you.
#35
Quote from: Snarky on Tue 29/11/2022 22:15:09Also, if you're playing a blocking animation, the game will block so that players can't (normally) do anything. Depending on what you want to happen after the player dies, that may be sufficient. (For example play a blocking animation for ten seconds, then jump back to the main menu or show a Restart/Reload/Quit dialog.)

This is what I did for others player death (yes he dies a lot:)
But I can't do any blocking animation here because i want the spider to keep moving a little bit while the deeath music plays.
#36
Hello,

I have a little problem there.

In a room the player dies by a spider..
I have a death animation  which works well.
And of course I don't want the player to be able to move anymore (the corpse is lying on the ground) and  there is a little animation and music that plays once the player is dead on the ground.

So i t ried these 2 commands:

Code: ags
cChar1.StopMoving();

cChar1.Clickable = 0;

But  i am still able to move the character
what am i doing wrong ?

Thanks a lot for your help.
#37
Hello Khris,

Well as usual fantastic help it's perfectly working now  :) with your great solution.

This is another one i would have never been able to find by myseft to be honest.

Thank you so much for sharing your knowledge.

I think this time i am done with this keyboard :) so i went from a simple text box to a nice animated keyboard i can say that i am hapy now because of you

Have a great day.
#38
Hello,

I am stil working on my keyboard GUI it works very well with good and wrong password.

So  i wanted to enhance it a little more with some animations on it.

I created a new room with some animated objects and i put the keyboard GUI over it and it looks pretty good.

The problem i have is that once correct or incorrect password has been typed he Player has to go back to the previous room in front of the door with the PNJ

The PNJ is talking to say "this is the good password" or "this is not the good password' then he close a little window on the door

but with the cChar1.ChangeRoom(18,3275, 1022); the text is displaying before the keyboard GUI is off as you can see in the video:


And i also get some object and frame error when i got back to the previous room.

I think i found the reason why in the manual:

IMPORTANT: For player character this command does not change the room immediately; instead, it will schedule the room change, and perform it only once your script function has finished
(This is to avoid problems with unloading the script while it is still running). This means that you should not use any other commands which rely on the new room (object positionings, and so on)after this command within the same function.


Is there another command than ChangeRoom without this limitation ?
Am i going the wrong way ?

Thanks a lot in advance for you help.
#39
Fantastic it's working  :)

Thanks to all of you I clearly coundl't have make this work without your help.

Now i have a nice working GUI Keyboard i will now do the esthetic part  :)

Again thanks a lot and I wish you all a great day
#40
O yes sorry i missed the Return key part so now it's almost perfect  :)


"The key you're calling "Delete" is actually Backspace (although Apple mislabels it as "delete"  yes my bad !

I tried your solution ( Snarky)  for the Backspace (delete) key

Code: ags
 if(myTextBox.Text.Length>0) myTextBox.Text = myTextBox.Text.Trim(myTextBox.Text.Length-1);

but i have an error:

Code: ags
GlobalScript.asc(1454): Error (line 1454): '.Trim' is not a public member of 'String'. Are you sure you spelt it correctly (remember, capital letters are important)?

Thank you

SMF spam blocked by CleanTalk