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

#21
Hi

after looking at things i decided that all I needed was to divert some keyboard keys (Arrows and Esc) and they only apply to 1 room so the below script seems to be more appropriate.

Code: ags

		
}


//ARROW KEYS DIVERT (GLOBAL)
 
 
 if(player.Room==2)
 if (keycode == eKeyRightArrow) 

{
	 cfighter1a.Walk(1227, 79, eBlock, eAnywhere);
 
 
 }
		
 
 if(player.Room==2)
 if (keycode == eKeyLeftArrow ) 

{
	 cfighter1a.Walk(1227, 79, eBlock, eAnywhere);
 
 
 }
		
 
 if (player.Room==2)
 if (keycode == eKeyDownArrow ) 

{
	 
  cfighter1a.Walk(1227, 79, eBlock, eAnywhere);
	 
 }
		
 
 if (player.Room==2)
 if (keycode == eKeyUpArrow) 

{
	  
  cfighter1a.Walk(1227, 79, eBlock, eAnywhere);
	 
	 
	 }
		
 
 if (player.Room==2)
 if (keycode == eKeyEscape ) 

{
	 
   gPanel.Visible=false;
   Display("You can't view control panel just now");
   cfighter1a.Walk(1227, 79, eBlock, eAnywhere);

 }
 
 //END ARROW KEYS
 


Thanks for your help anyway

cheers

barefoot


#22
Cheers a lot guys I'll give it a whirl  :=

barefoot


#23
Hi

Somewhere, I am sure, though can't seem to find it in the manual or here, there was Disable keyboard command.

The reason is because I do not want any keyboard action at certain points in the game. So turn off/turn on keyboard is what I am looking for.

eKeyboardMovement ?

I will go through keyboard scripts see if i can see anything.

I'm sure this is a noob question sorry.

barefoot




#24
Snake, I believe

Quote
DS_Store (Desktop Services Store) is a hidden file created by Apple Inc.'s Mac OS X operating ... Although these files were primarily used by the Finder.....

barefoot

#25
Tweeked and works well...


:=

Code: ags


function repeatedly_execute_always() 

{
	
	int height, speed, y = cfighter1a.y;
  
  if (y <= 99)
  {
    speed = 400;
    height = 700;
		
		}
  else if (y <= 150)
  {
    speed = 300;
    height = 500;
  }
  else if (y <= 209)   
  {   
    speed = 200;
    height = 300;
		
		
		 }
  else if (y <= 220)   
  {   
    speed = 100;
    height = 200;
		
		
  }
  else                    
  {                    
    speed = 0;
    height = 0;
  }

  Lspeed.Text = String.Format("Speed: %d mph", speed);
  Lheight.Text = String.Format("%d feet", height);
	
  
	 }


Cheers for your assistance again Khris

barefoot


#26
Thank you Khris

Edit: seems to work ok. Needs small tweeking. Will report back.

Looking at: height = player.y * 2;

---------------------------------------------

Sorry about code...  and again, thanks for your reply.

As far as it goes it does relate to the position of the main player (plane) which can only move up and down. As player moves up or down so the height and speed labels change.

I will try what you have put. Thanks also to Arj0n.

cheers  :=

barefoot




#27
Hi

EDIT: I guess I'm trying to determine if player y is between int and int then show this TEXT on labels.

IE (y from top) 200/170  Display this, 170/140 Display this, 140/100 Display this, 100/70 Display this,


It's if player between y ints that the problem.

Hope you understand.

-----------------------------

I'm trying to make a global so that whatever the players y is will determine Labels text
IE Lheight: 400 feet / Lspeed: 300 mph.

I would like the screen split up into say 4 horizontal lines, each will display Lheight and Lspeed Labels with appropriate text depending on y.

I am using regions to do this but fails when with an eBlock.

So far I have this but need help beacause it's not quite enough.

In Global:
Code: ags

function repeatedly_execute_always() 

{
  
	  if (cfighter1a.y >  99) 
{
  Lheight.Text="0 feet";
	Lspeed.Text="0 mph";
	
	{
		
		
	 if (cfighter1a.y <=  219) 
{
  Lheight.Text="500 feet";
	Lspeed.Text="300 mph";
}
		
		
	  if (cfighter1a.y < 209) 
{
  Lheight.Text="300 feet";
		Lspeed.Text="200 mph";

	
	}
		
		
	  if (cfighter1a.y <=  99) 
{
  Lheight.Text="0 feet";
		Lspeed.Text="0 mph";

}
 
}
	
}}


