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

#61
I'm very much happy to see the emergence of this topic.
To bless this newest thread I have a report to do just now.

Currently the buttons lack about these essential properties :

A) readonly bool Button.Animating
B) int Button.Frame
C) int Button.Loop
#62
Okay CW, it's all working like a charm !!! :D
I really much appreciate for your help, really. :)

Now the file.tra can translate String inside an array as well.
I only had to change :
Code: ags

LabelMsg1.Say(String.Format("%s", MessageToSay[0])); 


to this : (by always keeping the translation in the file text)
Code: ags

String translated_message = GetTranslation(MessageToSay[0]);
LabelMsg1.Say(String.Format("%s", translated_message)); 


Both of the way I run the game (English or not) the String get read just properly fine.

Anyhow, I still have to revisit all of scipts in this way.
But I don't care because I am really much HAPPY that I got it to work, finally. :)
With this approach it will save me a lot of time for sure.

Many thanks again CW :)
#63
Thank you CW for the quickly answer.
I must need to try this further now, then I will be right back here again and let you know. :)
#64
Good evening to all AGSer.

This is much interesting to know.
I didn't knew (since a couple of minute ago) that the file.tra doesn't translate any String inside an array. (roll)
In other hand, I should revisit all of my scripts and to do something like this.

Code: ags

if (Game.TranslationFilename != "English") {MessageToSay[0] = "Ciao, come stai ?";}
else {MessageToSay[0] = "Hello, how are you ?";}


I wish I could ask you for confirmation on this issue before changing further the source code.
Thanks in advance.
#65
I am sorry to review this *old post again.
But I think I had found another small issue.
I can actually keep walking in any direction in diagonal as well.
But when we are running, we can't actually move to the DOWN-RIGHT side (roll)
Can you confirm this kind of issue in your free time ?

Thank you in advance 

