States in damage formula

Status
Not open for further replies.

Zentsuki

Story teller
Veteran
Joined
Mar 14, 2015
Messages
109
Reaction score
18
First Language
French
Primarily Uses
Hi. I've recently started messing with the damage formula. What I'm trying to do is trying to make a skill that is togglable on/off; It would both add a state to the user that would remove mana every turn, but also add a state to enemies that would deal damage every turn.

This is my current formula (with only the first state applied, damage will come later as I figure the first part)

if a.state?(68);a.remove_state(68);else:a.add_state(68);end

Which may be worded wrong. Any advice on that one?
 

Josephkhland

Extremely Hardfork
Veteran
Joined
May 20, 2015
Messages
140
Reaction score
17
First Language
Greek
Primarily Uses
RMVXA
I can't see anything wrong with toggling a state on the user. You can control a switch to make the effect togglable for the enemy as well. For damage over time and mana damage on the user, I think you should use Yanfy Lunatic States script.
 

Zentsuki

Story teller
Veteran
Joined
Mar 14, 2015
Messages
109
Reaction score
18
First Language
French
Primarily Uses
I actually asked my question wrong. I tried with this fromula, but it doesn't seem to work. I believe there may be a mistake in there, can't find it though.

I will look up the scripts though, ty.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
What did you expect to happen, and what really happened?
 
Last edited by a moderator:

Zentsuki

Story teller
Veteran
Joined
Mar 14, 2015
Messages
109
Reaction score
18
First Language
French
Primarily Uses
I expected that if state 68 on casting actor is active, upon using the skill, remove state 68.

If state 68 is not active on casting actor, add the state.

Nothing happened.
 

Josephkhland

Extremely Hardfork
Veteran
Joined
May 20, 2015
Messages
140
Reaction score
17
First Language
Greek
Primarily Uses
RMVXA
After the else you have : instead of ;
 

Josephkhland

Extremely Hardfork
Veteran
Joined
May 20, 2015
Messages
140
Reaction score
17
First Language
Greek
Primarily Uses
RMVXA
Haha ...well : and ; are very similar , it is difficult to see it ...
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
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 Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,570
Latest member
fgfhdfg
Top