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

#601
you can try to search this section on the manual : GetAtScreenXY (inventory)

Returns the inventory item at SCREEN co-ordinates (X,Y).

Code: ags

InventoryItem *item = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
if (item == null) {
  Display("No inventory item at the mouse co-ordinates");
}
else {
  Display("Inventory item number %d at the mouse.", item.ID);
}
#602
Ciao LargoLagrande ! :)

Cercando di registrarmi sul forum  ho riscontrato questo messaggio svariate volte :

There is an error (n. 10) with the registration. Contact the webmaster, thanks.

#603
OH, Khris you did it !
I just saw this fixing right now ! Thank you very much !
#604
Thanks SpeechCenter For Showing.
I'll Watch Them Both About Now.
#605
oh, I was understanding very wrong.
I am sorry, i need to try this for more.

Thanks Ghost For Answering.
#606
Thanks Crimson Wizard for answering.
In this game i should do a translation only for one language, Italian.
So the new line should be written earlier than the original ?

Code: ags

//Example
InventoryItem *item = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
if (mouse.Mode == eModeUseinv)
{
    if (item.IsInteractionAvailable(eModeUseinv))
    {
      item.RunInteraction(eModeUseinv);
    }
    else
    {
      player.ActiveInventory = null;
      player.Think("(They Won't Work Together)");	
    }
}
#607
Okay I see
After generate the translation file,
it can be chosen within the game or it can be selected only via winsetup ?
#608
Thanks selmiak for answering.
I would like to translate one of the game that I did before.
I think I understand.
What do you mean exactly with generate a translation file ?



#609
Beginners' Technical Questions / Translating
Mon 31/03/2014 22:50:13
Good Evening To All AGSer,

I Have Another Umpteenth Question For You...
For Me It Is The First Time I'd Love To Do A Translation In AGS.

How Can I Implement A Translation ?!
Could Someone Suggest Me How To Do That ?
Or, Could Someone Give Me A Practical Example ?!

Thanks In Advance Guys, :)
Ciao Khris
#610
Hi Khris ! The Link About Your 3D Rain Demo Seems To Be Broken...
I Wish I Could See That... How Could I ?
#611
Beginners' Technical Questions / Re: Warnings
Sun 12/01/2014 19:52:14
Thanks, Thanks A Lot For The Help !
It Is An Error About The Releasing View, That I Can Understand It
#612
Beginners' Technical Questions / Re: Warnings
Sun 12/01/2014 19:28:17
Hello NickyNyce Thanks For Answering !
Do You Mean When You Animate A View ?!
I Am More Than Sure I Done So In This Way...
As Example :

Code: ags

  if (mouse.IsButtonDown(eMouseRight))
  {   
    player.StopMoving(); 
    cMercenario.LockView(2);
    cMercenario.Animate(2, 5, eOnce, eNoBlock, eForwards);
    Ammo -=1;
    cMercenario.UnlockView();
  }
#613
I Always Prefer Png AnyHow :)
#614
Beginners' Technical Questions / Warnings
Sun 12/01/2014 19:01:56
Good Evening To All AGSer !
I Have A Question To Ask You Again...
In My Folder Game There's A Text Document Where It Says That There Is An Error...


(in room 1): Warning: ChangeCharacterView was used while the view was fixed - call ReleaseCharView first


Someone Know How To Fix This ?!


Post Scriptum (Actually, In My Game, I Cannot See This Kind Of Error...) :-X 
#615
This Is Awesome Bernie ! :)
Actually,
I'm Using Your Method To Perform A Gravity Jumping :cool:
I Have A Question About This...

