Merging Features of Equips

wifflefish

Veteran
Veteran
Joined
Jun 16, 2013
Messages
21
Reaction score
1
First Language
English
Primarily Uses
Hi all,

I've made a script that allows users to equip items to their weapons and armours for benefits. I'm having trouble getting the features of the items to be recognised and updated.

For example I have an item that when equipped to a weapon gives you +20% MaxHP. I can get the weapon features to update to reflect this but then the actual actor doesn't get updated features and no HP change happens.

I've tried as many things as I can think of and looked at other scripts for examples, I'm just wondering if this is possible without having to use a separate script to manage features.

Any help is much appreciated :)
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,848
First Language
English
My item affix script provides an example of how you might merge features.


Basically when you add an affix to an equip, all of the features from the affix are added to the equip's list of features.


Once the affix is removed, those features are removed from the equip as well.


Another way you could do it is to just modify the equip `features` method to return all of the features from any items that are attached to it.
 

wifflefish

Veteran
Veteran
Joined
Jun 16, 2013
Messages
21
Reaction score
1
First Language
English
Primarily Uses
Thank's for the reply, I should've known I needed to change the method in the BaseItem (I completely forgot about it)!

It's actually playing around with your instance items work that's got me into this :p

Edit:

It's now working perfectly, thank you!
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,018
Messages
1,018,357
Members
137,803
Latest member
andrewcole
Top