Same click with different answers and other questions

Started by , Sat 17/01/2004 00:34:04

Previous topic - Next topic

Hood the Robin

I wanna know how to make the same click show a diferent answer in each click.

And, I someone can help me with some other things (im not going to start another topic for this ok):

1- Can i make 1st person game?

2 - Is it possible to make negative conditionals like: If player is not carrying an object,etc.

3-  I want to make a game where you shoot. Like you click (with the correct mouse pointer only) and it shoots and it causes damage. And how to make life points? (I know this is a difficult thing so i dont mind if u dont answer this one)

Reno Caspain

If you want different answers from same clicks, you need to runa script. It should look like this:

(in room script, outside any functions)

int answer;

(in interaction you want the answers at)

if (answer==0)
{
[insert your answer's script here]
answer++
}
if (answer==1)
{
[second answer here]
answer++;
}

and in the final answer replace the answer++ with answer=0 if you want to diaplay the fisrt answer again after the last one.

And other questions:

1. You can make it by selecting Hide player character in every room. That way the player character wont be shown in any screens.

2. I'm not sure, but I haven't figured out how to.

3. I think the easiest way to make shooting is to make a bullet character move from shooter to the target with MoveCharacterDirect command. To find out whether or not the bullet hit the target, use the AreCharactersColliding command, and make the damage code there. For example:

enemyname=enemyname-damage;
if (enemyname<0)
{
[dying code here]
}

I hope you're familiar with scripting, this seems to need a lot of it.

Dorcan

Hum, if you don't add else, all the different answers will be displayed at once.

if (answer==0)
{
[insert your answer's script here]
answer++
} else
if (answer==1)
{
[second answer here]
answer++;
} else
...

Scummbuddy

for number 2

just have a global int keeping track of wheter or not you have an object or none at all. Then refer to the global int to see what you want
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Scorpiorus

Regarding the second question, I'd use scripting instead of interaction editor, in run script:

// if EGO doesn't have inventory item number 5:
if (character[EGO].inv[5] == 0) {

// code here

}

SMF spam blocked by CleanTalk