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 - Dr Lecter

#21
General Discussion / Re: FPS Creator
Thu 05/01/2006 22:07:13
Just buy Half Life 2, it comes with Source SDK... if you got MS Visual Studio .Net 2003 (like me), or one of the other Studios that the Kit supports, it let's you modify just about anything in the game. Much easier than writing your own engine and if you do want start your own engine its a good example on how to set it out.
#22
Competitions & Activities / Re: January MAGS
Wed 04/01/2006 16:58:19
I have exams until the 23rd, so I'll just defer making the rest of my game until then
#24
Hints & Tips / Re: 1213
Tue 03/01/2006 15:03:29
What the hell I am suppose to do with the key from the gym?
#25
I don't really want to bars in, since in real life you wouldnt be able to check your hp... I was thinking that maybe as you take damage the screen tints more and more red untill your screen is totally red. Obviously giving you a disadvantage in gunbattles because you've been hit, just as it would in real life. I've already posted a Weapons script and demo in the "Using AGS", I'll probably add more shotgun shrapnel and make it less accurate, make the pistol more accurate, and the machine gun is awesome once you add recoil...
#26
I suppose it could be said that that is infact one room... just a different view of it... but meh, techincally its a different view...
#27
Competitions & Activities / Re: January MAGS
Mon 02/01/2006 20:43:32
I may put GG on hold to enter this, I havent entered a MAGS before and I've been a member of the form for about 14 months ::)
#28
AGS Games in Production / The Genesis Gemini
Mon 02/01/2006 18:18:11
The story is set in a unknown city, the main character is Steve Gordon. A regular guy until he recieves a phone call from someone who will only refer to himself as "The Programmer", he says that unless he does exactly as he says, everyone he knows and loves will die. As a demonstration of his power a man standing right next to our hero is shot by a Sniper.

It's not long before Steve realizes that these "missions" are not what they seem, almost like they are to test him, rather than to achieve certain goals. During one of these missions he meets a man (known only as M at this point) whom offers him an answer to why he was choosen to perform these tasks.

The has my resently posted shooting code... I have started programming the AI for shoot-outs.

It will hopefully be a mixture of shooting and adventure, mostly adventure but I've already planned about 3 or 4 gunfights in the game. The format is going to be abit like Indiana Jones and the Fate of Atlantis... since there will be missions that you can complete using either guns, or other methods.

It may not sound all that funny, but it will be... I have a couple of screens below:



#29
It works when you change them both, but it seems abit pointless since they mean the same and the name isn't normally called during game so it wouldn't be noticed.
#30
Completed Game Announcements / Re: META
Sun 01/01/2006 21:41:58
Ahhhhhhhhhhhhhhhhh the annoyingness of this game is the kind that I would like to recreate. How the hell do you get over the hole, I'm almost tearing my hair out.
#31
Did you change anything in the cursor section?
#32
LoL yeah, I need sleep, my game progress shot past todat, I spent about 5 hours on the interface and planning the game, aswell as de-bugging.
#33
Ah thanks
#34
Beginners' Technical Questions / GUI in 2.7
Sun 01/01/2006 01:26:21
I get the deeling this so simple someone must have asked it before but I can't find it... so... since interface_click is obsolete in v2.7... where exactly do I put the code for my GUI?
#35
- Two Short Planks Stuck Together with Stupid Glue
- Packet of Minstrels
- The British Prime Minister
- Adolf Hitler's Moustache
- An ADSL Modem
- A Crater
- A Black Hole
- The Voyager Spacecraft
- A Packet of Eaten Waker's Crisps
- A Holiday for Two To Paris
- Double Glazed Windows
- A Copy of PC Gamer Magazine
- A Litre of Petrol
#36
Monkey Island 1-3,
Simon the Socerererererererer 1-2,
Indiana Jones and the Fate of Atlantis is probably my favourite though because of the multiple paths
#37
Yeah, I'm planning to make a "Indiana Jones and the Fate of Atlantis" style game, where each section you have the choice to do either with violence, wits, or teamwork. Obviously not EXACTLY like that, but loosely based on that idea. I've written about 25% of the puzzles so far, the coding is underway but I have barely any graphics at all.

- If I had enough graphics I would have posted it in the Game Development section

I did handgun, machine and shotgun for reasons that they pretty much encompass the kinds of weapons most people will be using. Most of the time the only thing that will change will be how accurate, and damage dealt, and with a little moding to the code its not hard. I've just added in the recoil function, which isn't too far from my other code for he location of bullet holes.

Right now I'm thinking of adding bullets in gun and remaining, aswell as health bars for enemies and player... but I think I'll get on the rest of the game before making it more user friendly.
#38
Ponch did one of these for 6, I don't know if he did an updated version or not, but here's the code I'm using in my latest game. I updated the code to make it more easily work with multiple guns, and for the shotgun, work with multiple impacts. The problem with the old code, after updating was that it could only deal with a target being shot once, if you have a shotgun, you sometimes hit the target more than once. If you want a more detailed explanation of what's going on I'll write a follow-up to this.

This script is pretty copied from this game:
Lt. Head Demo

I clicked the wrong forum, can a mod please move this... thank you in advance....

