- Joined
- Mar 31, 2013
- Messages
- 259
- Reaction score
- 117
- First Language
- English
- Primarily Uses
- RMMZ
!! UPDATED (Working now: Will attach completed plugin in appropriate section)
-Original post:
So I'm not sure if this should be here or in plugin requests. Basically I wanted to see if anyone could help me as I try to create a plugin that adds "new" functions assigning switches / variables to an object (Specifically the actor in this case).
There are 2 things I wish to accomplish.
// Game_Switches.prototype.setValue = function(switchId, value)
What I want to try to create is something like this:
// Game_Switches.prototype.setActorValue = function(actorId, switchId, value)
I assume in the Game_Actors class I could create a base parameter as an array.... (referring to Game_Actor.prototype.initMembers = function()):
this._switches = [];
this._variables = [];
And go from there (for loops could grab the proper switches from the array and then use the basic switch.get function to find the value that way... I suppose?) I don't know this is the part where I"m stuck lol. I don't want to overwrite the default Function.setValue() functions, so I'll create new ones for those so I can assign properly to an actor, I just need help in its initial setup.
Then also help on how to include to other plugins?
-Original post:
So I'm not sure if this should be here or in plugin requests. Basically I wanted to see if anyone could help me as I try to create a plugin that adds "new" functions assigning switches / variables to an object (Specifically the actor in this case).
There are 2 things I wish to accomplish.
- Be able to assign, modify, or remove a switch / variable from an actor so my other script "Dynamic Actors" that I'm working on can function a bit better (since it needs certain switch/variable data per actor)
- Be able to include this plugin in other plugins (whether for me, or others who wish to use it)
// Game_Switches.prototype.setValue = function(switchId, value)
What I want to try to create is something like this:
// Game_Switches.prototype.setActorValue = function(actorId, switchId, value)
I assume in the Game_Actors class I could create a base parameter as an array.... (referring to Game_Actor.prototype.initMembers = function()):
this._switches = [];
this._variables = [];
And go from there (for loops could grab the proper switches from the array and then use the basic switch.get function to find the value that way... I suppose?) I don't know this is the part where I"m stuck lol. I don't want to overwrite the default Function.setValue() functions, so I'll create new ones for those so I can assign properly to an actor, I just need help in its initial setup.
Then also help on how to include to other plugins?
Last edited:

