0 Members and 1 Guest are viewing this topic.
Please don't double post so much, people. You can edit your previous messages and I don't think this topic will die very quickly :pWhat i don't get is what you're planning to do after a player dies. Will he have to select a class again or will the same class still apply? In the last case you will need to remember what class each player has chosen and thus you'll need to store that. That means you could use iDante's example the way danmer suggests. Then instead of an array of boolean, create an array of integers and store there for each player a number which represents the class. If the number is zero then the player hasn't chosen yet.adapted from iDante:Code: [Select]var picked_class: array[1..32] of integer;//This bit should run when the player has tried to pick a class.begin if picked_class[ID] > 0 then WriteConsole('You already picked a class') else begin { Give them the bonus here } picked_class[ID] := classnumber; //classnumber being the class that the player has chosen end;end;Btw, I'm always willing to help ppl learn2script (in Dutch). You can find my xfire on elitectf.com
var picked_class: array[1..32] of integer;//This bit should run when the player has tried to pick a class.begin if picked_class[ID] > 0 then WriteConsole('You already picked a class') else begin { Give them the bonus here } picked_class[ID] := classnumber; //classnumber being the class that the player has chosen end;end;
Yep, iDante's one is quite more simple than mine I am a beginner too. I'm helping with what i know and i learned alot doing this. If you can explain me what i didn't do correct it could be nice staying in the topic's subject.And yeah, i don't know what to do when player dies.D4NG3R : Did you make an includes.txt ?Edit : JFK, i know what to do, i'll script it =]
Oh ok... So when player dies the chosen class is erased, then player chooses for another one next round ?Edit : What do you get for a compile error?
var picked_class : array[1..32] of integer;