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

#401
Ahh, reminds me of my n00b days. Games with no screenshots in the WIP thread, Unnecessary  text formats, Mouthing off to mods and asking for help at the same time... :D

The forums have completely changed me I think.

OK, on topic, I'd have to say Kirota. It wasn't the worst, but really the most annoying.

"Can I have the code and I need the whole code not 3 codes or 2 codes and I need to know where this goes so can you tell me how to do it??????"

Here's a link.

And another one.
#402
We got hail too. It covered our huge driveway, and pretty much everything else, and then it was gone in less than 5 minutes.
#403
General Discussion / Re: Windows Vista SUCKS
Mon 09/07/2007 20:33:41
Go with Linux. Over and out.  :D
#404
General Discussion / Re: Hey nerds!!
Mon 09/07/2007 20:31:00
Cool, welcome back! I'm still waiting on Gift of Aldora!

Quote from: ProgZmax on Mon 09/07/2007 06:08:39
I wouldn't want to work at Konami these days anyway...have they even made a decent game in the last ten years?

Silent Hill games are wicked, Metal Gear Solid games rock...
#405
Beginners' Technical Questions / Re: AI Games
Mon 09/07/2007 20:26:29
It probably won't run on the newest version of AGS.

Quote
Note : there is a state machine module existing somewhere; i remember it confused an admin a lot because he didn't know of what use it could be...

This won't run on the newest AGS either; I've already tried.
#406
Nice psuedo code Gilbot.

I know the project is hard, and it seems unfit for me, but I really want to become more flexible with AGS. I don't want to start at Game Maker; I already have once, and I don't like GM at all. I have made simpler games (unreleased of course) along the lines of non-adventure. I even made my own RPG.

I understand what you were saying about the enum. I see that all I needed was to change a few lines. I was almost on the right track!  ;)

EDIT: It also works now!
#407
Bump.

I'm having a problem now. I thought that this would work, but it obviously isn't.

I used this bit of code I wrote myself:

Code: ags

enum Keyboard_Direction{
  eKeyboard_Direction_Left, 
  eKeyboard_Direction_Right, 
  };

int Keyboard_DirectionLeft = 375; //left arrow
int Keyboard_DirectionRight = 377; //right arrow

function Attack(char){
  
  if (IsKeyPressed(89) == 1){
    
    cEgo.LockView(2);
    
    if (Keyboard_DirectionRight){
      
      cEgo.Animate(2,3,eOnce,eBlock);
      cEgo.UnlockView();
  }
  
    if(Keyboard_DirectionLeft){
      
      cEgo.Animate(1,3,eOnce,eBlock);
      cEgo.UnlockView();
  }
  
}

  else { 

			return;
}

}


As you can see, it's for an attack animation. Now I'm not sure how this works, but I used some enum, thinking it would store the character's current direction. I think thats totally wrong :D. I need to have the direction that the character is facing to be stored, so I can check to see which loop to play (left or right) in the attack animation. Am I supposed to define the directions? Am I even close?
#408
Then stop steering us away.

Not to sound like a mod, but maybe this is getting out of hand?
#409
Quote from: Uku on Fri 06/07/2007 18:13:52
Like what???

Considering the game is called Crackwell Legacy.... well I'll let you figure it out.
#410
But it's the thought that counts. You think a fat kid feels good when someone calls him fat, or by any of the other abundant fat terms? Oh yeah, it's just a word though right?


#411
OK, thanks. There's some code somewhere in the module that can help with that.
#412
Thank you so much Scorpiorus! I was working on that for too long. My way was working, until I did something.

Also, I added a bit to the //up code clock. It just makes it so that if someone tries to jump up into something with a walkable area, it gets the player character's y-40, so it stops if EGO's head reaches a walkable area.
#413
Another double post, sorry!

I finally got it. I have a workaround that works perfectly. Thanks for the help guys.

EDIT: OK, apparently that workaround isn't working now.
#414
Quote from: Gilbot V7000a on Thu 05/07/2007 12:40:54
I'm not in good condition to read the whole thing, but since the keyboard detection codes (i.e. "movement codes") are in repeatedly_execute() already, can you just stop the character's animation when no key is pressed ?

That sounds like a good idea.

EDIT: Well, I think I got it!

I put this:

//managing movement values and gravity--

if (gravity < 6) {gravity=gravity+1;}

if ((IsKeyPressed(375)==0)&&(xmove>-3)&&(player.Animating == true)) {cEgo.Animate(1, 3, eOnce, eNoBlock);}
if ((IsKeyPressed(375)==1)&&(xmove>-3)) {xmove=xmove-1;}
if ((IsKeyPressed(377)==1)&&(xmove<3)) {xmove=xmove+1;}

if ((IsKeyPressed(375)==0)&&(IsKeyPressed(377)==0)&&(xmove>0)) {xmove=xmove-1;}

if ((IsKeyPressed(375)==0)&&(IsKeyPressed(377)==0)&&(xmove<0)) {xmove=xmove+1;}


