#Rarity System
1 messages · Page 1 of 1 (latest)
Maybe... But idk how
<@&1050648858243379231>
Sorry if i shouldn't ping tho
Its cuz i learned if 24 hours pass i can ping helpers
y'all took so long to answer im literally so close to finishing making it myself. But at the same time im not
yes, but idk how
<@&1050648858243379231>
Yeah, you just need a way to show it either using/generating a child object that shows weapon stuff
Im halfway through finishing it myself, i used config tables. And now idk how to make them equipable
@dreamy shore
Like when you press it will equip it
You can use an ID system for the equipped weapon so the game knows what's equipped, you can use a numbers var or a text var, text is for convenience and number for speed and less length, although just go with what helps you best
Basically
0 or "None" = No weapon
1 or "Weapon1" = weapon number 1
2 or "Weapon2" = weapon number 2 and so on
Nunbers and names can be anything but it ahould have some sort of order so it's not messy
Oooohhh i get your idea and its actually creative and good, thx!
You're welcome
But how do i give every weapon its ID?
You can use If checks, check if the variable = the weapon you want
Do i do like "Set Shotgun = Weapon1 (player variable)
Or wait that wouldn't work
CurrentWeapon = "Shotgun"
If CurrentWeapon = "Shotgun" then
[Shotgun stuff]
End
I used config tables for the custom inventory i talked about and i basically did like row 1 Asset: Minigun Rarity: Rare Rarity color: Blue (color not text tho) Image: Minigun and tye same thing for shotgun but different things. So i do like if current weapon is shotgun then:
Set childobject Image = Shotgun
Set color= Config table = Row 3 color
Set text = Config table Row 3 Text
Like this?
If you make the CurrentWeapon a numbers var you could just extract from where the shotgun row is without needing ifs
Infinite loop
Keep wait until CurrentWeapon ≠ 0
Set child object.texture = row CurrentWeapon image
Set color = configtable row CurrentWeapon color and so on
Would also remove the need for extra ifs for each weapon
You just need to know the in config table ID of the weapon and make sure it doesn't go above the max or it will break
Ok thanks i'll try to understand this script and try it in Julian Royale!!
If you're available. Can you try to make me the script ingame? I don't really understand it
Just place the current weapon var inside the row num
huh?
Ohh wait
I think i get it
I have another problem i understood what you said but when i press player Main Actor. Current actor. Components. Battle. Weapon. Then current weapon i can't press it i can't press current weapon only. Like i can't stop it there
There should be a ✓?
Cuz the current weapon isn't an object that exists per se
Right?
So you have to just use original asset
Am i correct so far:
Infinite loop
Set Self Child object the 1 first child object texture = Config table Find Player Current weapon
Its not after pressing tho its when object is created
Please bro i am getting a stroke from this script i can't understand cuz im stupid
I thought you were gonna use a custom player var and custom inventory weapon handling, nonetheless there's the command switch weapon to change weapons
What do you mean custom Inventory "handling"?
Srry for being annoyting though
Technical stuff
Sorry for being a dumb ahh
Btw do i do like inventory slot in "weapon number 1"
Im doing what you're saying but like yk a Number var can't be a string or an asset ciz you told me "Current weapon = "Shotgun""
@dreamy shore
Yeah because its literal ID now, and i thought you were doing custom inventory and not built in
That's what im gonna do
You thought i was about to use the built in inventory?
Okay, so basically current weapon would just be the number of that weapon, aka an ID to identify it
Should i also put the current weapon in my rarities config table?
Maybe, kinda depends
Set current weapon= shotgun id (because like i understood i give every single weapon its ID)
If current Weapon = ShotgunID
Set text = config table rarity
Set text color = config table rarity Color
Set image = Config table Image
Yeah
I will put this in when object is created
If you want you can write down the IDs somewhere as a reminde incase you forget what ID a weapon is
I'll get an array for that
how does the game know what's equiped with just a player number var
Coding and telling it what to do when a variable (thing it needs to know and check for) is X (whatever object or input the variable should be)
I made an asset which is the inventory and i put 5 of it for 5 slots and put the max items that can be in the bag to 5. I said this because i have another question (sorry for wasting your time a lil bit) but if i have 4 items, and i have a single slot left. How does the game know its empty with just a zero? And when you press it how does it equip the exact weapon
0 is a default for null or none, you can interpret is as that and it knows by telling it and what to do in such a situation