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

#1721
;D I am patient, I hope you are!

Also, delete the opening bracket ( { ) after the return; - line.

And delete the "bool PlayerIsOnSkip" and place it on top if that room script file (the CTRL+E one)! Then it should work!
#1722
Get rid of the ; - an else-statement doesn't need one (as if's don't need any)!

Code: ags

if ( x == y )
{
   // do something
}
else
{
   // do something else
}
#1723
To view the room script file (sorry for calling it global before, that way a typo), load up a room and hit CTRL+E.

Then make "bool PlayerIsOnSkip;" the first line there.

You can use else, but you'll still have to move all the interactions from the editor to the script!
#1724
Yep, you'll have to learn all the real script commands and place them underneath your "cEgo.Say ( "Whatever" );" line!

It'll take some time, but don't worry - if you ever plan on becoming just a little more interested in coding more complex things (like custom GUIs etc.) you'll need to get rid of those "shortcuts" anyways.

EDIT: And you'll have to move the line "bool PlayerIsOnSkip" to the global room script file!
#1725
Yes, you can use variables to do this.

Just add a boolean variable to the room script file:

Code: ags

bool PlayerIsOnSkip;


When the player enters the screen: set it to "false", so that it actually starts with a "false" value (because the player starts not being on the skip of course):

Code: ags

PlayerIsOnSkip = false;


Now, whenever the player is climbing up the skip, set it to "true":

Code: ags

PlayerIsOnSkip = true;


And whenever he leaves it, set it to "false":

Code: ags

PlayerIsOnSkip = false;


Now you have created a variable, that will ALWAYS tell you whether the player is currently on the skip or not! BUT: it won't do anything yet.
So, now you need to include an if-statement into all interactions that you want to disable when the player is on the skip:

Code: ags

if ( !PlayerIsOnSkip )
// if player is currently NOT on skip
{
   // do stuff
}


This way, you can also allow some interactions ONLY if the player is on the skip.

For closer information, re-read parts of the variables-tutorial.

Hope I could help.
#1726
You could save character stats with it. Or in my realtime-strategy game "Troopers", I used those functions to create a custom map format. Be creative...
#1728
Definately. But then I'd also like a possibility to customize the look of the arrows that automatically appear if you want to scroll, so that maybe we could add a scroll-tracker (like the one in windows scrollbars) to it or disable those arrows or change the arrows appearance etc.
#1729
You could use:

(1) Global Ints - You said you are afraid of an error if you have too many GlobalInts? I know AGS can handle lots of them, so I assume you mean an error from your side (for example messing up numbers).
(2) Variables - Those are pretty much the same than GlobalInts, but you don't have to remember a number for those, you can give those real names (so you could create a variable called: PlayerSawIntroYet or whatever you want and then you can set this variable to 0 or to 1 manually depending on whether or not the player saw the intro yet) - read up on "variables" in the manual or bfaq for that topic!
(3) Two rooms - Or you could just have your room 3 twice in your game, just looking exactly the same. Once it is the room for the cutscene and the other one is the one that the player will be able to walk around later in the game.

Hope I can help.
#1730
I agree; while I rarely experience any crashes, I still think that this is a feature, that every program should have.

But you have to use this feature careful: If you open a project and for example delete everything accidently and then -BAM- the autosave kicks in... ;)
#1731
Mr. Crab would say: Yeah, THAT guy. I don't know if you can call him a guitar player, but..."

;D

Thanks for the links, Geoff!
#1732
If you are into guitars, then watch this video and tell me what you think about it.

All jokes aside, those two guys have MAD skills!

My favourite parts are:

Speed = Emotion

- I'm the fastest guitar player in the world..
- Faster than Vai?
- Yep.
- Faster than Yngwie?
- Are you trying to make fun of me?

It's like... It doesn't react to my way of playing. That's a slow amp. Every other note is not coming through...

;D
#1733
Ashen is right, you probably want to have a small portion of the screen animated. Please use either objects, characters or gui's for that purpose.

Animated backgrounds only support 5 frames and you have to redraw the whole screen with your paint program - you can't just update a small portion of the original image!
#1734
Well, what's the size of the image that you're trying to import as a background into AGS? It has to be atleast the size of the resolution, that you are using. You probably use 320x200 as resolution, so then your background image must be ATLEAST 320x200 pixels big!
#1735
Well, the links are broken anyway!

Not that I tried it out... :=
#1736
General Discussion / Re: Strip Generator
Thu 05/01/2006 23:27:04
#1737
Quote from: ManicMatt on Thu 05/01/2006 21:17:03
I bet Ashen, dkh or strazer could provide a brilliant answer, but I'm going to try until then!

I'll take that as a challenge! ;D

No seriously, you'd need to make it an object as ManicMatt said - then do the following:

First copy this function into the beginning of your global script (CTRL+G):
Code: ags

function fade_object ( Object *_object, FADE_TYPE type )
// gradually fades an object in or out
{
	int counter;
	
	if ( type == IN )
	// if we are fading the object in
	{
		// set everything up
		counter = 100;
		_object.Transparency = 100;
		_object.Visible = true;
		
		while ( counter > 0 )
		// fade it in
		{
			counter--;
			_object.Transparency = counter;
			Wait ( 1 );
		}
	}
	else if ( type == OUT )
	// if we are fading the object out
	{
		// set everything up
		counter = 0;
		_object.Transparency = 0;
		_object.Visible = true;
		
		while ( counter < 99 )
		// fade it out
		{
			counter++;
			_object.Transparency = counter;
			Wait ( 1 );
		}
		
		// now mark the object as invisible
		_object.Visible = false;
	}
}


Now switch to the script header (CTRL+H) and add the following lines:

Code: ags

enum FADE_TYPE
{
	IN, 
	OUT
};

import function fade_object ( Object *_object, FADE_TYPE type );


Now you have everything set up. You only need to use the new commands: To do this, please go to the room with the title as object. Name the title something like "logo", so that the script-o-name is "oLogo". Now go to "Room->Settings" and click on the button with the red "i" on it. Next double-click on "Player enters screen (after fadein) and select "Run script" from the drop-down menu. Then click on the "Edit script..." button and type the following:

Code: ags

// fade the title in
fade_object ( oTitle, IN );

// move the player character
player.Walk ( 100, 100, eBlock );

// then fade the title out again
fade_object ( oTitle, OUT );


Feel free to ask questions on how certain parts of the script work and make sure you use AGS version 2.7 or higher!
#1738
I could've sworn I entered the old thread.

Anyways, here's me. That's right. Lock your daughters!

#1739
Hints & Tips / Re: 1213
Wed 04/01/2006 20:49:46
I never counted it! Take a look at this speedrun by jetlag and you can count, if you want to!
#1740
General Discussion / Re: FPS Creator
Wed 04/01/2006 20:41:55
If you are REALLY interested in REAL programming, then stop NOW with learning some script language here and some script language there and start learning proper C++. This is what helps the most in my opinion! It's not that hard to learn (actually its pretty close to the AGS 2.7 script language) and it allows you to create real windows/linux applications and using OpenGL or DirectX you can start to create your own 3d engines and applications!
SMF spam blocked by CleanTalk