And this:


function on_key_press(int keycode){
 
if (player.Animating == false){ player.Animate(1, 3, eRepeat,eNoBlock);}

 

}


But this only works for one direction... I just realized that! Damn it...
#415
Sorry for double posting. My last post was a bit crowded.

I found a way, but it isn't quite working.

In the module's script, at the end, under function on_key_press, I put the animation code. It works, but setting it to repeat just makes him animate forever, and setting it to once doesn't animate him enough.
#416
General Discussion / Re: Forum banners
Thu 05/07/2007 11:29:24
Also, the Games Showcase could get a little update. Maybe have Sydney Finds Employment and The Infinity String, or something.
#417
Wow, I never thought of that Scorpiorus. I'll try my hand at it, seeing as how I'm a little accustomed to not sleeping (its 6:00 AM here!!)

I'll post back if I need some guidance.

EDIT: Hmm, doesn't seem to work. The game gets stuck in a loop I think.

Here:

Code: ags

// Main script for module 'Platform Movement v0.01a'

int gravity;
int xmove;

function game_start() {
  // called when the game starts, before the first room is loaded
}

function repeatedly_execute() {
  // put anything you want to happen every game cycle here

//down----------------------------------
int a;
while ((gravity>0)&&(a < gravity)){

 cEgo.y=cEgo.y+1; //move one down
 if (GetWalkableAreaAt(cEgo.x-GetViewportX(),cEgo.y-GetViewportY())==0) {cEgo.y=cEgo.y+1;} //1 down if no walkable area found
 cEgo.y=cEgo.y-1; //move one up

  a=a+1;
}

//up------------------------------------
int b;
while ((gravity<0)&&(b > gravity)){

 cEgo.y=cEgo.y-1; //move one up
 if (GetWalkableAreaAt(cEgo.x-GetViewportX(),cEgo.y-GetViewportY())==0) {cEgo.y=cEgo.y-1;} //1 up if no walkable area found abovw
 cEgo.y=cEgo.y+1; //move one down

  b=b-1;
}


//left and right (uses the same logic as moving up and down but has additional checks so uneven terrain won't cause problems)

//left----------------------------------

int c;
while ((xmove<0)&&(c > xmove)){
 
  

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

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

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

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


//right---------------------------------

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

 cEgo.x=cEgo.x+1;

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

 cEgo.x=cEgo.x+1;

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


 d=d+1;
}


//diagonal stuff------------------------

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


//managing movement values and gravity--

if (gravity < 6) {gravity=gravity+1;}

if ((IsKeyPressed(375)==1)&&(xmove>-3)) {
 if (player.Animating == false){
player.Animate(1,eNoBlock) //1 is default view
}
xmove=xmove-1;}

if ((IsKeyPressed(377)==1)&&(xmove<3)) {xmove=xmove+1;}

if ((IsKeyPressed(375)==0)&&(IsKeyPressed(377)==0)&&(xmove>0)) {xmove=xmove-1;}

if ((IsKeyPressed(375)==0)&&(IsKeyPressed(377)==0)&&(xmove<0)) {xmove=xmove+1;}

//jump----------------------------------

if (IsKeyPressed(32)==1){
 cEgo.y=cEgo.y+2;
 if (GetWalkableAreaAt(cEgo.x-GetViewportX(),cEgo.y-GetViewportY())==1) {gravity=-12;}  // jump
 cEgo.y=cEgo.y-2;
}


}

function on_key_press(int keycode){

}




Look in the managing movement values and gravity code block. I added it there because thats where it checks for key press. In the //left code block, there is a while loop, so I thought that it wouldn't be good to put it there. Same goes for the //right code block portion.
#418
I guess thats commonplace for Hammerite.  :=
#419
Well what happens is that when I use the left and right arrows to move, no animation plays while walking. I can walk, but the character doesn't animate. This is before jumping too, so I don't think its a problem with the jump code.

Scorpiorus- Here's a link
#420
OK, I'm using Bernie's Simple Platform Movement, which is great by the way, but it has something that I don't like very much.

When I move the character, the character doesn't animate. I've looked through the module's script, and I didn't find anything that relates to the character's view.

I think it has to do with this particular code block:

Code: ags

//managing movement values and gravity--

if (gravity < 6) {gravity=gravity+1;}

if ((IsKeyPressed(375)==1)&&(xmove>-3)) {xmove=xmove-1;}
if ((IsKeyPressed(377)==1)&&(xmove<3)) {xmove=xmove+1;}

if ((IsKeyPressed(375)==0)&&(IsKeyPressed(377)==0)&&(xmove>0)) {xmove=xmove-1;}

if ((IsKeyPressed(375)==0)&&(IsKeyPressed(377)==0)&&(xmove<0)) {xmove=xmove+1;}

//jump----------------------------------

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


}

function on_key_press(int keycode){

}




xmove is an int by the way. I don't understand why it doesn't animate the character. Any help is appreciated.

R4L

SMF spam blocked by CleanTalk