Also trying to STOP firing missile continuously when key is pressed.
Tried Game.DoOnceOnly but this does not stop the firing. If key is pressed action happens only once until released and pressed again.

Can you help please

barefoot

#28
Sorry Arj0n, life's a bitch....

I had the same problem with a game a while back...

I now do a backup copy every time i make changes..

Good luck

:=

barefoot


#29
I've had this sort of thing before.

Quote from Khris:

In your game folder is a file called "Game.agf.bak". Rename it to "Game.agf", overwriting the existing one in the process. That should fix it.

(In case the files are named "Game" and "Game.agf", open the folder settings and turn off the option that hides known extensions.)

#30
Not as far as I know.

if you have say 4 rooms to import(4 re-numbered rooms) then i think you have to do them 1 at a time.

I know with some programs you can use ctrl to select more than 1 but i've never tried with AGS.

barefoot



#31
Hood = Bonnet (Car)
Fanny = Ass
Gas = Petrol (Diesel)

check out:

http://www.translatebritish.com/reverse.php

http://www.translatebritish.com/index.php



:=

barefoot


#32
Hi Monkey

I did not realise that without a background image the room default background template is 320x200 and i'm using 320x240.

Once I did select an image for the background things were ok. 

I then put an identical image  (1000x240 which is an object) as background image on the top and have it scrolling left to simulate background movement (sky.. There are no animating frames.) other objects move as per background to also simulate movement via paths.

In other words its a type of side scrolling game.


thanks for the knowledge monkey

:=

barefoot



#33
Hi

SOLVED: I forgot to include a background picture as well as the object background.  ::)
-----------------------------------------------------------------

Not sure if this is the right place but here goes..

I created Room 4 as normal (320 x 240). It is set up as other rooms.

I started the snow/rain plugin.. Room 4 now has a black strip across the top and bottom!

I took out all plugin code but Room 4 still the same.

Room 4 only has only 1 object which is a scrolling background.

Anyone know possible causes/remedy?

cheers

barefoot



#34
Hi Turtiathan

Yes, the backgrounds scroll across the screen in most scenes.

Thanks for your offer of testing. I will PM you when a few scenes are complete.

This game is a practice in the style of "Shoot 'em up."

Destroy planes, boats, tanks, hidden caves etc etc with missiles and bombs.

:=

barefoot




#35
Hi Monkey

parts of the game requires mouse.Visible = false; and some scenes don't.

I will be using mouse.Visible = false/true; from now on instead of my workaround (transparent image for LookAt)..

cheers   :=

barefoot


#36
Hi Monkey

yes, hiding the mouse is the best and easiest thing to do in most cases.

I got around it by changing eModeLookat graphic with a transparent image.

Crude but works. Obviously I will need to look at other methods.

cheers

barefoot



#37
One possibility is as you said: make a new view with the needed loop views for when the character walks up or down the hill. This will call for you to import the inclined sprites into the views frames. You will also need new talking views if he talks and possibly new idle view if required.

For reference:

Simply use this to change players normal view when it is required:
Code: ags

player.ChangeView(); 


This could be when he walks on a region or part of an if function etc..

This new view can be used in any room just by calling it.

There will be other ways and Im sure someone will let you know..



#38
Once you've changed the characters view (say from normal view 4 to new view 5 where he loses control of his legs) through a function or action

example:

Code: ags
 
cEgo.ChangeView(5); 


cEgo's walk cycles will then be the loops in view 5 ie up, down, left and  right, provided you have them in view 5 of course. Simply change back as required..

Don't forget about the Idle view! check out SetIdleView in AGS Manual.


#39
Hi

My question did not necessarily point to my latest game in production 'Tiger Hawk Fighter' but points taken.

To Radiant:

The GUI also happens to display height, speed, destroyed targets and plane being used as well as weapons available (along with keys to use for us with low memories).

As far as displaying Keys to use I myself quite often 'forget' during the game which keys do what, especially if there are a lot.

To Snake:

As far as Tiger Hawk Fighter is concerned some screens have a scrolling object background giving the illusion of movement.

Also I have used Keys to fire weapons and not via buttons which kind of makes real sense.

All your comments are well welcomed and observed for future reference.

cheers

barefoot





#40
Hi

the reason I am asking is to get a general feel of peoples affordability regarding controls.

Also, different cultures do see/view things differently like a colour in one country may represent one thing but in another may represent something else.

Sorry if this sounds technical but it's an issue that intrigues me and of course knowledge for future game making.

Quote
ProgZmax and Mods: I agree about having to use buttons to fire. I think using keyboard is the better option.

cheers for your answers.

barefoot

SMF spam blocked by CleanTalk