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

#1
I promised myself I wouldn't write anymore but here I am, I present to you the problem, I'm trying to build a jigsaw puzzle, I can get the piece in the cursor but I can't drop it, where do you think I'm going wrong?? here is the code


script on puzzle piece (as a Gui button)
Code: ags
function pP1_OnClick(GUIControl *control, MouseButton button)
{
if (puzzle1_pezzo_selezionato == 0){
  mouse.ChangeModeGraphic((mouse.Mode),134);
  pP1.Visible= false;
  puzzle1_pezzo_selezionato= 1;
}
}



and the left click script below (just the puzzle part)

Code: ags

   if (puzzle1_pezzo_selezionato != 0 && gPuzzle1.Visible == true) {
    
    int mousex = mouse.x;
    int mousey = mouse.y;
    
    if (puzzle1_pezzo_selezionato == 1) {
        
        pP1.SetPosition(mousex, mousey);
        pP1.Visible = true;
        
       
        mouse.ChangeModeGraphic(eModePointer, 0);  // Assicurati che '0' sia il graphic ID del puntatore standard
        
        puzzle1_pezzo_selezionato = 0;
    }
}



Thank you for your help

Dam


edit:

puzzle1_pezzoselezionato means puzzle 1 selected piece
 wich i ha ve defined with starting value 0
#2
I apologize if I was insistent! Even though I've known Ags for a long time, I've never really used it, I've just played around with it in my free time, but now I think it's time to study its potential carefully.

Thank you again
#3
ok all is goinng as i wish but how to drop back objects with the same button?
#4
i marked as true "Override built-in inventory window click handling" and i'm trying the run the code you suggested but
"if (button==eMouseLeftInv)" does nothing in my code


Code: ags
 function on_mouse_click(MouseButton button) {
  // called when a mouse button is clicked. button is either LEFT or RIGHT
  if (IsGamePaused() == 1) {
    // Game is paused, so do nothing (ie. don't allow mouse click)
  }
  else if (button == eMouseLeft) {


Room.ProcessClick(mouse.x, mouse.y, mouse.Mode);
if (button==eMouseLeftInv){
     // inventory[game.inv_activated].RunInteraction(mouse.Mode);

  cXeno.Say("qualcosa triggera");
  
  }}




it's not my intent to not follow your suggestions.. just trying to interpretate in code
#5
nothing at all, i looked all the forum but nothing seems to respond... i share the code

Code: ags


// called when a mouse button is clicked
function on_mouse_click(MouseButton button)
{
  if (IsGamePaused())
  {
    // game is paused, so do nothing (i.e. don't process mouse clicks)
  }
  else if (button == eMouseLeft)
  {
     if (mouse.Mode==eMouseLeftInv) {
  
  inventory[game.inv_activated].RunInteraction(mouse.Mode);
  
  
  
  
  }
    
    
    
    // left-click, so try using the current mouse cursor mode at this position
    Room.ProcessClick(mouse.x, mouse.y, mouse.Mode);
  }
  else if (button == eMouseRight)
  {
    // right-click, so cycle the mouse cursor mode
    mouse.SelectNextMode();
  }
}






edit:

the problem is it seems do not recognize the inv gui
#6
Ok i got the point, ill try what you suggest! Thank you!
#7
Please, as i wrote on title i need this check, because my script doesnot seem to respond to any iteraction on inventory object..
Im using a black project and a custom pop up inventory
. thank you

Dam
#8
i solved the issue:

i forgot to change mouse.mode hovering the character..

Thank you all guys
#9
I'm trying to code a script that by clicking on character2, it becomes the player...
I set character2 to be clickable and set the script to anyclick (for now) and it doesn't seem to do anything, so the player is always character1
#10
Hello guys,

i'm trying to test my "player change" but i cannot see the error:


i want change player character everytime i click on another  npc is this feasible?
something like this:

Code: ags
 


function cKubik_AnyClick(Character *theCharacter, CursorMode mode)
{
cKubik.SetAsPlayer();
}



Thank you friends!
#11
i solved the issue as you suggested,

i'm using the empty project as a base for my project

thank you!
#12
Hi everyone, a lot of time has passed and I've picked up Ags again...
but let's get to the heart of the matter:

I'm setting up a first person game so I'm not using graphics for my characters, but a system of two inventories with one slot each, when for example I take an object with my left hand, I add the object to the inventory (and to the character ) on the left, and so on the right... the problem arises when I do a cEgo say, in fact the gui shows little black squares above... what could be the problem?
#13
Hello Y'all

I'm the eternal noob, but i've never used Ags to create something like this, it's my first attempt... So i Ask:

Wich starting template to use if i want a simple tumbleweed park like game with custom actions?

I saw that there's lot of code to customize to just set correctly the interface witm my custom action isn't it?

Do you suggst me Tumbleweed park template or another template? Thank you!

Here the gui i'd use:

https://ibb.co/mhPV3Wd

As you can see there are only few actions
#14
Engine Development / Re: AGS engine Web port
Wed 24/11/2021 07:46:45
i'm having some issue, can't run my project html, i think is the size (beyond 300 mb) it run when i try on github...

wich files have to include in my_game_files.js? in the array there are just the.ags and cfg file
thank you in advance

Edit:
i noticed that brand new compiled game doesn't run..
#15
sorry for necroposting but the link to the player is broken.. can anybody give me a valid link?
thx you! :wink: :wink:
#16
Ops.. i mean "Run" anyway is the green triangle icon!
when i press it, the editor gives me the message:

<< Loading game failed with error:
Not an Ags main game file or unsupported format..
the game file may be incomplete, corrupt or from unsupported version of AGS>>

Thank you for your response :)

If you check wine hq and look at ags page you can see that 3.4.0 the editor was very runnable through wine, maybe some component was added since than
#17
maybe i've not explained myself very well...

i'd want to click on test and try my project, but actually the only viable method is to build it,

hope you can help me
#18
Any advice to how to test my project without building everytime?

i can install successfully the editor on playonlinux, everithing is ok but the test mode

using 3.5.1 p4 AGS editor version  on playonlinux on ubuntu 20.04

Thank you!
#19
AGS Games in Production / Re: Strangeland
Fri 16/04/2021 06:33:22
can't wait to purchase it!! it's a lot of time i'm waiting for this project been released!
#20
yes it seems i can compile and run games!
SMF spam blocked by CleanTalk