Ultraw
|
  |
| Joined: 20 Nov 2010 |
| Total Posts: 6575 |
|
|
| 26 Jul 2016 02:15 AM |
In an RPG. There is 10 different worlds (places).
Would I need to store every sword in every place??
What if I wanted to change the damage of one of the swords?? Would I need to change the scripts in every single place??
That seems silly |
|
|
| Report Abuse |
|
|
| |
|
Ultraw
|
  |
| Joined: 20 Nov 2010 |
| Total Posts: 6575 |
|
|
| 26 Jul 2016 02:30 AM |
Which question were you answering
|
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 26 Jul 2016 02:35 AM |
Use a model you own with all weapons then just have it load it into the game when a new server starts.
(So you can update the swords with the model and it'll update every place so you don't even have to touch them.) |
|
|
| Report Abuse |
|
|
Dawntine
|
  |
| Joined: 24 Jul 2016 |
| Total Posts: 210 |
|
|
| 26 Jul 2016 02:35 AM |
One potential solution is to upload a private module and to use that.
The better solution, I believe, is to either use InsertService on the model and just update that one model or use GetProductInfo and parse the item's description which contains the data on the damage and such it deals.
|
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 26 Jul 2016 02:37 AM |
But that's not how I would do it, but it'll work.
I'd go about doing it like so: Make all swords for FE, then make the info sent to a server module and have a list of damage in there for each weapon then I'll just need a Pmodule to update an array of damage and other stats for weapons. |
|
|
| Report Abuse |
|
|
Dawntine
|
  |
| Joined: 24 Jul 2016 |
| Total Posts: 210 |
|
|
| 26 Jul 2016 02:38 AM |
Or just have one module which contains all data on all swords and require that.
|
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 26 Jul 2016 02:40 AM |
Yea that would work too.
Maybe just use a PModule and keep damages in it them make the sword script require it and get damage for that sword, i'd just make it require it once and then track the info sent to server and make sure player is in range allowed to deal damage and if not hi exploiter give them a warning not to exploit or be banned.
Many ways to go about it. You might find it easier to just upload all swords into a model then have the server load the model in and put it where it's needed, then you could even fix bugs with weapons and update them with things without having to even touch the main game less bandwidth used, but whatever do it whatever is easiest for you. |
|
|
| Report Abuse |
|
|
Ultraw
|
  |
| Joined: 20 Nov 2010 |
| Total Posts: 6575 |
|
| |
|
|
| 26 Jul 2016 05:19 AM |
Make it a model and use InsertService:LoadAsset().
|
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 06:18 AM |
| Yes. Learning how to script |
|
|
| Report Abuse |
|
|