Author Topic: 2 questions  (Read 612 times)

0 Members and 1 Guest are viewing this topic.

Offline trickster

  • Major(1)
  • Posts: 30
  • Dont play with bouncing grenades
2 questions
« on: September 22, 2008, 09:31:59 pm »
hey guys again me and my questions ...

my first question...
how do i create classes like berserker class and anything can someone give me an example script please i really want to learn gow to...

my second question...
how do i create my skills but only a certain class can use some and the other class diferent skills??
i know how to create the bullets and anything i just want an example of how a class can have some unique skills and another class can use his unique skill


if someone can answer or give me a script example please tell me right away

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: 2 questions
« Reply #1 on: September 22, 2008, 11:11:55 pm »
I'm assuming that you are pretty experienced because that is a fairly complex thing to do.
To create a class I would suggest making a struct/type thing that stores the basic things. Avarax uses this in MMod:
Quote
     tClass = record
                name,description: string;
                skill: array[1..4] of string;
                weap: array[0..14] of boolean;
                Human: boolean;
                input,output,inmod,outmod,PickX,PickY: integer;
                BCount,ICount: byte;
              end;
Then you just need to initialize all of them and check for their spells when they do stuff.

For #2, just save what class each person is in, and when they do a command associate that with their class...
Script example: http://nopaste.com/p/a0soFkyNM

Offline trickster

  • Major(1)
  • Posts: 30
  • Dont play with bouncing grenades
Re: 2 questions
« Reply #2 on: September 24, 2008, 07:30:34 am »
avarax mod script example looks a bit complicated, is there another way?? because im not the one to spend soo much time understanding and making a big script

Offline Norbo

  • Camper
  • ***
  • Posts: 338
Re: 2 questions
« Reply #3 on: September 24, 2008, 09:44:50 am »
all u do is set a varrible berseker := ID on player command, and like if you want t have skills only for this class u can do onplayercommand if berseker = id bla bla