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

#1781
I will hijack this, because I have a small question that fits the thread description perfectly and since the original question is answered, I don't see nothing wrong with it...

Scotch recently mentioned, that there is now the possibility to add functions to a struct (thus acting pretty much like a c++ class). How does that work? I searched but couldn't find anything and scotch didn't answer to my PM...

Thanks!
#1782
I don't wanna disturb your praise, but I have a little technical correction:

Up to my knowledge, AGS does not support classes (or functions within structs) and their inheritance etc. yet. I can't wait to see that in AGS though. It would then be "real object-oriented"!

Apart from that you're right, AGS is teh king!!11!!  :=
#1783
Quote from: InCreator on Mon 28/11/2005 15:25:20
Also, I'm planning on making a complete tutorial of my style, going through everything from setup to complete detailed bg.
But then again, will it be useful to anyone?

"Useful" is not even an expression. 8) A tutorial describing your amazing style would be great!!
#1784
I probably won't find the time to enter ( because of ...other... projects 8) ) but I was just going to say, that I love how you guys keep coming up with good coding ideas. Keep it up.
#1785
Hello and welcome to the forums,

I'd like to help, but I have serious trouble understanding what you want.

Are you talking about one or two characters? It seems you mean two of them, but in the script, only one character (TONTETE) appears! Also: What do you use the "random"-functions for?

Please try to describe your problem a little better if possible (or maybe draw some explaining images in paint and poste them here) and I'm very confident that someone is going to help you!

EDIT: After a second glance of your post, I think I am starting to understand... slowly. :)
#1786
General Discussion / Re: Floyd Rose Questions
Wed 23/11/2005 12:37:19
I have an Ibanez with floyd rose tremolo system and I have the same problem with tuning. Sometimes it's a b*tch to change tuning "real quick" on a gig etc. but then I still have my other guitar, so I can use one for standard tuning and one for - say drop D...
#1787
First of all: Making sure the user really wants to restart before doing so, is a very wise decision, that I missed in a lot of AGS games. ;D

As far as I know, there is no "pre-made" GUI like the "Do you really want to quit?" one.

So you'd have to create your own one, put in a label which says something like "Do you really want to restart?" and add two buttons (one for "Yes" and one for "No" of course). Then you add GUI scripts, that this GUI pops up when the user clicks on the "Restart" button in the main menu and you only restart when the user then clicks on "Yes". If he chooses "No", the GUI will disappear again.

Phew, I am tired, sorry for the crappy explanation, but this should be done quite quickly and it gives you the possibility to change the appearance of the GUI.
#1788
Sure. Make sure to animate the object "unblocking" ( pass "0" in AGS 2.62 and "eNoBlock" in AGS 2.7x as blocking parameter of the object animation function ).

Refer to the manual to read up on how to use and animate objects if necessary!
#1789
Not instantly, I'd highly suggest you to use an object for the whole flag instead and then set the baseline properly.
#1790
You need to change the line to:

Code: ags

import static function DecisionGUI_Yes (DecisionQuestion);


I am sure that you understand your syntax error now, once you see the "solution". If not, go ahead and ask! :=
#1791
I know that we had threads before talking about music, but I got an idea from another forum: The idea is to write down interpret and title of tracks, that would fit certain passages in your life the best.

I'll just start and you'll see what I mean:

Birth: Pink Floyd - Echoes
Average Day: Red Hot Chili Peppers - Throw Away Your Television
Falling in love the first time: Eric Clapton - Wonderful Tonight
TAfter the "first time": Coldplay - Shiver
Marriage: Can - She Brings The Rain
Midlife Crisis: Dream Theater - A Change Of Seasons
Getting older: Pink Floyd - Time
Deep Thought: Phil Collins - In The Air Tonight
Death: Emerson, Lake & Palmer - From The Beginning
Post Mortem: Pink Floyd - Wish You Were Here

Hm... Seems like the "Soundtrack to my life" is pretty much rounded up by Pink Floyd.
Feel free to adapt/change passages if you like.
#1792
This is a simple one. ;D

Imagine you'd declare an array of - say - integers.

