ID:180340
 
I was looking through things I need to add, and found 3 different questions.. Just wanna know what the best command for each situation would be.
1. A specific class start in a specific spot(e.g. Terrorist start here, soldier starts here).
2. This one might be hard, if theres a demo or something plz let me know.. How to have a buy menu pop-up if on a certain tile, BUT when the player enters a command(such as buymenu).
3. How to allow a player to equip an item in their inventory, and put it under an "equiped" statpanel. While also adding the stats on the item to the statspanel.

Thanx for help in advance..
On 7/18/01 6:35 pm Oblivian wrote:
I was looking through things I need to add, and found 3 different questions.. Just wanna know what the best command for each situation would be.
1. A specific class start in a specific spot(e.g. Terrorist start here, soldier starts here).

Now that you know how to override things in the login proc, this shouldn't be too hard for you figure out on your own. Read up on the loc var and the locate proc.

2. This one might be hard, if theres a demo or something plz let me know.. How to have a buy menu pop-up if on a certain tile, BUT when the player enters a command(such as buymenu).

Yes there is a shop owner demo, that should do what you want.


3. How to allow a player to equip an item in their inventory, and put it under an "equiped" statpanel. While also adding the stats on the item to the statspanel.


hrm. You might not want to put the stats on the item in the stat panel because with a few items, the statpanel will get really cluttered. However, it wouldn't be hard to implement. What im going to give you is an example of how it would be done, not a snippet. The reason for this is because I dont know what variables, ect. your are using, plus its better to learn from an example then to just paste in a snippet.

mob/Stat()
statpanel("Equipped")
for(var/obj/o in src)
if(istype(o,/obj/weapon)) // Read up on istype.
if(o.equipped==1) // Check if the item is
stat("[o], cost :[o.cost]")// equipped. This line
//stats the object and how much
//it costs, just to give you an
// idea on how you would make it
// give the stats for the objs.

// im assuming your using the night soil lib, if so this
// part is done for you. There would normally be a lot more
// to the verbs that this but like i said, its just an
// example.

obj/weapon/verb
wield()
equipped= 1
remove()
equipped= 0


Thanx for help in advance..
np. I hope this helps.
In response to Ebonshadow
hrm. You might not want to put the stats on the item in the stat panel because with a few items, the statpanel will get really cluttered.

I mean like say I have an item that gives +25 to defense.. and your defense is at 0.. it would add +25 to your defense(if this is what your talking about getting cluttered, I have a line that says the player can't have more than one weapon, and one armor item).


Thanx for help in advance..
np. I hope this helps.

Thanx again! :)
In response to Oblivian
On 7/18/01 8:29 pm Oblivian wrote:
hrm. You might not want to put the stats on the item in the stat panel because with a few items, the statpanel will get really cluttered.

I mean like say I have an item that gives +25 to defense.. and your defense is at 0.. it would add +25 to your defense(if this is what your talking about getting cluttered, I have a line that says the player can't have more than one weapon, and one armor item).


Thanx for help in advance..
np. I hope this helps.

Thanx again! :)
src.defense += usr.defense
In response to Oblivian
On 7/18/01 8:29 pm Oblivian wrote:
hrm. You might not want to put the stats on the item in the stat panel because with a few items, the statpanel will get really cluttered.

I mean like say I have an item that gives +25 to defense.. and your defense is at 0.. it would add +25 to your defense(if this is what your talking about getting cluttered, I have a line that says the player can't have more than one weapon, and one armor item).

Ah but thats not what you said. You said :
While also adding the stats on the item to the statspanel.

I thought you meant you wanted it so the user can see the items stats in the stat panel. That I showed you how to do, and that would clutter up the stat panel. For what your asking now, you just need to know how to change variables so you might wanna read up on some tutorials.

Thanx again! :)
In response to Ebonshadow
I thought you meant you wanted it so the user can see the items stats in the stat panel. That I showed you how to do, and that would clutter up the stat panel. For what your asking now, you just need to know how to change variables so you might wanna read up on some tutorials.
lol, i meant that :) your suppose to know that..
Guess thats a part I have not read yet on the guide(I have read through procsII)
Thanx again! :)
In response to Zopharx
hey man, if you really really really want a good system, i made an entire weapon system

just check out the libraries, its called Weapon System Part 1, under my name, FIREking

it even shows your obj, and its image, in a statpanel named Equipped

i think there are a few mess ups in the lib file, but if you have any errors, problems, ask me and ill fix em =)
In response to FIREking
On 7/19/01 1:42 am FIREking wrote:
hey man, if you really really really want a good system, i made an entire weapon system

just check out the libraries, its called Weapon System Part 1, under my name, FIREking

it even shows your obj, and its image, in a statpanel named Equipped

i think there are a few mess ups in the lib file, but if you have any errors, problems, ask me and ill fix em =)

I used for a little while, but I wanted to make my own.. Can't seem to figure it out, guess i'll use your again :).