Parameter inconsistent

Status
Not open for further replies.

Midnight Kitty

Midnight
Veteran
Joined
Jun 18, 2013
Messages
124
Reaction score
13
First Language
English
Primarily Uses
RMMV
I have a problem with one of the parameters and I am not sure if the script I am using to check it is accurate
Code:
◆If:Script:($gameActors.actor(1).param[2] = 1)
  ◆Common Event:Str_check
  ◆Control Variables:#0200 V200 = Attack of \N[1]
  ◆Change Parameter:\N[1], Attack + 5
  ◆Control Variables:#0200 V200 += STR+-
  ◆Script:$gameVariables.setValue(200, ($gameVariables.value(200) + $gameActors.actor(1).param[2]) / 2) - 10;
  ◆Change Parameter:\N[1], Attack + {V200}
  ◆
:Else
  ◆
:End
I did this because when I started the game it seemed to ignore the parameters I had set for the character and moved his attack to 1 but with this, it just keeps skyrocketing up.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
28,989
Reaction score
6,671
First Language
German
Primarily Uses
RMMV
why do you use script at all? everything in that sequence can be done with control variable, absolutely no need for any script.
especially the if branch is much easier with using control variable and then checking the variable value.
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,627
Reaction score
1,060
First Language
English
Primarily Uses
RMMV
Two reasons why it's not working.

1. The if condition is using the assignment operator instead of the equals comparison operator
2. param is a function, not an array

That being said, replacing the script calls with normal event commands as Andar suggested would be better.
 

Midnight Kitty

Midnight
Veteran
Joined
Jun 18, 2013
Messages
124
Reaction score
13
First Language
English
Primarily Uses
RMMV
That did help fix the problem but I have now found the source of my characters attack getting lowered to 1.
The dagger?
No other weapon seems to have the same effect of just lowering my attack to 1.
Edit: is it the attack *5%? i just saw that and wanted it to increase attack instead
 

Attachments

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
28,989
Reaction score
6,671
First Language
German
Primarily Uses
RMMV
you gave the dagger the trait "attack * 5%"
That means "multipy my current attack value with 5%" - that trait reduces the actor attack to one twentieth of its total value, so if the attack value is below 30 or so then of course only 1 (rounded) will remain.
To increase attack you need to multiply with a value above 100%

I think you should take the time to go through the tutorials and learn what the options in the engine do before using them - not everything is obvious, and here you even missed the fact that the trait tells you exactly what it does (multiplication sign).
There are other options more hidden...
 

Midnight Kitty

Midnight
Veteran
Joined
Jun 18, 2013
Messages
124
Reaction score
13
First Language
English
Primarily Uses
RMMV
you gave the dagger the trait "attack * 5%"
That means "multipy my current attack value with 5%" - that trait reduces the actor attack to one twentieth of its total value, so if the attack value is below 30 or so then of course only 1 (rounded) will remain.
To increase attack you need to multiply with a value above 100%

I think you should take the time to go through the tutorials and learn what the options in the engine do before using them - not everything is obvious, and here you even missed the fact that the trait tells you exactly what it does (multiplication sign).
There are other options more hidden...
I misread it thinking the *5 added that on to the assigned total. Then I forgot I had that added.

I also have learned a lot more since I done that as it was quite early in the development that was added. I overlooked it.
 
Last edited:

Kes

Global Moderators
Global Mod
Joined
Aug 3, 2012
Messages
21,405
Reaction score
10,844
First Language
English
Primarily Uses
RMVXA

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

Stream will be live shortly! Going to start with some Minecraft spriting, and might switch mid-stream. Depends~ Feel free to drop by!
MushroomCake28 wrote on Finnuval's profile.
Glad to see you're back! I was wondering what you've become! It's been a while since we spoke to each other!
zachb wrote on Human_Male's profile.
I know this was months ago, but I don't completely understand the lunatic states program (how you set it up). I just want to apply a stone state (and death) to a character after x amount of time. Can you show me an example of how to set it up?
Wish I could respond to @CraneSoft's latest profile post, but it does remind me. Anyone else out there who likes the Souls series not because of draconian git gud difficulty, but because of its melancholy atmosphere and various cool medieval equips?
I wish I had multiple displays!
one screen feels like using a small table, and the way i usually do things I have a lot of stuff open ...
So annoying !

Forum statistics

Threads
93,465
Messages
912,705
Members
123,001
Latest member
casterisque
Top