Code: ags

int array[30];


First comes the type of the variable ('int' in this case) and then the name of the variable ('array' in this case).

Now what you have there would be something like:

Code: ags

array int[30];


It's simply the wrong way around.

Change your array definition line to this:

Code: ags

klikplek KlikPlek[30];


Now it should work.

By the way, what does "KlikPlek" mean in which language? Just curios.
#1793
You'd need to loop through all other characters and check their distance.

This is some code, that should work (although untested), but it could probably be improved somehow.

Code: ags

function GetClosestTo ( Character *Origin )
{
	int result;
	
	int charid = 0;

	while ( charid < GetGameParameter(GP_NUMCHARACTERS, 0, 0, 0) )
	// loop through all characters
	{
		if ( (character[charid].ID != Origin.ID) && (character[charid].Room == Origin.Room) )
		// skip the origin character and characters not in current room
		{
			if ( Distance ( Origin, character[charid] ) < result ) // function described below
			// if the distance between the characters are smaller
			// than what we had before
			{
				// then store the new value
				result = Distance ( Origin, character[charid] ); // function described below
			}
		}
		
		// keep on searching
		charid++;
	}

	// now return the result
	return result;
}


Hope this is right and works. I am sure it will set you off in the right direction though!

Edit by strazer:

Added * and GetGameParameter

Btw, the "Distance" function:

Code: ags

function Distance(Character *char1, Character *char2) {
  int a = char1.x - char2.x; // get x-distance between characters
  int b = char1.y - char2.y; // get y-distance between characters
  return FloatToInt(Maths.Sqrt(IntToFloat((a*a) + (b*b)))); // calculate direct distance between characters (pythagoras)
}


Edit 2:

Added Pumaman's fix.
#1794
Critics' Lounge / Re: Color trasnparency
Wed 02/11/2005 13:38:47
You'd use alpha transparency and 32-bit mode.

More information in the manual, and if you use it for big objects/characters, it may cause framerate drops...
#1795
Elliott:

Code: ags

i = -20;


This will set the variable "i" (or in this case "cEgo.z" - same thing) to -20.

Code: ags

i = i - 20;
// ... is the same as ...
i -= 20;


This will take 20 away from i.

Thus there's a difference, imagine i to be 100. In the first case, i would turn up to be -20. In the second it would become 80.

I think he wanted to make the cEgo.z variable equal -20 in this case, but if he wanted to just position him 20 pixels higher than whereever he was, than your suggestion is right.
#1796
Awesome, your game is (still) very impressive.

One thing made me kinda wonder though: The main character appears to be physically quite strong, but whenever this Childs confronts him, he is a complete... coward. I mean, Childs looks quite a bit weaker to me than the player does. Is this only me or does it maybe have something to do with the story?
#1797
I don't know. If somebody has any great ideas for new rules, then he/she should go ahead, I guess.

[note to self]: Wow, I can't even lead a tune contest properly... ::)
#1798
Allright, the time is over. No entries. I am not exactly sure what to do now, but I'll suggest this:

- I'll encourage everyone that plans on entering to let me know about it.
- Let me know if you want a change of rules or anything, although I can't see what could be wrong with them.
- Then I'll set a new deadline date.

Please be creative and enter!

EDIT: Thanks for your interest though, Nikolas and MillsJROSS.
#1799
Allright, 2 days left, nobody except Nikolas did show any interest at all. *sigh*

Is anybody working on anything? Nikolas, do you think you get your entry ready in time or do you still plan on entering?

Is the topic not appealing to you? C'mon, just think about writing music that describes for example sex. Let it start slow and relaxed and then build up the tension until the last note, then maybe some relaxed "after it all"-music. :)
#1800
General Discussion / Re: AGS Golf?
Mon 24/10/2005 20:18:09
You could look it up in the manual pretty easy.

To save you some time: (AGS 2.7)

Code: ags

int cosine = Maths.Cos ( 1.0 );


This will store the cosine of 1.0 radians into the variable "cosine".

I assume you know what functions like cosine "do".
SMF spam blocked by CleanTalk