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

Topics - Vincent

#41
Beginners' Technical Questions / Char color
Tue 24/11/2015 12:34:47
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: ags

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.
#42
Beginners' Technical Questions / Mouse Buttons
Sat 31/10/2015 17:35:54
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.
#43
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
#44
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
1° - DynamicSprite.CreateFromFile(string filename)
2° - DynamicSprite.CreateFromScreenShot(optional int width, optional int height)
3° - 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: ags

function btnQuitGame_Click(GUIControl *control, MouseButton button) 
{
  if (MyDynamicSprite != null) 
  {
    MyDynamicSprite.Delete();
    // MyDynamicSprite = null (?)
   }
  QuitGame(0);
}



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: ags

// MyDynamicSprite (Global variables)

function repeatedly_execute_always()
{

  ViewFrame *v = Game.GetViewFrame(player.View, player.Loop, player.Frame);
  int s = v.Graphic;

  MyDynamicSprite = DynamicSprite.CreateFromExistingSprite(s);
  oObject.Graphic = MyDynamicSprite.Graphic;

}



Ciao grazie :~(
#45
Beginners' Technical Questions / add value
Sun 16/11/2014 17:56:15
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: ags

// 'Mechanics' ASH Script

enum eItems
{
  Chips // potato chips
};


struct Main_Player
{
  float inv_weight;
  short health, money;
  bool IsDead;
};

struct Items 
{
  String name, type;
  float weight;
  short index, count, recover_energy, sprite;
  bool IsCookable;
};


// 
import function init_item();


// import section
import Items oggetto[1000];
import Main_Player protagonista; 



// 'Mechanics' ASC Script
Main_Player protagonista;
Items oggetto[1000];
export oggetto, protagonista; // the export section is at the very end...

function init_item()
{
  /////////////////////////////////// POTATO CHIPS
  oggetto[Chips].index = Chips; 
  oggetto[Chips].sprite = 71; // POTATO CHIPS
  oggetto[Chips].type = "Food";
  oggetto[Chips].name = "Potato Chips";
  oggetto[Chips].recover_energy = 5;
  oggetto[Chips].IsCookable = false;
  oggetto[Chips].weight = 0.5;
  oggetto[Chips].count = 1;
} 


// 'GlobalScript' ASC Script
Main_Player protagonista;
Items oggetto[1000];
export oggetto, protagonista; // 

function game_start() 
{
  init_item(); // calling this work 

  // Set Up Player // This part too
  protagonista.health = 90; // testing chips
  protagonista.inv_weight = 5.5;
  protagonista.IsDead = false;
  protagonista.money = 0;
}


function Repeatedly_execute()
{
  GUIControl *c = GUIControl.GetAtScreenXY(mouse.x, mouse.y); // not used yet
  GUI *g = GUI.GetAtScreenXY(mouse.x, mouse.y);
  if (g == gLifeBar)
  { LabelDescription.Text = String.Format("Health %d %", protagonista.health); }
  else 
  {
    Labeldescription.Text = "";
    Label *l = gDescription.Controls[0].AsLabel;
  }
}

// use inventory on main character
function cCharacter_UseInv()
{
    if (mouse.IsButtonDown(eMouseLeft))
    {
      if (player.ActiveInventory == iChips && protagonista.health < 100)
      {
        protagonista.health += oggetto[Chips].recover_energy; // <---- this doesn't work.
        // player.SayBackground("Nice chips");
        player.ActiveInventory = null;
      }
      else if (player.ActiveInventory == iChips && protagonista.health > 95)
      {
        // player.SayBackground("I am full");
        player.ActiveInventory = null;
      }
    } 
  }
}



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.
#46
Beginners' Technical Questions / Tiredness
Mon 10/11/2014 21:08:00
Good evening to all AGSer.

I was building a function that is used to calculate the tiredness of the main character when he tries to perform a run.
And to calculate the opposite, when he is not moving (so that can recover his energy).
I can get everything working except for one step.
gRunToolbar change his graphic so quickly.
I tried out different ways but i can't make it work as i wish (slowly)
Someone could help me out here ? I have something like this.

