I'm just barely learning how to do Java script and I was wondering, If i want to cause damage to ALL party members at once with a script call, how would I go about this? Like if they interract with something it causes say... 300 points of damage or like 75% damage to all members...
I'm gonna assume it's something very obvious but I've spent hours trawling through scripts and reading various plugins etc to see if i can find it, but it is being very elusive thus far.
I know I can accomplish this through events but for my purposes I'd like to be able to do it via a script. Any help is greatly appreciated.
I'm not exactly sure if you meant in battle, or what but you don't need scripting at all to do this. In any event you can use the change HP function from actor section of the Event command page. To entire party etc. Now if you meant through a skill or what. That is also very strait forward. But it does occur to me that you may know this already and are just trying to figure out how to script it yourself for whatever reason... Could you be a little more specific?
I need it to happen outside battle and the "change HP" function in the event's thing doesn't do what i need...
Basically, what I am trying to do it have it so that if you move from one place to another, the whole group loses a chunk of health, but I want it so that if you get to a higher level you still lose a sizeable chunk... Like... if you're at level 1 and you have HP of say 40, you lose 30hp or 75% but if you're level 10 and have say 200HP you'd need to lose 150hp.
I know i can accomplish this by changing the MAXHP to 25% and then back again so they're left with the lower health value... but I also need it to work so that say
You have a MAX HP of 200, but you have already taken damage and have say 150HP remaining, i need it so that 75% of the HP REMAINING gets removed, not 75% of the MAX HP and up until this point, I have found no way of making that possible... Plus... it's something I wanted to put into a script I'm working on... i NEED it to be a script call not and event
I don't know how to program in java, but I found solution for event. You set Actor Hp as variable.(Control variables--->gamedata--->actor's---->HP.
Then, you change this variable to your will( for example-75% you make by Control variables----->divide by 100| Control variables----->multiple by 75.
Then, you change actor's Hp by Change HP------>actor(choosen one, because you have HP of only one actor)------->decrase-------->variable
So, try to make javascript in this way and I think it'll work. Good luck !