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 - fratello Manu

#21
Hi everyone!

I need to set/change characters "z-order" at run-time ... basically, I need a "char.BringToFront" function, useful to switch which character is on front if overlapping

Thanks!
#22
Hi!
Good job, it works!
I also had to set the character's .BlockingHeight to obtain the proper blocking

Thanks!
#23
Nice!  :cheesy:  (laugh)
#24
Quote from: eri0o on Wed 24/02/2021 11:35:23

So it seems the obvious way would be to give an API for you to pass the desired bouding boxes to use, and you would do this every frame, before calling controlz. As a bonus this gives... Erh... Control as to what the size of the collision box should be which can be useful - the solid box from AGS is known for being quite... Inflexible.

If this seems alright I can add.

thank everyone.

I tried setting at game start the Character.BlockingWidth and BlockingHeight for each character (e.g. 40 x 40) but nothing seems to change.
I tried enabling the mouse cursor and I confirm you that in that way all is working. So maybe the solution is in changing something in Controlz, as you suggest...

HAve a nice day

#25
It works!  :wink:
Awesome!
thanks!
#26
Hi,

here the screenshots of the area and of the walkable areas:





the character has a small rectangle not-walkable area.

thanks!
bye
#27
Hi!

I'm using your module and enjoying it!

But I have a problem: it seems not to play sound related to walking frames. I assigned a step sound to some frames and usually this way I can hear sounds.
If I move the character with arrow keys, I can't hear any sound. But if I move him from script (or via mouse click as well, but my game won't be mouse-controlled) using the .Walk() method, sound is correctly played

thanks!
Bye!
Manu
#28
I made a short video to let you understand the problem.

Both characters are solid (girl and spider), but it's not working (overlapping and walking-through)

Movement is handled by arrow keys

Thanks!

#29
Quote from: Khris on Tue 16/02/2021 13:48:28
Can you be more specific about your setup?

Characters being solid means that they have a rectangle around their feet that cuts a hole out of the walkable areas.
AreThingsOverlapping on the other hand is a 2D test of the character's bounding rectangles.

Is this a top-down game?

Also, you can press Ctrl-A during the game to see the walkable areas.

Thanks
I understand, but it doesn't seem to work. I expected the "hole" in walkable area around the character's feet, but it doesn't seem to be there at all (player can "cross" the NPC and overlap him)

I didn't catch what you mean with "top-down" game; if you mean if there's some vertical scrolling, yes, there is

bye!thanks
#30
Quote from: Matti on Tue 16/02/2021 13:34:56
I guess the player.Walk command is blocking? Have you tried putting that code in repeatedly_execute_always?

Hi, I put it into the repeat function of the room (for testing). Then I'll put it in the repeatedly_execute_always
#31
Hi everyone!

I need to avoid characters overlapping.
I thought it was enough to set all characters as "solid" but overlapping still occurs.

So I tried to make a function to stop characters movement (e.g. player) if "colliding" with npc's area:


Code: ags
  if(AreThingsOverlapping(player.ID, cNpc.ID)==true)
  {
    player.StopMoving();
  }


...but nothing changes.

Is there a way to do this?

Thanks!
#32
Hi everyone!

I'm trying to cycle all inventory items to set their "description" (so actually its "Name", in code)
I think I'm doing something wrong comparing the objects:

Code: ags
// for every inv: assigning name
function CompileInvNames()
{
  int ic = 0;
  
  while(ic<Game.InventoryItemCount) 
  {
      ic++;
      inventory[ic].Name = GetInvName(inventory[ic]);
   }
}


and the called function is:

Code: ags
String GetInvName(InventoryItem* inv)
{

  switch(inv)
  {
    case iMyInventory1:
      return "This is the name for iMyInventory1";
    
    case iMyInventory2:
      return "This is the name for iMyInventory2";
      
    // etc......
  }
}


...where iMyInventory1 is the object itself, so the "name" in AGS editor.

What I'm doing wrong?

Thanks!
#33
I was already doing like that... so I found out that the error was somewhere else!!!
thanks!
#34
Hi everyone!

I can't find a working way , from script (no mouse clicks anywhere, things will happen by typing commands, parser-style) , to do something like:

- use iKey (which is in my inventory) on Hotspot1, or
- use iKey on Object1, or
- use iKey on Character1, or
- use iKey on iOtherInventoryWhichIOwn.

I know I have to deal with RunInteraction and eModeUseWith, but I can't understand in which event, with which syntax.... etc

Thanks!!! :wink:
#35
Beginners' Technical Questions / Global Enum?
Wed 03/02/2021 10:13:51
Hi everyone!

is there a way to declare a "global" enum?

Something like...

enum eMyEnum
{
  None = 0,
  FirstValue = 1,
  SecondValue = 2
}

being able to access the values (not numbers but values) from all scripts (including rooms scripts)

Thanks!
#36
Amazing!! thanks!
#37
Hi everyone! I couldn't find an answer... I need to iterate all elements of current room, to display their descriptions somewhere.
I'd like to do this for every character, object and hotspot (let's pretend, to display names in a Label)

So I need something like:

Code: ags
String result = "this room contains: ";

for (every hotspot in room.hotspots)
{
  result = result.Append(hotspot.Description);
  result = result.Append(", ");
}

for (every character in room.characters)
{
  result = result.Append(character.RealName);
  result = result.Append(", ");
}

for (every object in room.objects)
{
  result = result.Append(object.Description);
  result = result.Append(", ");
}


Does someone know if there's a way to do this?

Thanks!
Have a nice day
#38
Hi everyone!
is it possible to get somewhere this TextInv v1.0 template?

Bye!
#39
Ok, I found a nice alternative: SpeechBubble!

Anyone please already implemented the ThinkBubble method?

Thanks!
#40
Beginners' Technical Questions / Phylactere?
Tue 29/12/2020 14:11:53
Hi everyone!
Could someone give me a working Phylactere module download link?
Thanks!
bye!
SMF spam blocked by CleanTalk