Code: ags


bool ModeWalk, ModeRun;
int tiredness, time = -1; // time that detain the player is not moving

function Update_Runtoolbar()
{
  if (ModeRun && player.Moving) // running
  {
    tiredness += 1;
    if (tiredness >= 30 && gRunToolbar.BackgroundGraphic == 56) gRunGraphic.BackgroundGraphic = 57; // start growing
    // etc etc
  }
  else 
  {
    if (!player.Moving && tiredness >= 10) // should mean that he was running before...
    {
      time += 1;
      if (time >= 40) 
      {
        int time_recover = 0; 
        while(time_recover <= 30)
        {
          time_recover ++; // start recover energy
          // here is the problem, too much quickly change graphic. 
          // i tried lately here to put a SetTimer... but with no lucky at all
          if (gRunToolbar.BackgroundGraphic == 57 && IsTimerExpired(1)) // i though a timer was the ideal here
          // but doesn't work...
            { gRunToolbar.BackgroundGraphic = 56; } // go back the graphic for recover
          // etc etc
          tiredness -= 1;
        }
          if (tiredness < 29) time = 0; time_recover = 0; // send everything to back
      }
    } 
  }
} 



Why the SetTimer does not work for what I'm trying to do ? :-\
It's very likely that I'm doing it in worst way possible.
I am aware of...
#47
Hello guys, good evening to all.

I was wondering to know if it is possible to change the border color of an list box via script...

Thanks in advance.
#48
I have a custom text box.
Where the player can type anything or almost.
The player can type also save or load. The player have only one slot to save his state.

the custom textbox, on activate, have a call function like this.

Code: ags

function TxtBox_OnActivate(GUIControl *control)
{
  process_console();
}


The function process_console work more or less like this.

Code: ags

