J_spencer93

Regular
Regular
Joined
Apr 1, 2019
Messages
199
Reaction score
18
First Language
English
Primarily Uses
RMMV
So I have an ability that I only want to effect the user if they have State X, how do i do this?
 

AsuranFish

Regular
Regular
Joined
Jan 3, 2017
Messages
122
Reaction score
90
First Language
English
Primarily Uses
Your title and post seem to be asking different things...

Do you want to make a skill only affect the target if they’re afflicted with a certain state?

Or do you want a skill to only be available for use if the character is under a certain state?
 

J_spencer93

Regular
Regular
Joined
Apr 1, 2019
Messages
199
Reaction score
18
First Language
English
Primarily Uses
RMMV
Oh yea just noticed that oddity, I want the ability to only effect to user if they have state X
 

mathmaster74

just...John
Regular
Joined
Jun 12, 2016
Messages
285
Reaction score
195
First Language
English
Primarily Uses
RMMV
@J_spencer93 In order to best assist you, what is the effect of the ability supposed to be, and what is the required state for it to take effect? Give us a short scenario about the use of the ability, its desired effect, and when it happens, or doesn't. Show and/or tell us in a little more detail with the scenario being like a story about what's happening in the battle when the ability would come into play. You will probably get better targeted and more helpful responses if you're descriptive.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Regular
Joined
May 15, 2012
Messages
14,693
Reaction score
3,034
First Language
Tagalog
Primarily Uses
RMVXA
If the skill only does damage (or youre willing to do all other effects in the damage formula), you can do this in the damage formula

Code:
if (b.isStateAffected(stateID)) {damage_formula and effects};else{0};

What this does is that if the target is affected by the state, it does whatever formula you put, else it returns 0 damage
 

J_spencer93

Regular
Regular
Joined
Apr 1, 2019
Messages
199
Reaction score
18
First Language
English
Primarily Uses
RMMV
Basically I have a state that turns the user into metal (robotic sort of) and when they use this "electro" skill, if they are "Metal" I want it to increase their agility by a set amount,
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Regular
Joined
May 15, 2012
Messages
14,693
Reaction score
3,034
First Language
Tagalog
Primarily Uses
RMVXA
What other things does electro does? Especially what does it do if you're not metal? Is it self target?
 

J_spencer93

Regular
Regular
Joined
Apr 1, 2019
Messages
199
Reaction score
18
First Language
English
Primarily Uses
RMMV
What other things does electro does? Especially what does it do if you're not metal? Is it self target?
It's self targeted. As of right now, I want it to do nothing else (it will later) as I am strictly trying to learn how to make skills that work like this.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Regular
Joined
May 15, 2012
Messages
14,693
Reaction score
3,034
First Language
Tagalog
Primarily Uses
RMVXA
Then for now, make a new state that gives the bonis agility then do this on the electro skill's damage formula

Code:
if (b.isStateAffected(ID of metal state)) {b.addState(ID of new state)};else{0};
 

J_spencer93

Regular
Regular
Joined
Apr 1, 2019
Messages
199
Reaction score
18
First Language
English
Primarily Uses
RMMV
Then for now, make a new state that gives the bonis agility then do this on the electro skill's damage formula

Code:
if (b.isStateAffected(ID of metal state)) {b.addState(ID of new state)};else{0};
Yea, currently this is not working. It shows it deals 0 damage but does not apply the second state if they have the Metal State
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Regular
Joined
May 15, 2012
Messages
14,693
Reaction score
3,034
First Language
Tagalog
Primarily Uses
RMVXA
Can you post the actual formula you used?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Regular
Joined
May 15, 2012
Messages
14,693
Reaction score
3,034
First Language
Tagalog
Primarily Uses
RMVXA
Can you try changing b to a?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Regular
Joined
May 15, 2012
Messages
14,693
Reaction score
3,034
First Language
Tagalog
Primarily Uses
RMVXA
I just want to make sure if it being self target changes a behavior. Were testing things out to figure out why its not working, so better check everything that we can.

Can you try this formula and run the game with console on and what gets printed when you use the skill? If nothing gets printed, then that would mean the formula itself has an error.

Code:
if (b.isStateAffected(29)) {console.log("true")};else{console.log("false")};
 

J_spencer93

Regular
Regular
Joined
Apr 1, 2019
Messages
199
Reaction score
18
First Language
English
Primarily Uses
RMMV
I just want to make sure if it being self target changes a behavior. Were testing things out to figure out why its not working, so better check everything that we can.

Can you try this formula and run the game with console on and what gets printed when you use the skill? If nothing gets printed, then that would mean the formula itself has an error.

Code:
if (b.isStateAffected(29)) {console.log("true")};else{console.log("false")};
I am new at this, how do i turn console on?
Btw changing b to a literally changed nothing (odd i know). Another oddity is, when i apply the "ion field" spell, it depletes 2 rounds off of "iron skins" duration.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Regular
Joined
May 15, 2012
Messages
14,693
Reaction score
3,034
First Language
Tagalog
Primarily Uses
RMVXA
Press F8 once the game is running to open the webkit window, then find the tab which says console.. Thats weird, the formula doesnt reduce state count or do extra turns..
 

J_spencer93

Regular
Regular
Joined
Apr 1, 2019
Messages
199
Reaction score
18
First Language
English
Primarily Uses
RMMV
Press F8 once the game is running to open the webkit window, then find the tab which says console.. Thats weird, the formula doesnt reduce state count or do extra turns..
So here is what pops up when I use the skill (which has me even more confused):

Screen Shot 2019-07-12 at 1.53.10 PM.png
 

Calvynne

Regular
Regular
Joined
Oct 23, 2015
Messages
104
Reaction score
71
First Language
English
Primarily Uses
I believe your addstate is missing an a.addState(75) or a b.addState(75) just looking at the above.
 

J_spencer93

Regular
Regular
Joined
Apr 1, 2019
Messages
199
Reaction score
18
First Language
English
Primarily Uses
RMMV
I believe your addstate is missing an a.addState(75) or a b.addState(75) just looking at the above.
Just noticed that too. I will try that.
Trying a.addState(75) nor b.addState(75) work either.
 

Latest Threads

Latest Profile Posts

An optimal price for an indie game on Steam also needs to be accompanied by an optimal sales discount %. For a solo indie game, I think the optimal price is where it should be low enough that a single Steam card can be used to buy it, after tax. A few cents the wrong direction can potentially mean someone who was gifted a Steam card can't buy the game, then picks something else to buy.
I've been so lazy about doing art but I finally decided to buckle down and get some work done on the party!

aa312ffbcd667933.png

3d554012e96e4526.png
SallyFaceTest.png
Testing the first face in battle!

Forum statistics

Threads
134,684
Messages
1,249,692
Members
177,420
Latest member
jacobmartin111
Top