SRL Archive - News and General

New way to DeclarePlayers ?


Sir R. M8gic1an

2009-05-18 21:48:08

well, i was just thinking to myself, and i find this way to be more efficient and easier to add / remove players!


Procedure DeclarePlayers;
begin

NumberOfPlayers(1);
CurrentPlayer := 0;

with Players[0] do
begin
Name :='Rasta Magician';
Pass :='My Password';
Nick :='agic';
Active := true;
Booleans[0] := true; //bank hides
Booleans[1] := true; //food in bank
end;

with Players[1] do
begin
Name :='RMagician';
Pass :='His Password';
Nick :='cia';
Active := true;
Booleans[0] := true; //bank hides
Booleans[1] := true; //food in bank
end;


end;

what do you guys think? it's easier to add players cus you don't have to go changing all the Players[0]. …

~RM

Naike

2009-05-18 21:49:34

I agree that it's easier..
But i'm so hooked to the old one ;P

Support tho.

Hobbit

2009-05-18 21:55:20

Hmmm yes i do like this, would be much more convenient.

Home

2009-05-18 21:59:12

I feel stupid.. But could someone show it with like 4 players (:


~Home

Hobbit

2009-05-18 22:01:57

Procedure DeclarePlayers;
begin

NumberOfPlayers(4);
CurrentPlayer := 0;

with Players[0] do
begin
Name :='Rasta Magician';
Pass :='My Password';
Nick :='agic';
Active := true;
Booleans[0] := true; //bank hides
Booleans[1] := true; //food in bank
end;

with Players[1] do
begin
Name :='RM Example';
Pass :='pass';
Nick :='ampl';
Active := true;
Booleans[0] := true; //bank hides
Booleans[1] := true; //food in bank
end;

with Players[2] do
begin
Name :='lakialiko';
Pass :='pass';
Nick :='kial';
Active := true;
Booleans[0] := true; //bank hides
Booleans[1] := true; //food in bank
end;

with Players[3] do
begin
Name :='numotiol';
Pass :='pass';
Nick :='umot';
Active := true;
Booleans[0] := true; //bank hides
Booleans[1] := true; //food in bank
end;

end;

Naike

2009-05-18 22:02:08

Hobbit raped me by 10 secs..

Edit, you failed at 4th player ;P

Frt

2009-05-18 22:02:09

Procedure DeclarePlayers;
begin

NumberOfPlayers(4);
CurrentPlayer := 0;

with Players[0] do
begin
Name :='Rasta Magician';
Pass :='My Password';
Nick :='agic';
Active := true;
Booleans[0] := true; //bank hides
Booleans[1] := true; //food in bank
end;

with Players[1] do
begin
Name :='Rasta Magician2';
Pass :='My Password';
Nick :='agic';
Active := true;
Booleans[0] := true; //bank hides
Booleans[1] := true; //food in bank
end;

with Players[2] do
begin
Name :='Rasta Magician3';
Pass :='My Password';
Nick :='agic';
Active := true;
Booleans[0] := true; //bank hides
Booleans[1] := true; //food in bank
end;

with Players[3] do
begin
Name :='Rasta Magician3';
Pass :='My Password';
Nick :='agic';
Active := true;
Booleans[0] := true; //bank hides
Booleans[1] := true; //food in bank
end;

end;

Rich

2009-05-18 22:07:20

Ooh, very shmexy. I definitely support this; it must be so much easier to use than having to change all those 0s in 1s etc.

Richard

ShowerThoughts

2009-05-18 22:09:54

Nah, who cares.
Why change it everyone is used to change it.
And it's not like you can't handle it isn't?

Sir R. M8gic1an

2009-05-18 22:23:42

well, it's really the scripters choice. I know i'll be doing it this way.

~RM

footballjds

2009-05-18 22:31:35

+++++++++++1
RM ur smart ;)
lovin this!!!

Naum

2009-05-18 23:10:10

I'm fine with the current way.
Though this is a pretty neat thing

P1nky

2009-05-18 23:18:01

yeah tbh both are okay :) i may just use this way for a change hehe

Shady?

2009-05-18 23:29:28

So simple yet so efficient. How didn't we thought about this earlier? Cool find :P

Torrent of Flame

2009-05-18 23:36:12

So simple yet so efficient. How didn't we thought about this earlier? Cool find :P


People have used this already. Someone showed me how to do it. I just didnt :p

GJ Publicifying it RM.

Nava2

2009-05-18 23:59:50

Pass it around, with..do statements win.

noidea

2009-05-19 01:01:04

I don't like it. People have been using they array-way since SRL's creation.
People are always suggesting these new ways, and I never seem to like it :(

mormonman

2009-05-19 01:06:06

From: noidea
I don't like it. People have been using they array-way since SRL's creation.
People are always suggesting these new ways, and I never seem to like it :(


it still is an array -.-

Bobarkinator

2009-05-19 04:51:32

I've already done this in some private scripts. It is much easier.

JAD

2009-05-19 05:55:49

More lines of code, less letters (maybe not even less total letters with all the statements though?)

Does look much neater though.

Tniffoc

2009-05-19 06:02:19

Ooh! I love with…do I've used it in many of my scripts where I used Types to define things such as cutting areas. I never thought of applying them to this though! Spread the word.

Camaro'

2009-05-19 14:57:40

From: Rasta Magician
well, it's really the scripters choice. I know i'll be doing it this way.

~RM


Ill do half the other way and half this wayy ;)