if (command.StartsWith("save")
{
  SaveGameSlot(1, "saved game");
}

if (command.StartsWith("load")
{
  RestoreGameSlot(1);
}


It work everything good exept of this error after closing the window game.
Error: DeleteSprite: Attempted to free static sprite 103 that was not loaded by the script.

I opened a different thread with the same error that i got yesterday, and i dunno how to solve this..
Someone can suggest me, anything.. ?! may be could be helpful for me...

ps: i'm not using any Dynamic sprite, Drawing surface, overlay, changeview/unlock view commands.
I just upload some sprites in the sprite editor until the 102 sprite.
And the message error say attempted to free static sprite 103 that doesn't exist.
So what he is trying to doing with that ?

I'm doing something wrong when i save / load ?!
#49
Beginners' Technical Questions / File To Open
Sat 11/10/2014 01:05:02
Hello guys, good evening to all.

I got an error message by Ags after closing the window game.
I have two custom functions Save/Load that works good so far in game, 
and other two functions that reads files.

Code: ags

function saveStartTime() 
{
  File* output = File.Open("saved game.dat", eFileWrite);
  if (output != null) {
  DateTime* dt = DateTime.Now;
  int starting_time = dt.RawTime;
  output.WriteInt(starting_time);
  output.Close();
  }    
}

function readStartTime() 
{
  int starting_time = 0;
  File* output = File.Open("saved game.dat", eFileRead);
  if (output != null) {
    starting_time = output.ReadInt();
    output.Close();
  }
  return starting_time;
}

/////////////////////////////////////////////////////
function SaveGame()
{
  saveStartTime();
  SaveGameSlot(1, "Salva");
}


function LoadGame()
{
  readStartTime();
  RestoreGameSlot(1);
}


The error message say :

An error has occured. Please contact the game author for support, as this is likely to be a scripting error and not a bug in AGS. (ACI version 3.21.1115)

Error: DeleteSprite: Attempted to free static sprite 103 (that doesn't exist in my sprite manager) that was not loaded by the script.

I didn't use any DynamicSprite, DrawingSurface command at the moment, the room is almost empty..
Someone know how to solve this ?
#50
Beginners' Technical Questions / X-offset
Tue 30/09/2014 17:55:01
Good Evening To All Agser,

Noob Question, As Usual.

I re-searched the forum about this question, and I found a lot of answers about.
I searched in the manual also and I focused the solution.
But I'm not managing to make it work at all. GetViewportX ()
If mouse move to right or left side 'of the screen' and left click mouse is pushed,
if facing right player can shoot with his gun, and viceversa.
In a Room of 640x480, it's okay.
Now, i changed the room in a 2500x800, and i can't make it to work at all.

Here's the code that i have now :

Code: ags

void on_mouse_click (MouseButton button) 
{
  ///////////////// Right Side /////////////////////
  if (button == eMouseLeft && FacingRight) 
  {
    if (mouse.x > player.x) //640x480 it's okay here
    {
    Fire(true, false); //right
    }
  }
  ///////////////// Left Side /////////////////////
  if (button == eMouseLeft && FacingLeft)
  {
    if (mouse.x < player.x ) //640x480 it's okay here
    {
    Fire(false, true); //left
    }
  }
}


I hope for anyone who knows how to do here.
above all, I hope no one is offended by reading this post..
#51
Good Evening To All AGSer.

I have a terrible script that should be cleaned up quite a bit.
I just wrote an idea of what I would do... and apparently works well...
It's what I would do, but when I run the battle, my pc go in slow motion..
I certainly know because the script is not very readable in itself.
This happens to me quite often when I put a function repeatedly.

Code: ags

int time, firstcounter,  secondcounter, thirdcounter, fourcounter, fivecounter, sixcounter, sevencounter, eightcounter, 
    ninecounter, tencounter;

bool pushed, released;

Enemy Monster[8];

function ShowTargetGUI()
{
  GUIControl *theControl = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
  gTarget.Visible = true;
  if (theControl == ButtonPush && mouse.IsButtonDown(eMouseLeft) && pushed) //button pushed
  { 
    int i = 0;
    while (i<NumeriCasuali(4, 6)){ time ++; i++;}          
    if (time > 5) { gTarget.BackgroundGraphic = 3; firstcounter = NumeriCasuali(1, 5);  }
    //why if i use 'else if' doesn't work ?!
    if (time > 15) { gTarget.BackgroundGraphic = 4; secondcounter = NumeriCasuali(6, 15); }
    if (time > 30) { gTarget.BackgroundGraphic = 5; thirdcounter = NumeriCasuali(16, 30); }
    if (time > 45) { gTarget.BackgroundGraphic = 6; fourcounter = NumeriCasuali(31, 45); }
    if (time > 60) { gTarget.BackgroundGraphic = 7; fivecounter = NumeriCasuali(46, 55); }
    if (time > 75) { gTarget.BackgroundGraphic = 8; sixcounter = NumeriCasuali(56, 70); }
    if (time > 90) { gTarget.BackgroundGraphic = 9; sevencounter = NumeriCasuali(71, 85); }
    if (time > 100) { gTarget.BackgroundGraphic = 10; eightcounter = NumeriCasuali(86, 90); }
    if (time > 110) { gTarget.BackgroundGraphic = 11; ninecounter = NumeriCasuali(91, 100); }
    if (time > 120) { gTarget.BackgroundGraphic = 12; tencounter = NumeriCasuali(101, 115); }
    
    if (time > 125) // (TIME OUT) IF STILL BUTTON PUSHED
    { 
      //Enemy RECOVER ENERGY
      if (Monster[1].ID[1] == cChar.ID && Monster[1].hp < 499) Monster[1].hp += 30;  
      // here 'else if' is okay
      else if (Monster[2].ID[2] == cChar2.ID && Monster[2].hp < 699) Monster[2].hp += 30; 
      else if (Monster[3].ID[3] == cChar3.ID && Monster[3].hp < 899) Monster[3].hp += 30; 
      else if (Monster[4].ID[4] == cChar4.ID && Monster[4].hp < 1099) Monster[4].hp += 30;
      else if (Monster[5].ID[5] == cChar5.ID && Monster[5].hp < 1299) Monster[5].hp += 30;
      else if (Monster[6].ID[6] == cChar6.ID && Monster[6].hp < 1499) Monster[6].hp += 30;
      else if (Monster[7].ID[7] == cChar7.ID && Monster[7].hp < 2499) Monster[7].hp += 30;

      pushed = false;
      Labelcounter.Text = " Time's up"; //time's up
      Labelhit.Text = "You Failed";
      cJack.Animate(1, 2, eOnce, eNoBlock, eForwards);
      gTarget.BackgroundGraphic = 2; //turn to normal graphic 
      time = 0; 
    } 
      SetTimer(1, 30); 
  }
   else if (released)
   { 
     //LOW HIT
     if (time > 5)  
     { cJack.Animate(1, 2, eOnce, eNoBlock, eForwards); 
       Labelcounter.Text = String.Format("%d %", firstcounter); Labelhit.Text = "Low Hit"; }
     if (time > 15) 
     { Labelcounter.Text = String.Format("%d %", secondcounter); Labelhit.Text = "Low Hit"; }
     if (time > 30) 
     { Labelcounter.Text = String.Format("%d %", thirdcounter); Labelhit.Text = "Low Hit"; }
     
     //MEDIUM HIT
     if (time > 45) 
     { Labelcounter.Text = String.Format("%d %", fourcounter); Labelhit.Text = "Medium Hit"; }
     if (time > 60) 
     { Labelcounter.Text = String.Format("%d %", fivecounter); Labelhit.Text = "Medium Hit"; }
     if (time > 75) 
     { Labelcounter.Text = String.Format("%d %", sixcounter); Labelhit.Text = "Medium Hit"; }
     
     //HIGH HIT
     if (time > 90) 
     { Labelcounter.Text = String.Format("%d %", sevencounter); Labelhit.Text = "High Hit";  }
     if (time > 100)
     { Labelcounter.Text = String.Format("%d %", eightcounter); Labelhit.Text = "High Hit"; }
     //super hit
     if (time > 110)
     { Labelcounter.Text = String.Format("%d %", ninecounter); Labelhit.Text = "Super Hit"; }
     
     //CRITICAL HIT
     if (time > 120)
     { Labelcounter.Text = String.Format("%d %", tencounter); Labelhit.Text = "Critical Hit"; }
     
     //TIME OUT IF BUTTON IS RELEASED
     if (time > 125)
     {
      Labelcounter.Text = "Time Out";
      Labelhit.Text = "You Failed"; 
      gTarget.BackgroundGraphic = 2;
      time = 0;      
     }
     time = 0;
   }
   Labelinfo.Text = String.Format("%d", time); 
}

function Battaglia()
{
  countingDown=true; //check if the 'timer battle' is expired or not 

  if (Monster[1].ID[1] == cChar.ID)
  { 
  if (!mouse.IsButtonDown(eMouseLeft) ) //a pseudo - released performance 
    { 
      if (gTarget.BackgroundGraphic == 3) Monster[1].hp -= firstcounter;  
      else if (gTarget.BackgroundGraphic == 4) Monster[1].hp -= secondcounter;
      else if (gTarget.BackgroundGraphic == 5) Monster[1].hp -= thirdcounter;
      else if (gTarget.BackgroundGraphic == 6) Monster[1].hp -= fourcounter;
      else if (gTarget.BackgroundGraphic == 7) Monster[1].hp -= fivecounter;
      else if (gTarget.BackgroundGraphic == 8) Monster[1].hp -= sixcounter;
      else if (gTarget.BackgroundGraphic == 9) Monster[1].hp -= sevencounter;
      else if (gTarget.BackgroundGraphic == 10) Monster[1].hp -= eightcounter;
      else if (gTarget.BackgroundGraphic == 11) Monster[1].hp -= ninecounter;
      else if (gTarget.BackgroundGraphic == 12) Monster[1].hp -= tencounter;
      else if (ButtonExtra.NormalGraphic == 68) TEMPO -= 5; //else if 'button failed' is visible >>> timer battle go down -5
    }
 }


function room_RepExec()
{
    if (InitBattle ) //boolean go true by click a button, boolean go false by hp enemy <= 0
  { ShowTargetGUI(); Battaglia(); }
}


void on_event (EventType event, int data) 
{
  GUIControl*gc = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
  Button*b;
  if (gc != null) b = gc.AsButton;
  
  if (event == eEventEnterRoomBeforeFadein) 
  { mouse.Visible = false; Labelcounter.Text = ""; Labelhit.Text = ""; b = ButtonPush; }

   ////////////// PUSHED BUTTON /////////////////////////////////////////
  else if (event == eEventGUIMouseDown && b != null )
  {
    //Display("pushed");
    pushed = true; 
    Labelcounter.Text = "";
    ButtonExtra.Visible = false;
    //ButtonExtra.X = 12;
    Labelhit.Text = "";
    released = false;
  }
  ////////////// RELEASED BUTTON //////////////////////////////////////
  else if (event == eEventGUIMouseUp && b != null )
  {
    //Display("REL");
    SetTimer(1, 30); 
    pushed = false; 
    released = true;
    gTarget.BackgroundGraphic = 2;
    }
}



Someone could help me to clean up this terrible script ? ,(
and thanks in advance for your patience, also for reading this message post...

coordial greetings
#52
Good evening to all AGSer.
I can feel a slight fright in asking this silly question and I apologize in ahead for this has been asked.
Because it looks so basic notion.

Referring to the (Random Function) into the manual says:
Returns a random number between 0 and MAX.
NOTE: The range returned is inclusive - ie. if you do Random(3); then it can return 0, 1, 2 or 3.

So the question was;
How do i do a random function that never return 0 ?
ie. if i do Random(3); then it can return 1, 2 or 3.

Still deeply sorry for asking this, thanks guys in advance.
#53
Advanced Technical Forum / Taschenlampe
Mon 23/06/2014 11:45:06
Good morning to all Agser!
I have a gGui2 with his graphic that match with a DynamicSprite to get the screen totally black..
Secondly, i draw a circle at the foot of the character to fill a part of the black screen..
just like in the picture :



Thirdly, i draw a rectangle to improvise a stream of light that follow the circle distance..
like this :



I'm here to ask for an opinion from all of you,
now my intention are as follow : how can I tilt the rectangle when the mouse goes above or below ?
I edited the picture for you to notice what I would do :



Could someone help me with this ?
For all eventualities, I will post the code here

Code: ags

DynamicSprite *dark;

int lightx[220], 
    lighty[220], 
    radius[220];
 
int count;
export count;

void Light(int i, int x, int y, int r) 
{
  lightx[i] = x; 
  lighty[i] = y; 
  radius[i] = r;
}
 
function Darkness() 
{
 dark = DynamicSprite.Create(System.ViewportWidth, System.ViewportHeight);
 
 DrawingSurface *surface = dark.GetDrawingSurface();
 DrawingSurface *surface2 = dark.GetDrawingSurface();
 
 surface.Clear(0); 
 surface.DrawingColor = COLOR_TRANSPARENT;
 
 surface2.Clear(0); 
 surface2.DrawingColor = COLOR_TRANSPARENT;
 
 int x1 = GetViewportX();
 int y2 = GetViewportY();
 
 int i = 0;
 while (i < count) {
    if (right) surface.DrawCircle(lightx[i] - x1, lighty[i] - y2, radius[i]);
    i++;
  }

 if (right) surface.DrawCircle(mouse.x+3, mouse.y - y2 - 40, 90); 
 
 else if (left)  surface.DrawCircle(mouse.x-3, mouse.y - y2 -40, 90);

 surface2.DrawRectangle(mouse.x, player.y-70, player.x+5, 70- player.BlockingWidth+150);
  
 surface.Release();
 surface2.Release();

 gGui2.BackgroundGraphic = dark.Graphic;
}


Thanks to all of you who are reading the message
#54
Good evening to all Agser!
I received this strange message after building the game

(in room 1): Dynamic sprite 97 was never deleted

I'm pretty sure I've called the delete command to free its memory after use it
But can't understand how to solve this warning
#55
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
#56
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 
#57
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 ?
#58
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