ID:180365
 
Hey, I have a few simple questions which the FAQ, and guides did not go over.
1. When creating dmi files for different weapons, is it best to create one or more?(example would be if I had needed a pic for a pistol, and a helmet. Should I create one dmi file called example.dmi and just make multiple pictures in that, or create two, one for each. pistol.dmi, and helmet.dmi) like off of fireKINGS weaponsystem.

2. Should I create multiple dm files for code? Like one for pistols, one for armor, one for helmets, etc. Or just keep them all in one dm file?

The following is more about how to make stuff work...

3. How do I add classes to my game(eg. Soldier, spy)?

4. How do I add teams, like in a ctf game.

5. How do I make weapons to say how far away to attack(eg. pistol goes 3 tiles, knife goes 1)?

Thanx for any help in advance, e-mail me at [email protected] if you can't reply here.
On 7/13/01 11:16 am Oblivian wrote:
Hey, I have a few simple questions which the FAQ, and guides did not go over.
1. When creating dmi files for different weapons, is it best to create one or more?(example would be if I had needed a pic for a pistol, and a helmet. Should I create one dmi file called example.dmi and just make multiple pictures in that, or create two, one for each. pistol.dmi, and helmet.dmi) like off of fireKINGS weaponsystem.

Designer discretion. Whatever you think is easier, you do. =)


2. Should I create multiple dm files for code? Like one for pistols, one for armor, one for helmets, etc. Or just keep them all in one dm file?

It is much easier to break it up into appropriate sections of code in separate DM files. That way, if you encounter a problem with your mob code, you know where to look. And so on.
In response to Spuzzum
Ok, thanx a ton Spuzzum.

Where can I find info on the following questions tho?
3. How do I add classes to my game(eg. Soldier, spy)?

4. How do I add teams, like in a ctf game.

5. How do I make weapons to say how far away to attack(eg. pistol goes 3 tiles, knife goes 1)?

(Have a few more :))

In response to Oblivian
On 7/13/01 8:21 pm Oblivian wrote:
Where can I find info on the following questions tho?
3. How do I add classes to my game(eg. Soldier, spy)?

Look at the Step BYOND demo for classes.
In response to Oblivian
3. How do I add classes to my game(eg. Soldier, spy)?

Read Ron's answer :)

4. How do I add teams, like in a ctf game.

Make a list for say, red, and a list for say, blue, that are blank by default, then when they join the team (use a class-like system for choosing your team. Input would be handy, even Alert if there's only two teams) and when they choose what side they want, add their name to the team list.

usr.name += mob/var/list/red

5. How do I make weapons to say how far away to attack(eg. pistol goes 3 tiles, knife goes 1)?

Put that in the code for the pistol... For example, for a pistol for 3 tiles:

obj/weapons/pistol/verb
shoot(mob/M as mob in oview(3))
<< put shoot code here >>

and, for a knife to only attack in one tile away..

obj/weapons/knife/verb
slash(mob/M as mob in oview(1))
<< put slash code here >>

In the oview() command, the argument is how many tiles you want the verb to be accessed.. In other words, the 3 and the 1 in 'oview(3)' and 'oview(1)' are telling the program to be only able to target someone that many spaces away. It's max is two screens away, I beleive.. then it just stops there. Make sense?

Hope that helped ya... The list code might not work.. If not, please look up adding things to lists in the reference. :)
In response to Vortezz
Make a list for say, red, and a list for say, blue, that are blank by default, then when they join the team (use a class-like system for choosing your team. Input would be handy, even Alert if there's only two teams) and when they choose what side they want, add their name to the team list.

usr.name += mob/var/list/red

Wrong order. ;-)

More or less, if you have two teams, then you want them as global vars (or vars of a datum, but that's getting Way Beyond Newbie).


var/list/red = new()
var/list/blue = new()


//yadda yadda yadda
var/team = alert("Which team?","Pick your team!","Red","Blue") //get the team choice
switch(team)
if("Red")
red += src //add me to red list
if("Blue")
blue += src //add me to blue list


(Pseudocode. Not copy and paste. Don't even try. =)


This adds each mob to the team that they pick. Then you can use 'for(mob/M in red)' to find every player on the red team, and likewise for blue.


The list code might not work.. If not, please look up adding things to lists in the reference. :)

Lists are so powerful, you'll wonder how you could ever get along without them! =)
In response to Vortezz
Make a list for say, red, and a list for say, blue, that are blank by default, then when they join the team (use a class-like system for choosing your team. Input would be handy, even Alert if there's only two teams) and when they choose what side they want, add their name to the team list.

usr.name += mob/var/list/red

Wrong order. ;-)

More or less, if you have two teams, then you want them as global vars (or vars of a datum, but that's getting Way Beyond Newbie).


var/list/red = new()
var/list/blue = new()


//yadda yadda yadda
var/team = alert("Which team?","Pick your team!","Red","Blue") //get the team choice
switch(team)
if("Red")
red += src //add me to red list
if("Blue")
blue += src //add me to blue list


(Pseudocode. Not copy and paste. Don't even try. =)


This adds each mob to the team that they pick. Then you can use 'for(mob/M in red)' to find every player on the red team, and likewise for blue.


The list code might not work.. If not, please look up adding things to lists in the reference. :)

Lists are so powerful, you'll wonder how you could ever get along without them! =)
In response to Spuzzum
On 7/14/01 1:10 am Spuzzum wrote:
Make a list for say, red, and a list for say, blue, that are blank by default, then when they join the team (use a class-like system for choosing your team. Input would be handy, even Alert if there's only two teams) and when they choose what side they want, add their name to the team list.

usr.name += mob/var/list/red

Wrong order. ;-)

More or less, if you have two teams, then you want them as global vars (or vars of a datum, but that's getting Way Beyond Newbie).


var/list/red = new()
var/list/blue = new()


//yadda yadda yadda
var/team = alert("Which team?","Pick your team!","Red","Blue") //get the team choice
switch(team)
if("Red")
red += src //add me to red list
if("Blue")
blue += src //add me to blue list


(Pseudocode. Not copy and paste. Don't even try. =)


This adds each mob to the team that they pick. Then you can use 'for(mob/M in red)' to find every player on the red team, and likewise for blue.


The list code might not work.. If not, please look up adding things to lists in the reference. :)

Lists are so powerful, you'll wonder how you could ever get along without them! =)

Give me some good examples of what amazing things lists can do! :)
In response to Vortezz
Give me some good examples of what amazing things lists can do! :)

Look at the Earth. Now, build a list of every single object on Earth.

Amazing, no? ;-)
In response to Spuzzum
On 7/14/01 1:23 am Spuzzum wrote:
Give me some good examples of what amazing things lists can do! :)

Look at the Earth. Now, build a list of every single object on Earth.

Amazing, no? ;-)

Lol, that was blunt. :)

*starts listing*

I'll be back in 237 years with the list. I'll be expecting you.