AGS Awards votes close at 13:59 BST on Wednesday 07 March 2018. You've already voted, so you've got 10 days and 11 hours left to wait before voting closes!

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.


Topics - Vincent

Pages: [1] 2
1
Beginners' Technical Questions / Mouse Click
« on: 24 Jan 2018, 11:12 »
I have a "button bar" which his width increase anytime you click another button. I have a working script which in some computers works fine but for other computers it doesn't work very well. I figure it out that (maybe) it's regarding the game speed and how certain computers handle the game speed and process the mouse clicks. I just wish to understand how can I fix this script so to make this working very well for each computer. I will try to explain you what I would like to do.
1) Click the button increase the "button bar" width +2 unity
2) Set timer to decrease -1 unity the "button bar" width
The main goal is to click repeatedly fast the button as you can to increase the "button bar" width. As I explained previously the script is working fine but for some computers. For other computers you simply cannot increase the "button bar" width because (I believe) the timer expired very much fast. So I really don't have a clue on how can I solve this problem. I would need any of your advice if you don't mind. :(
Here is the script:

Code: Adventure Game Studio
  1. int ButtonClicked, Buttonlength;
  2.  
  3. function repeatedly_execute()
  4. {
  5.   if (IsTimerExpired(5)) // decrease width "button bar"
  6.   {
  7.     if (ButtonClicked != 0) {ButtonClicked --;}
  8.     if (ButtonClicked <= 0) {ButtonClicked = 0;}
  9.     SetTimer(5, 3);
  10.   }
  11.   Buttonlength = FloatToInt ((IntToFloat (ButtonClicked)/159.) * IntToFloat(Game.SpriteWidth[BtnBar.Graphic]));
  12.   BtnBar.Width = Buttonlength;
  13. }
  14.  
  15. function ButtonPush_OnClick(GUIControl *control, MouseButton button) // increase width
  16. {
  17.   if (button == eMouseLeft)
  18.   {
  19.     if (BtnBar.Width < 585)
  20.     {
  21.       ButtonClicked += 2;
  22.       SetTimer(5, 3);
  23.     }
  24.     else // button bar has reached the full width
  25.     {
  26.  
  27.     }
  28.   }
  29. }

Please any kind of help is truly appreciated.

2
Beginners' Technical Questions / Graphic Driver
« on: 31 Dec 2017, 08:50 »
Good morning to all AGSer!

Recently I discovered a minor issue that I am sure it is regarding my computer but at the moment I don't know why this is happening and I would like to know if I can fix it somehow. So, if I start a new project into Ags (no matter which graphic driver I choose from the default panel) the game seems to go slowly into the editor. But if I run the game from the exe file (with software renderer) then the game run as it should do. Also I found out that if I do (ctrl+F5) run the game without debugger then the game go fine like when I run it from the exe file. So I am wonder why into the editor the game look slowly? There is a way for me to fix this?

3
Beginners' Technical Questions / Inventory Item At Index
« on: 30 Nov 2017, 22:28 »
Good evening to all AGSer folks!

I really hope that you're not tired for my noob questions.
The thing that I am going to ask you today it seems much simple to do, but at the moment I really can't find a good solution to it. So, I need to add an inventory item to a specific index, more specifically, where it was a certain item before to removing it. Well, into the manual I could find something like this: readonly InventoryItem* InvWindow.ItemAtIndex[]; but how I could use this for my purpose? How do you check where it is exactly a certain item into the inventory window?

4
Good evening to all AGSer around the world.

I have a noob question to ask you.
My question is, if a game have a translation file and there is aviable the speech sound when talking, how Ags know which language is running to play properly a speech file according with the selected language when a character is talking?

5
Beginners' Technical Questions / Slider OnChange[SOLVED]
« on: 11 Nov 2017, 15:17 »
Good Evening to all AGSer.

So I have an inventory window (78x156) that can display 12 items before that a vertical slider is showed. My intention would be to scroll the inventory items by a single row with the vertical slider when changing. But I am having some issues about how to according the slider value (max and min) with how many items the inventory window can display. So to achieve the slider movement to be adjusted with how many items the inventory window can display?

6
Hello to all Agser!

One of my friend started a project in 16bit color and imported the graphics as 16bit color. Now, I switch to 32 bit colors and re imported the graphics in 32bit color (and room background depth color too). But now no matter what, it seems like ags react as it is set to 16 bit color? What should I do now?

7
Good evening to all AGSer!

I'd like to ask to some of you how to make a custom screen transition properly.
More specifically, a screen transition how it's showed in this video.
The example is shown when the video reaches 4 minutes and 37 seconds (more or less).
https://www.youtube.com/watch?v=XksUf7DOHWE

At the top of my head, I image this is like the background was split halfway to separate the center of the image. So to have a left and right sides of the background separated. Then move them to the corresponding edge of the screen, so the left side moves to the left edge and vice versa for the right side. So it is like an "opened window" transition of the screen. But I am not pretty sure how to do this properly? (roll)
Could anyone give me some good advice on how to do this so far?

8
Good Evening to all Agser.

Recently I had an issue but I am not sure how to solve it at the moment.
I am using a plugin "agsjoy" by Wyz with Ags 3.2.1.
Lately I have done a savestate with a joystick plugged into the pc.
But after closing the game and removing the joystick from the pc, when I am about to load the game I get this message.
I think I know what it's going on but I am not sure how can I avoid it into the script?

An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x62151082 ; program pointer is +2051, ACI version 3.21.1115, gtags (123,2)



9
Beginners' Technical Questions / Ags3D
« on: 22 Jun 2017, 09:35 »
Hello guys,

For a testing purpose I would like to make a room in three-dimension that could be freely navigated.
So, in an old folder of an archive I found this Module "Ags3d" by Steve McCrea.
In the document description (Which I do not have) it said to use the plugin "Ags3d.dll" in combination with the module.
But after importing both (module and plugin) I can't compile the game because I get some errors.
Within the module there are some functions declaration that appear to be not inside the plugin so far.

// undefined token
Ags3d_SetEditorCursorSprite(slot);
Ags3d_SetCharacterY(c.ID, y);
Ags3d_SetObjectY(o.ID, y);
Ags3d_SetPrimPhysics(i, enable);

Ags3d_SetLightPosition(x, y, z); // not enough parametrs in call to function

Ags3d_SetLightAmbientValue(a);
Ags3d_SetPhysics(enable);
Ags3d_PushFromCamera(force);


When I commented out these functions then I could compile the game again.
So it seems like I have an oldest version of the plugin maybe?
Did any of you have a problem like this with the module and plugin?


Also regarding this thread: http://www.adventuregamestudio.co.uk/forums/index.php?topic=44821.msg599658#msg599658
There isn't any "AddLight(Ags3d_LightType type);" function in the module. It seems like it is replaced with "SetLightPosition" instead.
I can't get the zip file includes the module, plugin, and documentation because all the links seems to be dead.
http://www.adventuregamestudio.co.uk/forums/index.php?topic=29419.0
Without documentation I can't understand how things should work so far.


Any of you know how to fix the problem or do any of you have an updated version of the plugin maybe?
I am not pretty sure what's going on and what I need to make it work properly.


Lately, I have done some reearch and I found also this thread by DKH:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=41581.0
It would seem a good alternative to use but all the links seems to be dead as usual.

Any kind of help might be important, so I thank you in advance.

10
Hello guys,

So, I am getting a little stuck on making something pretty simple (it's regarding Dynamic Sprite and Drawing Surface, as usual)
For a testing purpose, I have a Gui with some sliders that handle parameters such as r, g, b, s, l.
Anytime that a slider change I am setting the "SetAmbientTint" with those parameters.
Since now it's working all great, then I have a Dynamic Sprite that create from background and a Drawing Surface that allows me to manipulate it.
So I could make a fully Ambient tint that work also for the room background.
The problem is that anytime I change the slider value the Dynamic Sprite overlaps with the oldest one.
So how can I do that whenever the slider changes erases the old sprite to create a new one?
As I mentioned early it sound like something very simple.

11
Beginners' Technical Questions / Black Manual[SOLVED]
« on: 23 Apr 2017, 11:08 »
Hello guys,

I don't know what I have done recently but now when I try to open the manual inside the Ags editor it's showing in this way. :(



Have any of you ever had such a problem?
If so how did you get it back as it was before?

12
Editor Development / Buttons animate
« on: 18 Jan 2017, 14:26 »
Hello, good evening to all AGSer.

I am not sure if this is the right place where I should post this pseudo question.
I don't understand why (Characters and Objects) have the "Animating" command since they could use the command "Animate"
And buttons doesn't have any "Animating" command... since they could use the command "Animate" like Characters and Objects ? So my main question is why buttons doesn't have this property ?
How to check exactly if a button is animating ?
Also, why buttons doesn't have the "Frame" property ?
This is very frustrating anytime.

I'm sorry in advance if these questions have already been asked.

13
Advanced Technical Forum / Walking distance
« on: 30 Jul 2016, 15:35 »
Good Evening to all AGSer.

I am trying to build a statistic which refers to how much distance the player walks in the game.
I'd like to show you how roughly might seem the script but I hope someone can suggest me what is the best way to achieve something like this (roll)
Code: Adventure Game Studio
  1. //GLOBAL VARIABLES
  2. String measure, dis;
  3.  
  4. int /*float*/ steps, // use for tracking the steps performed
  5.               steps_counter; // use for tracking the next goal
  6.  
  7.  
  8. function AddValue (int value) {steps_counter += value;} // ...
  9.  
  10.  
  11. function TrackingSteps()
  12. {
  13.    if (steps >= steps_counter) // steps value has just reach his goal
  14.    {
  15.       AddValue( ); // might be a costant one...
  16.      
  17.  
  18.       // check measure to display
  19.       if (steps < 1250) {measure = "Meters";}
  20.       else
  21.       {
  22.         if (steps < 2000) {measure = "Km";}
  23.         else {measure = "Miles";}
  24.       }
  25.    }  
  26.  
  27.   dis = String.Format("Walking Distance : %d %s", steps, measure);
  28. }

Thank you in advance for the time held to read :)
Somehow, I am not sure why this is posted in the Advanced Tech :)

14
Beginners' Technical Questions / Custom Inventory
« on: 24 Jun 2016, 00:31 »
Good Evening to all AGSer :)

