Thread: strings...
View Single Post
  #5  
Old 08-08-2001, 04:30 AM
CrazedMerlin CrazedMerlin is offline
Some Guy :\
Join Date: Apr 2001
Posts: 3,619
CrazedMerlin is on a distinguished road
Send a message via AIM to CrazedMerlin Send a message via Yahoo to CrazedMerlin
Quote:
Originally posted by ownerofbabylon
How is that cofusing. I will try to explain but Falcor did a good job.

Ok here is an example. Say you wanted a door to appear shut if a player enters and is not a certain class. And lets say the classes are god, robot, and plant man (whoever the idiot was who made these)And you only want the god to enter so. When the player chose to be a god you would have it do this:

if(playertouchsme){
set god;
}

then in the level with the door that only should open for gods put

if(playertouchsme){
if(god){
hidelocal;
else
show;
}
}

I think I messed up and it might be if(god=true) but i cant remember off the top of my head. If you use this it prolly wont work without changing a few things I messed up on but thats the basic Idea.

You set a string or flag (which makes it true) then you can use that to decide things in the game.

To set a server flag just put server.god I think. I never really use those so I dont know.

he said strings not flags

strings would be like
if (playerchats&&strequals(#c, )) {
setstring server.chat,#c;
setstring server.player,#n;
}

to display it would be like

if (playerenters) {timeout=.5;}
if (timeout) {
message #s(server.player): #s(server.chat);
timeout=.5;}


so if you say hey and your nick is Merlin
it would say

Merlin: hey
__________________

ICQ: 117881194
AIM: TehWizad
E-Mail: [email protected]
Reply With Quote