Need Help Finding A Specific Function

Status
Not open for further replies.

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
259
Reaction score
117
First Language
English
Primarily Uses
RMMZ
In short: I am making a vampire RPG and working on a plugin to take care of majority of the supernatural systems. One of these is a vampire's regeneration. I want it so that if they are hit with a specific damage type (we'll use "08: Light" for RMMV default), which will then stunt the vampire's regeneration for 30 seconds.

I just need help figuring out which function in rpg_objects.js helps determine what Attack Element type was used in the last attack so I can alias that function. I'm looking through Game_Action and Game_ActionResult and there's a few functions that I thought would be it.. but they're comparing item data not weapons? o_O
---
Edit2: Okay I was misunderstanding it... this.item() is referring to a skill (id:1 = attack) not the weapon...that might help my search a bit more.

Edit: To be a bit clearer in my request, I know somewhere, somehow $dataWeapons[id].traits() is where I should start... code: 31 I understand to be the attack element trait and dataId: 8 (is the Light element we are looking for)... but I can't seem to find it. Maybe I just don't know where to look? *rubs chin*
 
Last edited:

lordvalinar

Lord of the Damned
Veteran
Joined
Mar 31, 2013
Messages
259
Reaction score
117
First Language
English
Primarily Uses
RMMZ
ANSWER: this.user().damage.elementId

Got it :)
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,729
Reaction score
4,685
First Language
English
Primarily Uses
RMMZ

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,547
Members
137,835
Latest member
yetisteven
Top