Global scripts:

Code: ags
#sectionstart game_start  // DO NOT EDIT OR REMOVE THIS LINE
function game_start() {
  // called when the game starts, before the first room is loaded
SetGlobalInt (1, 2); // Number of clips player has
SetGlobalInt (2, 9); // Gun Ammo Status (7-shots in gun)
SetGlobalInt (4, Random(2)+1); // Random number between 1 and 3 (Sound)
SetGlobalInt (21, 0); // Gun type 0 = hand gun, 1 = machine gun 2 shotgun
SetGlobalInt (22, 2); // Number of machine gun clips
SetGlobalInt (23, 30); // Number of bullets remaining in machine gun
SetGlobalInt (24, 4); // Number of shotgun shells (in groups of 7)
SetGlobalInt (25, 7); // Number of shotgun shells remaining in gun
}
#sectionend game_start  // DO NOT EDIT OR REMOVE THIS LINE


Code: ags
#sectionstart repeatedly_execute  // DO NOT EDIT OR REMOVE THIS LINE
function repeatedly_execute() {
  // put anything you want to happen every game cycle here
  if (IsSoundPlaying()==0) {
    mouse.Visible = true;
}

      	 if (IsInteractionAvailable (mouse.x,  mouse.y, eModeShoot) == 1) {
      	   if (mouse.IsButtonDown(eMouseLeft)) {
      	     if (GetGlobalInt(21) == 1) {
      	       if (GetGlobalInt(23)>0) {
      	         		PlaySound(15);
							 int left = Random(15);
					   	 int right = Random(15);
					  	 int up = Random(15);
					  	 int down = Random(15);
					  	 int somethingelse = mouse.x +left -right;
					  	 int somethingelse2 = mouse.y +up -down;
						   ProcessClick (somethingelse, somethingelse2,  eModeShoot);
				  		 RawDrawImage(somethingelse+84,somethingelse2-1,29);
				  		 SetGlobalInt(23, (GetGlobalInt(23)-1));
					   	 Wait(6);
					   	 } else {
								PlaySound(3);
								}
						  }
					  }
			  	}
			 if (GetGlobalInt(30)==1) {
			   if (GetGlobalInt(31)==1) {
			     if (GetGlobalInt(32)==1) {
								cTarget1.Say("Well done, you hit all the targets!");
								cEgo.ChangeRoom (1, 53, 223);
								SetGlobalInt(30, 0);
								SetGlobalInt(31, 0);
								SetGlobalInt(32, 0);
			     }
			   }
			 }
}
#sectionend repeatedly_execute  // DO NOT EDIT OR REMOVE THIS LINE


Code: ags
#sectionstart on_mouse_click  // DO NOT EDIT OR REMOVE THIS LINE
function on_mouse_click(int button) {
// called when a mouse button is clicked. button is either LEFT or RIGHT
   if (IsGamePaused() == 1) {
   // Game is paused, so do nothing (ie. don't allow mouse click)
	 }
	 else if (GetGlobalInt(18) == 1) { // Combat is enabled, so no clicking
	 }
   else if (mouse.IsButtonDown(eMouseRight)) {
      // look:
         if (IsInteractionAvailable(mouse.x,mouse.y, eModeLookat) == 0) {
	 string buffer;
	 GetLocationName(mouse.x, mouse.y, buffer);
	 cEgo.Say("Nice %s.", buffer);
 }
				 else if (IsInteractionAvailable(mouse.x,mouse.y, eModeLookat) == 1) {
				 ProcessClick (mouse.x, mouse.y, eModeLookat);
   } 
   }
   else if (mouse.IsButtonDown(eMouseLeft)) {
      // use, shoot or walk
      	 if (IsInteractionAvailable (mouse.x,  mouse.y, eModeShoot) == 1) {
      	   if (GetGlobalInt(21) == 0) {
      	     if (GetGlobalInt(2)>0) {
      	       		PlaySound(1);
						 int left = Random(10);
					 	 int right = Random(10);
						 int up = Random(10);
						 int down = Random(10);
						 int somethingelse = mouse.x +left -right;
						 int somethingelse2 = mouse.y +up -down;
						 ProcessClick (somethingelse, somethingelse2,  eModeShoot);
						 RawDrawImage(somethingelse+84,somethingelse2-1,29);
						 SetGlobalInt(2, GetGlobalInt(2)-1);
						 } else {
						 PlaySound(3);
						}
				}
					else if (GetGlobalInt(21) == 2) {
				     if (GetGlobalInt(25)>0) {
				     PlaySound(17);
						 int left = Random(10);
					 	 int right = Random(10);
						 int up = Random(10);
						 int down = Random(10);
						 int somethingelse = mouse.x +left -right;
						 int somethingelse2 = mouse.y +up -down;
						 ProcessClick (somethingelse, somethingelse2,  eModeShoot);
						 RawDrawImage(somethingelse+84,somethingelse2-1,29);
						 left = Random(10);
					 	 right = Random(10);
						 up = Random(10);
						 down = Random(10);
						 somethingelse = mouse.x +left -right;
						 somethingelse2 = mouse.y +up -down;
						 ProcessClick (somethingelse, somethingelse2,  eModeShoot);
						 RawDrawImage(somethingelse+84,somethingelse2-1,29);
						 left = Random(10);
					 	 right = Random(10);
						 up = Random(10);
						 down = Random(10);
						 somethingelse = mouse.x +left -right;
						 somethingelse2 = mouse.y +up -down;
						 ProcessClick (somethingelse, somethingelse2,  eModeShoot);
						 RawDrawImage(somethingelse+84,somethingelse2-1,29);
						 SetGlobalInt(25, GetGlobalInt(25)-1);
						 Wait(12);
					} else {
					  PlaySound(3);
					}
					}
			}
         else if (IsInteractionAvailable(mouse.x,mouse.y, eModeInteract) == 0) {

				 ProcessClick (mouse.x,  mouse.y, eModeWalkto);
         }
				 else {
				 ProcessClick (mouse.x, mouse.y, eModeInteract);	
         }
 }
}
#sectionend on_mouse_click  // DO NOT EDIT OR REMOVE THIS LINE