I'm trying to write something approximately simple but I'm having some difficulty.
I hope someone can help me out in the free time.

I love how AGS handle the selected inventory graphic for the mouse cursor anytime you click on a item.
I have an InventoryWindow with some little boxes where is placed the items that you collect.

This is what I'd like to do :

A) Anytime you click the item, the cursor graphic change to the current item graphic that you select.
B) After you select that item the box will look empty
C) If you click on the empty box the item return to the box and the mouse cursor change to the default one

Do you know what is the best way to do that ?

Thank you very much in advance :)

15
Beginners' Technical Questions / Phantasmagoria Interface
« on: 22 Jun 2016, 01:06 »
Good evening to all AGSer.

I'd like to ask you if there is a way to run a video in a 'windowed' mode ?
or better to say, there is a way to have an interface like Phantasmagoria 1 in Ags ?
I'd like to run a video but keep the interface at the bottom of the screen constantly.. (roll)
Some of you know how to do that ?
I notice that when you play a video it take all the screen (anyway) to play it  (roll)

16
Beginners' Technical Questions / Char color
« on: 24 Nov 2015, 12:34 »
Good evening to all AGSer !!!

Since there is not a section below the beginning area, I will post it here.
I would like to ask you if there is a way to choose a single char from a label text and being able to change its single color.