[EDITED]
My mistake only, it's everything work perfectly.
#66
OH, Khris you did it !
I just saw this fixing right now ! Thank you very much !
#67
well yeah... if i hide the HandleMovement();
it's just like the module is beign cutted off
and not any purpose then
with some trick //
i can join both together very nice..
as example
in room 1 i can trigger a gravity jump
and walking/running the player in diagonal
also while walking in a new high platform.
(with Alt Keyboard Movement is simply Amazing)
(not that's the same from the standard module KeyboardMovement using with the gravity jump)
#region then, are usefull for setting limits to the player
player.IsStandingOnRegion(1) { player.PlaceOnWalkableArea();}
and will not fall to underground
It's actually good stuff together


the description you did it's exactly what i wish for
probably i should give a global timer that animate the idle view taking out from modules
something like
in GlobalScript.ash
#define TIMER_IDLE_VIEW  1
in GlobalScript.asc
function IDLE_VIEW() {
if (!KeyboardMovement.Animating() && was_animating) { SetTimer(TIMER_IDLE_VIEW, 160); }

if (IsTimerExpired(TIMER_IDLE_VIEW))
{
// animate the idle view avoid Alt KeyboardMovement Loops ,
// if keyboard is animating then, normal view/walking
// How Khris could you do something alike to do the trick ?
// i wish you could help me with this
}

#68
Well, I'm also using a gravity jump module that it work nice
Maybe cause contrast with it

Code: ags


// Original module 'Platform Movement v0.01a' Author: Bernie 

// Overhauled By VinVin




//===================================================================
//This extension is actually more like an experiment 
//and only allows customized controls through direct module code editing. 
//It demonstrates a simple way of coding a platform gravity jump.
//A quick explanation of the module's values:
//if gravity is lower than 0, it makes the character go up. The lower, the faster. 
//If it's greater, the character moves down, the greater, the faster.
//xmove behaves the same way, only on the x axis. 
//below zero is left, above zero is right.
//===================================================================







void repeatedly_execute() {
  
  
int a;
while ((gravity>0)&&(a < gravity)){ if (GetWalkableAreaAt(player.x-GetViewportX(),player.y-GetViewportY())==0) {player.y=player.y +1;} 
//1 down if no walkable area found
a=a+1;
}

int b;
while ((gravity<0)&&(b > gravity)){ if (GetWalkableAreaAt(player.x-GetViewportX(),player.y-GetViewportY())==0) {player.y=player.y -1;} 
//1 up if no walkable area found above
b=b-1;
}




//===================================================================
//managing movement values and gravity--
//===================================================================
if (gravity < 6) {gravity=gravity+1;}
if ((IsKeyPressed(377)==1)&&(xmove<1)) {xmove=xmove+1;}//right
if ((IsKeyPressed(375)==1)&&(xmove>-1)) {xmove=xmove-1;}//left
if ((IsKeyPressed(375)==0)&&(IsKeyPressed(377)==0)&&(xmove<1)) {xmove=xmove+1;}//right
if ((IsKeyPressed(375)==0)&&(IsKeyPressed(377)==0)&&(xmove>-1)) {xmove=xmove-1;}//left
if (((IsKeyPressed(375)==0 && IsKeyPressed(380)==0 && IsKeyPressed(377)==0 && xmove>0 ))) {xmove=xmove-1;}
if (((IsKeyPressed(375)==0 && IsKeyPressed(380)==0 && IsKeyPressed(377)==0 && xmove<0 ))) {xmove=xmove+1;}

//===================================================================






//===================================================================
//diagonal stuff--
//===================================================================
if ((IsKeyPressed(372)==1) || IsKeyPressed(32)==1){ 
if (GetWalkableAreaAt(player.x-GetViewportX(),player.y-GetViewportY())>0) {player.y=player.y-1;}
player.y=player.y+2;
//===================================================================






//===================================================================
//jump----------------------------------
//===================================================================
if (GetWalkableAreaAt(player.x-GetViewportX(),player.y-GetViewportY())==1) {gravity=-20;}  // jump
player.y=player.y-2;
}
//===================================================================


if ((player.View==13 && (IsKeyPressed(372)==1))){
player.ManualScaling=true;
player.Scaling=150;
player.LockView(5);
}
if (IsKeyPressed(372) && IsKeyPressed(eKeyDownArrow)){
  player.PlaceOnWalkableArea();
}



//===================================================================
//left and right 
//uses the same logic as moving up and down 
//but has additional checks so uneven terrain won't cause problems
//right---------------------------------
//===================================================================
int d;

while ((xmove>0)&&(d < xmove)){

player.x=player.x+1;
if (GetWalkableAreaAt(player.x-GetViewportX(),player.y-GetViewportY())==0) {player.x=player.x+1;}
player.x=player.x-1;

player.x=player.x+1;
//int check=0;


if (GetWalkableAreaAt(player.x-GetViewportX(),player.y-GetViewportY())>0) {check_gravity=1;}
player.y=player.y+1;
if ((GetWalkableAreaAt(player.x-GetViewportX(),player.y-GetViewportY())==0)&&(check_gravity==1)) {player.y=player.y+1;}
player.y=player.y-1;
   

 d=d+1;
}




//===================================================================
//left---------------------------------
//===================================================================
int c;
while ((xmove<0)&&(c > xmove)){



player.x=player.x+1;
if (GetWalkableAreaAt(player.x-GetViewportX(),player.y-GetViewportY())==0) {player.x=player.x-1;}
player.x=player.x-1;

player.x=player.x-1;
//int check=0;


if (GetWalkableAreaAt(player.x-GetViewportX(),player.y-GetViewportY())>0) {check_gravity=1;}
player.y=player.y+1;
if ((GetWalkableAreaAt(player.x-GetViewportX(),player.y-GetViewportY())==0)&&(check_gravity==1)) {player.y=player.y-1;}
player.y=player.y-1;

 
 c=c-1;
  }

}

#69
Firstly, Thanks So Much Khris For Your Respond, Very Appreciated !!! :-D

I'm Not So Sure Where I Should Put The KeyboardMovement.SetIdleView(int view, int delay) line...
I Put It In The game_start section firstly...

Code: ags


#sectionstart game_start  // DO NOT EDIT OR REMOVE THIS LINE
function game_start() {
KeyboardMovement.SetMovementKeys(eKMMovementArrowKeys);
Game.SpeechFont=eFontFont3;
player.SetWalkSpeed(5, 5);
cCkid.SetWalkSpeed(7, 7);
SetBackgroundFrame(0);
srSetSnowAmount(700);
srSetWindSpeed(9);
cCkid.FaceLocation(1, 192);
cCkid.ManualScaling=true;
cCkid.Scaling=107;
cCkid.Transparency=100;
BtnarmorEquip.Visible=false;
eShadow.Disable(player);
SmoothScroll_ScrollingOn();
SmoothScroll_PxOn();
KeyboardMovement.SetIdleView(7, 0);
}
#sectionend game_start  // DO NOT EDIT OR REMOVE THIS LINE


Then, I Move It In The Section repeatedly_execute()
or in the repeatedly_execute_always()
But
He Still Loop The Idle View... 
(Maybe Cause My idleview delay was to 0 ) ?!
When I Put The IdleView Delay To 40... well... nothing will happen ! =(

The Trouble is not when it start the idle view...
But it's that he loop the idle view very very much...
Maybe there is a contrast with The void HandleMovement() ?
I Tried To Hide //HandleMovement() and it work good...
But then the character don't use anymore the walkview...
Just like he Move (as example player.move)
#70
I Love This Module so much !  It Is Pretty Much Perfect ! Thank You Khris For Exist :)

May I should move this topic to beginning area...
I'm Having Hard Times to set the  KeyboardMovement.SetIdleView(int view, int delay);
When I do that, my Player set the idleview for an instant, then, he start to Loop the Idle view...

I'm trying to figure out the latest sentence

Code: ags

void repeatedly_execute() {

  if (Enabled) HandleMovement();

  if (IdleView == 0) IdleView = player.IdleView;
  if (KeyboardMovement.Animating() && !was_animating) player.SetIdleView(-1, 0);
  if (!KeyboardMovement.Animating() && was_animating) player.SetIdleView(IdleView, IdleDelay);
  was_animating = KeyboardMovement.Animating();

} 

SMF spam blocked by CleanTalk