Code: ags
#sectionstart character1_a  // DO NOT EDIT OR REMOVE THIS LINE 2,0, 124

int health1=1;

function character1_a() {
  // script for Character 1 (Target1): Shoot character
  
  // Shoot Target1
			if (GetGlobalInt(4) == 1) {
			PlaySound(9);
			}
			else if (GetGlobalInt(4) == 2) {
			PlaySound(10);
			}
			else {
			PlaySound(11);
			}
			health1=health1-1;
		  cTarget1.StopMoving(); // Move Target off Screen off screen
		  cTarget1.ChangeRoom (2, 0, 124);
			if (health1<1) {
					SetGlobalInt(30, 1);
					}
}
#sectionend character1_a  // DO NOT EDIT OR REMOVE THIS LINE


#sectionstart character2_a  // DO NOT EDIT OR REMOVE THIS LINE 2, 523, 176

			int health2;

function character2_a() {
  // script for Character 2 (Target2): Shoot character
  // Shoot Target2
			if (GetGlobalInt(4) == 1) {
			PlaySound(9);
			}
			else if (GetGlobalInt(4) == 2) {
			PlaySound(10);
			}
			else {
			PlaySound(11);
			}
			health2=health2-1;
		  cTarget2.StopMoving(); // Move Target off Screen off screen
		  cTarget2.ChangeRoom (2, 523, 176);
			if (health2<1) {
					SetGlobalInt(31, 1);
					}
}
#sectionend character2_a  // DO NOT EDIT OR REMOVE THIS LINE

#sectionstart character3_a  // DO NOT EDIT OR REMOVE THIS LINE 2, 523, 74

int health3=1;

function character3_a() {
  // script for Character 3 (Target3): Shoot character
  // Shoot Target3
			if (GetGlobalInt(4) == 1) {
			PlaySound(9);
			}
			else if (GetGlobalInt(4) == 2) {
			PlaySound(10);
			}
			else {
			PlaySound(11);
			}
			health3=health3-1;
		  cTarget3.StopMoving(); // Move Target off Screen off screen
		  cTarget3.ChangeRoom (2, 523, 74);
			if (health3<1) {
					SetGlobalInt(32, 1);
					}
}
#sectionend character3_a  // DO NOT EDIT OR REMOVE THIS LINE



Reload and weapon change code:

Reload:
Code: ags
  if (GetGlobalInt(21)==0) {
if (GetGlobalInt(1)>=1) { // If the player has a clip left
 SetGlobalInt(1, GetGlobalInt(1)-1);//lose one clip
 PlaySound(2); // Play reload sound
 SetGlobalInt (2, 7);
 //AnimateObject - Reloading Graphic
 mouse.Visible = false; // so the player can't shoot while reloading
  }
} else if (GetGlobalInt(21)==1) {
  if (GetGlobalInt(22)>=1) { // If the player has a clip left
 SetGlobalInt(22, GetGlobalInt(22)-1);//lose one clip
 PlaySound(16); // Play reload sound
 SetGlobalInt (23, 30);
 //AnimateObject - Reloading Graphic
 mouse.Visible = false; // so the player can't shoot while reloading
 }
  } else if (GetGlobalInt(21)==2) {
  if (GetGlobalInt(24)>=1) { // If the player has a clip left
 SetGlobalInt(24, GetGlobalInt(24)-1);//lose one clip
 PlaySound(18); // Play reload sound
 SetGlobalInt (25, 7);
 //AnimateObject - Reloading Graphic
 mouse.Visible = false; // so the player can't shoot while reloading
  }
} else { // the player is out of ammo
 Display ("I'm out of Clips!");
  }  


Change to Handgun, Machine gun, Shotgun:
Code: ags
SetGlobalInt (21, 0); 

Code: ags
SetGlobalInt (21, 1); 

Code: ags
SetGlobalInt (21, 2); 
#39
I liked Guybrush's lines about what he's learned, ;D
#40
Beginners' Technical Questions / Re: Exports
Tue 04/10/2005 00:10:13
*Decides to just make it a global variable*
SMF spam blocked by CleanTalk