Example :
Code: Adventure Game Studio
  1. String text = "This is a String text";

I would love to get all the 't' or all the 'i' to be in a different color in that text.
Any of you know the right approach to use to get this to work ?

Grazie mille in advance.

17
Beginners' Technical Questions / Mouse Buttons
« on: 31 Oct 2015, 17:35 »
Good evening to all AGSer,

I recently bought a new mouse and it has five buttons instead of the classics two or three.
I was trying to map the last two buttons but I can't find a way to make them recognizable to Ags.
When I use the last two buttons they work like (page next and page previous)
Someone know how to do that or if it is possible to do that ?

Grazie mille in advance.

18
Beginners' Technical Questions / Billiard table physics
« on: 04 Oct 2015, 19:25 »
I have been trying to implement a billiard table into my game but I am having a few problems with the actual physics of the table and balls.
I have been trying to move the balls with a variable speed for x and y for the ball objects but I can't seem to find a good way of stopping them when they collide with another ball or edges of the table.
Also, I am having trouble with the rebound directions the balls take when they collide with the edges of the table or the other balls.
I have tried many different ways of achieving the physics, or the feel of actual physics, in my billiard game I seem to be unable to make it all work how I would like.
If anyone could help me to start building a physics engine for my billiard game, then I would be most grateful. :)

Grazie mille

19
Beginners' Technical Questions / Deleting Sprite [SOLVED]
« on: 13 Feb 2015, 10:18 »
Hello guys,

I don't know where to write this thought so I will write down here below...
I think some of you will feel bored reading this and I'm feel sorry already.

When we generate a DynamicSprite by
- DynamicSprite.CreateFromFile(string filename)
- DynamicSprite.CreateFromScreenShot(optional int width, optional int height)
- Etc etc

This command loads an extra sprite into memory which is not controlled by the normal AGS sprite cache and will not be automatically disposed of. Therefore, when you are finished with the image you MUST call Delete on it to free its memory

DynamicSprite.Delete();
You do not normally need to delete sprites, since the AGS Sprite Cache manages loading and deleting sprites automatically.
However, when an extra sprite has been loaded into the game then AGS does not delete it automatically, and you must call this command instead.


