Very Basic Scripting Question

I don't know unless the levels uploaded, and I'm not sure I want to upload a big fat load of nothing to someone's server, that would piss them off so:

If I use if (playerisleader) does it make them a leader when they're the one to enter the room wtih nobody else around, or do you need to bne teh first to EVER walk into the level?

Re: Very Basic Scripting Question

The first one.

Re: Very Basic Scripting Question

Thanks. Thats all I needed to know.

I don't want to spam with pointless questions, so I'll just ask more questions in here unless I'm told otherwsie.

This is another very simple one, and hopefully the last one. I don't want to bother you, but I can't seem to find out how to do this riddle quest. Perse lets assume the bravo haunted mansion quest. (Also, if this is a flag, I'm a total fucking moron xD) It asks you what has hands, but no arms, always runs, never walks, etc, and you have to say a clock. After that it destroys the NPC.

How can this be scripted?
And if not, how can I make it teleport me?

Re: Very Basic Scripting Question

Actually its

if(isleader) { }
A flag that is triggered if they are the 'first' of all the people in the level.
Meaning if you're 2nd entering, first guy leaves, that means you the leader.

Mind you this is a flag, not a trigger. Making it 'passive', so you'll need another loop, or something active like a trigger (like a playerenters/playerchats) for the ifleader to actually be useful to you.

Re: Very Basic Scripting Question

I kinda thought it was just 'isleader', but maybe they both work.

[code]if (playerenters&&!done){
showcharacter;
} else { hidelocal;}
if(playertouchsme){
say2 what has hands, but no arms, always runs, never walks, etc, ;
}

// couple differn't ways to do this depending on how accurate there
//answer is expected to be.
// ex 1. if (playerchats && startswith(answer,#c)) {
// ex 2.
if (playersays(answer)) {
set done;
hidelocal;
}
[/code]

Re: Very Basic Scripting Question

Yeah, I got the leader script already, but uuh, how about the if player says majiggy. The playerchats doesn't seem to be useful as far as I can see.

Re: Very Basic Scripting Question

anything behind // isn't doing anything there, just included it as another way to do it.

here,

[code]if(playerenters){showcharacter;}
if (!done){
show;
} elseif (done) { hidelocal;}

if(playertouchsme){
say2 what has hands, but no arms, always runs, never walks;
}

if (playersays(majiggy)) {
set done;
hidelocal;
}[/code]

Re: Very Basic Scripting Question

Oh, so it was a basic flag afterall. :<

Re: Very Basic Scripting Question

Also:
'playersays' is a command intended to be removed, it exists in this version for some backwards compatability, but is removed in later versions, phased out if you will.

Use if(playerchats && strequals(#c,Chat Text)) { … } instead