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

#1
Thanks. Stupid I didn't see the "How do I post images, smileys and formatting?". I'd already read about enums, but Extender functions and pointers (I won't use for the time coming) were new to me. I find it quite strange I didn't find anything about Extender functions in the manual first. But thanks for that. I've learned a lot from you guys.
#2
So just for the record: switching type and parameter gives the possibility of using the character instance?

And why did you both use the * ? Is that a code?
"you want a Character *"
"function facedown(Character *charactername)"
"function FaceDown(this Character*)"

And a thing about enums. I think this 'll be the same as using multiple parameters in a function, but it couldn't hurt to ask: how do I use AND instances AND enums in one function?
Would that be:

enum DirectionOption {
Up, Down, Left, Right
};
function Face (charactername Character, DirectionOption direction)

(I don't know how to make something appear as code on the fora jet.)

And the last thing: I can imagine I shouldn't use some names as parameters/enum name, because AGS Editor wouldn't know which one would be the type and which one would be the parameter. Is that correct?
#3
Okay... I do understand SSH's reply. Thanks for that. So apart from the string-->character part I wasn't too far off I see.

But KhrisMUC? What did you do apart from flipping Character and "charactername" (in your words "this")? Is see it resulted in the possibility of using player.FaceDown(); but how come?

And how exactly do I use enums?
#4
I'm trying to make a function that could, for example, make a character face down.
This with the following (working!) code in it:

cName.FaceLocation(cName.x, cName.y+10);

In which cName ofcourse stands for the characters name.
I want to replace this 'cName' with a string inside the function.
How to do this?
I couldn't find much about the use of strings (in functions).
I don't think this will work, but it's as far as I could get:

function facedown(string charactername) {
charactername.FaceLocation(charactername.x, charactername.y+10);
}

How do I make this code working?
Best would be if I could make a function compatible with instances. This would result in cName.FaceDown();
Is that possible?
#5
IT WORKS! YES! Finally! :D
Thank you all!
#6
Whatever I want. It can be a character walking around all the time (repeat) without blocking the script (blocking style).
#8
I have a sound1.wav
I can play it with PlaySound(1);
But how do I make it repeat?
And how do I make the script wait until the sound is finished? (Blocking style)
#9
That's how to make a function. But I want to be able to make the code repeat and set the blocking style.
#10
Is it possible to make a function like this:

myfunction (eRepeat);

???

If not, this won't help me.
#11
I would like to know if it is possible to repeat a whole part of the script or set its blocking style.
#12
Is there a way to renumber views and characters?
#13
I want to change the players view if something1 happens. But i want to change the idle- and speechview along with it.
I want something1 to change the view back if it is already changed.

How do i do that?
#14
I have a script.

If (something1 happens){do 1
}
If (something2 happens){do 2
}
else {do 3}

This DOES work, BUT: as you can see, if something1 happens the script will continue and check if something2 happens.
How I want it:
If something1 happens I don't want the script to check if something2 happens.
If something1 doesn't happen I want the script to check if something2 happens.

I can use "else if", but is there a way to LINK to another part of a script?

And I also forgot how to change the speech view. How did you do that?
#15
Okay... The object WAS the key and my game is high resolution.
So with my own objects it should work.

Thanks a lot.
#16
Please read:
http://www.adventuregamestudio.co.uk/kbview.php?id=2

I did this, but my inventory item is 1. green and 2. displayed twice.
What is going on?!
#17
Thank you.
#18
Good idea. But there are more doors in that second room, so I am not sure wich one the character came through. Should I use global vars here?
#19
When my character walks through a door and goes to another room I want him to face a new direction. My problem is, that I don't know how to make the fade out "True". Now he is turning before the next room is loaded!
How do I solve this?
#20
Yes. I did test it. But I don't even think that that was necessary. Your hint was very "I-am-gonna-work"-looking. ;)
Thank again.
SMF spam blocked by CleanTalk