So I generate a DynamicSprite inside a room and I have also a button that quit the game.
(Yes, I think some of you have already figured out what I'm about to say)
But when i quit the game,
Ags create for me a textual warning by saying that the DynamicSprite has never deleted.
I have something like this (and actually doesn't solve the problem)
Code: Adventure Game Studio
  1. function btnQuitGame_Click(GUIControl *control, MouseButton button)
  2. {
  3.   if (MyDynamicSprite != null)
  4.   {
  5.     MyDynamicSprite.Delete();
  6.     // MyDynamicSprite = null (?)
  7.    }
  8.   QuitGame(0);
  9. }


How do you guys generally solve this kind of error ?
Any help is appreciated..

Ps: I don't have any module imported inside
(I'm running with 3.2.1)

However..
This is what I have
Code: Adventure Game Studio
  1. // MyDynamicSprite (Global variables)
  2.  
  3. function repeatedly_execute_always()
  4. {
  5.  
  6.   ViewFrame *v = Game.GetViewFrame(player.View, player.Loop, player.Frame);
  7.   int s = v.Graphic;
  8.  
  9.   MyDynamicSprite = DynamicSprite.CreateFromExistingSprite(s);
  10.   oObject.Graphic = MyDynamicSprite.Graphic;
  11.  
  12. }


Ciao grazie :~(

20
Beginners' Technical Questions / add value
« on: 16 Nov 2014, 17:56 »
Good evening to all AGSer folks.

For the reason that there's not a forum below the beginner section, i will post it here.
I already found a million threads in the forum about this.
But i dunno why still doesn't work,
the evidence sometimes makes bad jokes.
Can someone please enlighten me ? :-\

i simply need to add a value from an integer to another integer.

Code: Adventure Game Studio
  1. // 'Mechanics' ASH Script
  2.  
  3. enum eItems
  4. {
  5.   Chips // potato chips
  6. };
  7.  
  8.  
  9. struct Main_Player
  10. {
  11.   float inv_weight;
  12.   short health, money;
  13.   bool IsDead;
  14. };
  15.  
  16. struct Items
  17. {
  18.   String name, type;
  19.   float weight;
  20.   short index, count, recover_energy, sprite;
  21.   bool IsCookable;
  22. };
  23.  
  24.  
  25. //
  26. import function init_item();
  27.  
  28.  
  29. // import section
  30. import Items oggetto[1000];
  31. import Main_Player protagonista;
  32.  
  33.  
  34.  
  35. // 'Mechanics' ASC Script
  36. Main_Player protagonista;
  37. Items oggetto[1000];
  38. export oggetto, protagonista; // the export section is at the very end...
  39.  
  40. function init_item()
  41. {
  42.   /////////////////////////////////// POTATO CHIPS
  43.   oggetto[Chips].index = Chips;
  44.   oggetto[Chips].sprite = 71; // POTATO CHIPS
  45.   oggetto[Chips].type = "Food";
  46.   oggetto[Chips].name = "Potato Chips";
  47.   oggetto[Chips].recover_energy = 5;
  48.   oggetto[Chips].IsCookable = false;
  49.   oggetto[Chips].weight = 0.5;
  50.   oggetto[Chips].count = 1;
  51. }
  52.  
  53.  
  54. // 'GlobalScript' ASC Script
  55. Main_Player protagonista;
  56. Items oggetto[1000];
  57. export oggetto, protagonista; //
  58.  
  59. function game_start()
  60. {
  61.   init_item(); // calling this work
  62.  
  63.   // Set Up Player // This part too
  64.   protagonista.health = 90; // testing chips
  65.   protagonista.inv_weight = 5.5;
  66.   protagonista.IsDead = false;
  67.   protagonista.money = 0;
  68. }
  69.  
  70.  
  71. function Repeatedly_execute()
  72. {
  73.   GUIControl *c = GUIControl.GetAtScreenXY(mouse.x, mouse.y); // not used yet
  74.   GUI *g = GUI.GetAtScreenXY(mouse.x, mouse.y);
  75.   if (g == gLifeBar)
  76.   { LabelDescription.Text = String.Format("Health %d %", protagonista.health); }
  77.   else
  78.   {
  79.     Labeldescription.Text = "";
  80.     Label *l = gDescription.Controls[0].AsLabel;
  81.   }
  82. }
  83.  
  84. // use inventory on main character
  85. function cCharacter_UseInv()
  86. {
  87.     if (mouse.IsButtonDown(eMouseLeft))
  88.     {
  89.       if (player.ActiveInventory == iChips && protagonista.health < 100)
  90.       {
  91.         protagonista.health += oggetto[Chips].recover_energy; // <---- this doesn't work.
  92.         // player.SayBackground("Nice chips");
  93.         player.ActiveInventory = null;
  94.       }
  95.       else if (player.ActiveInventory == iChips && protagonista.health > 95)
  96.       {
  97.         // player.SayBackground("I am full");
  98.         player.ActiveInventory = null;
  99.       }
  100.     }
  101.   }
  102. }
  103.  


basically, in this room test, there is nothing apart of this piece of script..

:EDIT: yes, and i added the function Repeatedly_execute just after the game_start for tasting the label.

Pages: [1] 2