RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Special attack?

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 89
I want to do a special attack with characters, so when their health is at a certain point, they can use a special attak, or maybe even any other ways of special attacks. Can anyone help me on how I can do a special attack?

***
Rep:
Level 90
I have game maker's block PM me with game ideas.
2k3 or xp?
Major Project : Cliche Cronicles
Total: [llllllllllllllllllll] 0%
Story: [llllllllllllllllllll] 0%
Resources: [llllllllllllllllllll] 0%
Script: [llllllllllllllllllll] 0%
Voice Overs: [llllllllllllllllllll] 0%

Currently: Planning

*
Resident Cloud
Rep:
Level 91
shoouldent effect it that much but if its xp then theres a skill called desperation thats scripted basically they do more damage when they have a low hp

ill find it for you:

Spell Effect No1
Name: Desparation
Special Inputs: None
Description: The lower the battlers hp the more damage that will be inflicted on the target

Create an element called desparation or whatever remember the Id
Script Editor class Game_Battler 3 skill_effect find
Code: [Select]


if skill.power != 0 and skill.atk_f > 0
remove_states_shock
effective = true
end


remember this spot in skill effect for this is the spot where you add the rest of the skill effects seems that people aren't getting this part so emphasis is necessary
right after the end statement add
Code: [Select]


if skill.element_set.include?(ELEMENT ID)
@damage_hp = 10 * user.maxhp / user.hp + self.damage
#change the formula if you want but the maxhp/hp is the most
#important part
end


Make sure you have this somewhere (preferably after this code) in skill effect (CHANGED AGAIN!!!)
Code: [Select]


if @damage_hp != 0 and @damage_hp != nil
self.damage = @damage_hp
last_hp = self.hp
self.hp -= @damage_hp
@hp_damaging = true
else
last_hp = self.hp
self.hp -= self.damage
end


at the start of skill_effect add this
Code: [Select]


@hp_damaging = false
@damage_hp = 0


find this block of code
Code: [Select]


if skill.power == 0
# Set damage to an empty string
self.damage = ""
# If state is unchanged
unless @state_changed
# Set damage to "Miss"
self.damage = "Miss"
end
end


replace that with this

Code: [Select]


if skill.power == 0 and not @hp_damaging
# Set damage to an empty string
self.damage = ""
# If state is unchanged
unless @state_changed
# Set damage to "Miss"
self.damage = "Miss"
end
end


delete these lines they should be right after the code you just added
Code: [Select]


last_hp = self.hp
self.hp -= self.damage

And you're done

the above scripts were made by trickster


note if you have rpgmaker 2003 then you cant use it but theres away to do it on 2003 as well

**
Rep: +0/-0Level 89
To do that sort of thing in RM2k(3), create a common event.  In that new common event, set a variable to record the HP of the hero who will be learning the skill.  

It should look like

Variable Ch:[0001: Hero HP] Set, HeroNameHere, HP

Set the common event to parallel process.

Make another common event with fork conditions that check to see if that variable is below whatever HP limit you want the new skill(s) to activate at.

It should look like

FORK Optn: Varbl[0001:Hero HP] (# goes here)less
<> Change Skill: HeroNameHere - SkillNameHere -> Memory
:ELSE Case
<> Change Skill: HeroNameHere - SkillNameHere -> Forget
End Case

This should also be a parallel process.