RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RESOLVED] Edit weapon choices for a class?

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 82
We learn by living...
Hi, it's been a while (study abroad & school), but I was wondering if there was a way to add weapons to a class that normally doesn't have them. For example, if I have a class that enters a shop of weapons, they would normally not be able to use guns, but then if they went to the firing range coach, he could (for a small fee) teach various firearms. I think I somehow missed the option in eventing, unless it takes a script.

Apologies if this is misplaced, I've been away for a while.
« Last Edit: October 24, 2010, 07:02:20 PM by shintashi »

***
Rep:
Level 85
Winter is here.
I don't believe there is an event for something like this. What you could do is allow the player to use firearms from the start and prevent the player from buying them through the shop event, i.e. make the shopkeeper tell the hero that he must receive special training or something before he can buy them. On page two of the event, check and see if a variable (CanUseGuns or whatever) is greater than some value of your choice (we'll assume that 0 is off and 1 is on), and go from there. Innately, CanUseGuns is equal to 0; after going to the trainer, you can simply set CanUseGuns to 1. Bam, now you can buy guns.

... That's what I would do, anyway. I'm sure someone has a better method somewhere, but hey. Anywho, back to WoW.
Eddard Stark art by Teiiku

****
Hey... my name's... Sashikinaroji...
Rep:
Level 83
fear me...
The problem with that is, though, if someone else has firearm proficiency, they would need guns too, yes? So they would be able to be switched to the hero... Also, gun might be a chest or random drop item...

I would suggest switching classes (only because I am an eventer, not a scripter...) to something will all your original weps, and also a gun. Of course, this would likely cause problems if you want there to be a range of trainers that different chars can visit...
Ok, DON'T EXPECT HELP FROM ME~! I will perhaps rant a bit, but don't expect me to do graphics for you, even if I say I will... I won't.

***
Rep:
Level 82
We learn by living...
This game is a largely one actor game during the scenes where this takes place, and they are the only character that will have this class, but I see your point.

I did a

Code: [Select]
script: p $data_classes[1].weapon_set

and that told me a list of numbers in a set, such as [1,5], which match up with the weapons selected in a list, like weapon 1 might be bronze sword and weapon 5 might be bronze spear.


But when i tried something like

Code: [Select]
p $data_classes[1].weapon_set[5]

I got some screwy numbers, sometimes nil. I tried setting different weapons in the main, but I don't understand what the weapon_set[number] command is doing.

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Weapon_Set is an array. The number is corresponding to the unit which is that number in that array.

For example: array = [1, 2, 3, "Rabbit", 5]

array[0] would return 1, array[1] would return 2, array[3] would return the string "Rabbit", and array[5] would return nil, since there are only 5 values in the array (computers start counting from 0).


***
Rep:
Level 82
We learn by living...
Weapon_Set is an array. The number is corresponding to the unit which is that number in that array.

For example: array = [1, 2, 3, "Rabbit", 5]

array[0] would return 1, array[1] would return 2, array[3] would return the string "Rabbit", and array[5] would return nil, since there are only 5 values in the array (computers start counting from 0).



aww crud, you beat me too it. I just figured that out 90 seconds ago :(

but do you know how to append that array, by adding something to it?

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Use .push

array = [1, 2]
array.push(3)

The array would now be [1, 2, 3]

***
Rep:
Level 82
We learn by living...
worked like a charm. ^^