So Far This Implementation Work Great!
But When I Reach The End Of The Line...
Player Fall To Underground (And I Can't See Him Anymore) :)
How Should I Solve This ?
Player Should Stop His Movements Rather Than Fall
Any Kind Of Inspiration Is Very Welcome :(
#616
Performing A Jump Form

header:
// header
Code: ags


struct str_keys {
  eKeyCode Jump;
  eKeyCode Up;
  eKeyCode Left;
  eKeyCode Right;
  eKeyCode Down;
};

import str_keys keys;


main script:
Code: ags

str_keys keys;
export keys;

float px, py, pz, pmx, pmy, pmz;

void game_start() {
  keys.Jump = eKeySpace;
  keys.Up = eKeyW;
  keys.Left = eKeyA;
  keys.Right = eKeyD;
  keys.Down = eKeyS;
  
  px = 160.0;
  py = 160.0;
}

float gravity = -0.5;
bool on_ground = true;

#define sideways 2.0
#define updown 1.0

int frame_timer;

void repeatedly_execute() {
  
  bool walking = true;
  
  if (on_ground) {
    if (IsKeyPressed(keys.Jump)) {
      pmz = 8.0;  // jump force
      on_ground = false;
    }
    pmx = 0.0;
    pmy = 0.0;
    if (IsKeyPressed(keys.Up)) pmy -= updown;
    if (IsKeyPressed(keys.Left)) pmx -= sideways;
    if (IsKeyPressed(keys.Right)) pmx += sideways;      
    if (IsKeyPressed(keys.Down)) pmy += updown;
    if (pmx == 0.0 && pmy == 0.0) walking = false;
  }
  else {  // in the air
    pmz += gravity;    // gravity changes z vector
  }
  
  int x = FloatToInt(px + pmx, eRoundNearest)-GetViewportX();
  int y = FloatToInt(py + pmy, eRoundNearest)-GetViewportY();
  if (GetWalkableAreaAt(x, y)) {
    px += pmx;
    py += pmy;
  }
  pz += pmz;
  if (pz <= 0.0) {
    pz = 0.0;
    on_ground = true;
  }
  player.x = FloatToInt(px, eRoundNearest);
  player.y = FloatToInt(py, eRoundNearest);
  player.z = FloatToInt(pz, eRoundNearest);
  
  if (pmx < 0.0) {
    if (pmy < 0.0) player.Loop = 7;
    else if (pmy == 0.0) player.Loop = 1;
    else player.Loop = 6;
  }
  else if (pmx == 0.0) {
    if (pmy < 0.0) player.Loop = 3;
    else if (pmy > 0.0) player.Loop = 0;
  }
  else {
    if (pmy < 0.0) player.Loop = 5;
    else if (pmy == 0.0) player.Loop = 2;
    else player.Loop = 4;
  }
  
  frame_timer++;
  
  if (frame_timer >= player.AnimationSpeed - 1) {  
  frame_timer = 0;
    int f = player.Frame;
    if (on_ground) {
      if (walking) {
        f++;
        if (f >= Game.GetFrameCountForLoop(player.NormalView, player.Loop)) f = 1;
      }
      else f = 0;
    }
    player.Frame = f;
  }
}


I Tried Lately To Add A New Walkable Area In The Room (Like An Above Platform To Reach)
But Jumping On It, I Can Not Reach It In Anyhow

So The Intention Was,
How Or Where I Should GetWalkableAreaAt To The New Walkable Area To Reach/Stand ?
#617
Best Devotion,

Thanks Khris,

It Work Perfectly now (nod)


#618
Hello Again Guys.. I Feel Sorry Anytime to trouble you :-X
I Tried Out Lately The Khris Method For Regions, It Work Excellently
Also Scaling With The cMarker.z, it Work Amazing..
But..
The Marker follow the player, cMarker.FollowCharacter(player, 0, 0);
But DON'T So Exactly How I Wish For...
Instead..
If I Use cMarker.FollowCharacter(player, FOLLOW_EXACTLY); Then It's Good...
But Can't Scaling The cMarker.z Then ?
Cause he'll FOLLOW_EXACTLY the player.x and player.y :~(
#619
Amazing ! :-D Very Happy ! :-D
Thanks Ghost for helping  ;)

Khris,
You Are The Saviour. This is well-known!

Cheers!, Hurrah! :-D
#620
Beginners' Technical Questions / Draw A Marker
Sat 16/11/2013 16:17:43
how can i place a marker over the players head, to mark an interactable location and make it as the marker follow
exactly the player head when he stand on region ?
also, how to make that marker animated anytime he stand on region ?
i am not so sure if it must be an object or a Gui ?!
SMF spam blocked by CleanTalk