It's working well with script compatibility level 3.5.0 Alpha but not with 3.5.1 i think because of:
GetViewport
GetViewport
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 MenuQuote from: Crimson Wizard on Thu 01/12/2022 17:38:57Quote 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.
Quote from: Mehrdad on Mon 20/06/2016 07:59:45Here you are:
https://www.dropbox.com/s/kn03yyfbzpucosm/PPCollision.zip?dl=0
Quote from: Khris on Thu 01/12/2022 11:12:18I've edited my post above accordingly.![]()
Quote from: Crimson Wizard on Thu 01/12/2022 02:25:09Quote from: actaria on Thu 01/12/2022 00:29:32I don't know maybe this is just me![]()
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).
Quote from: Crimson Wizard on Thu 01/12/2022 00:01:44Quote 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.
// 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;
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![]()
Thank you
Quote from: Snarky on Tue 29/11/2022 23:15:26Quote 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.
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.
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.)
cChar1.StopMoving();
cChar1.Clickable = 0;
if(myTextBox.Text.Length>0) myTextBox.Text = myTextBox.Text.Trim(myTextBox.Text.Length-1);
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)?
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.088 seconds with 14 queries.