Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> Creating a Death on posion script?, Epic Fail
Adrien.
post Jan 5 2012, 12:06 PM
Post #1


Bet Mapper
Group Icon

Group: Banned
Posts: 1,632
Type: Mapper
RM Skill: Advanced




Can some one help me turn this script that I created into something that works?

essentially RPG maker VX allows a actor to go to 1 hp when the state poison is applied. what I tried to do what say, is your HP 1? yes, reduce it to 0 and applied the death state (state id 1). But i think I just failed.


Help?

CODE
class Game_Battler
  
  def death_on_posion(actor)
    if $game_actors[actor] == nil
      return
    else
      if $game_actors[actor].state?(2) == true
        if $game_battler.hp == 1
          $game_battler.hp == 0
          $game.battler.add_state(1)
        end
      end
    end
  end
  
end


__________________________



Games I am working on | Each image is a link to the game
Go to the top of the page
 
+Quote Post
   
 
Start new topic
Replies
-dah0rst-
post Jan 5 2012, 03:40 PM
Post #2


Level 11
Group Icon

Group: Revolutionary
Posts: 174
Type: Scripter
RM Skill: Advanced




That was exactly what i descriped in my example wink.gif

Just delete this line:
@hp_damage = @hp - 1 if @hp_damage >= @hp


__________________________
You want Next Gen graphic algorithms in RPG VX? Ask the horst :P


But don't expect this in real time ;)
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Jan 6 2012, 01:08 AM
Post #3


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




@dahOrst You are right...
Sorry, I've missed a part of what you wrote...
Complete misunderstanding:)

Jens


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   



Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 23rd May 2013 - 10:04 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker