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

Topics - Hans

#1
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?
#2
I would like to know if it is possible to repeat a whole part of the script or set its blocking style.
#3
Is there a way to renumber views and characters?
#4
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?
#5
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?!
#6
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?
#7
I have a very big hotspot and I want my character to face the point where you clicked on it. Is there a way to use the clicked place's coordinates as the coordinates that have to be faced?
#8
My last topic was locked. But I'm still wondering why my dialog script doesn't work!

The code is:

@S  // dialog startup entry point
@1  // option 1
Ego: Nope...
option-off 1
option-on 2
stop
@2  // option 2
Ego: I don't think so.
option-off 2
option-on 1
stop

Why doesn't it start option 2 the second time?
#9
I want dialog option 2 to turn on, when option 1 runs (and 1 off).
I can't use scripts like:
dialog[1].SetOptionState(2, eOptionOn);
in a dialog script.
What to do now?
How can I use normal scripting in a dialog?
#10
I have a problem. I want an object to change it's look, when I enter the room, but that causes some sort of error. The script is:

  // script for Room: Player enters room (before fadein)
object[0].SetView (7);
object[0].Animate(0,0);
object[0].StopAnimating();

What is wrong?

I was making a door, that is supposed to be closed every time I enter the room. Is there another way to do that, if this one is wrong?
#11
I have a large character, and he is so big that his "body" come outside the walkable area.
Editing the walkable area (making it smaller) isn't possible, because there also are small characters, that wouldn't be able to walk there anymore if I did so.

What to do now?
#12
Again I am going to ask a probably stupid question. But I just can't find the anwser. I can make characters face a location, but how do I make them look down.
(I wanted to make it look like he's talking to you.)
How do I do this?
#13
I am making my first game and I am trying to make an aquarium in it. I made al the sprites. I can even put them in a view, but when editing the room, I can only choose one (!) picture for the object.
This means for me that my fish won't move and that is not I want .
I really (!) tried to find the anwser, but it still isn't clear to me.
If I really have to use some sort of code, please tell me exactly where to put it and try to make me understand what it all means.
I hope I will get a good reaction, so that I can always make the aquarium animate.

Greetings, Hans

PS.: Don't advise me to use an animating background. I have my reasons to make it an object.
SMF spam blocked by CleanTalk