Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> 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
   
-dah0rst-
post Jan 5 2012, 12:30 PM
Post #2


Level 11
Group Icon

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




When exactly death_on_poison should be called? as far as i see never wink.gif

Here is what should be changed:

CODE
def slip_damage_effect
    if slip_damage? and @hp > 0
      @hp_damage = apply_variance(maxhp / 10, 10)
      @hp_damage = @hp - 1 if @hp_damage >= @hp
      self.hp -= @hp_damage
    end
  end


For example, use this script:

CODE
class Battler
def slip_damage_effect
if slip_damage? and @hp > 0
      @hp_damage = apply_variance(maxhp / 10, 10)
      self.hp -= @hp_damage
    end


This post has been edited by -dah0rst-: Jan 5 2012, 12:32 PM


__________________________
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 5 2012, 12:50 PM
Post #3


Dark Jentleman
Group Icon

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




@dahOrst maybe Adrien wanted to kill the actor when poisoned with 1 HP... I'm not sure of this, but this is what I have understood.

This should work, or at least I hope so...

CODE
class Battler
alias joz3_slip_damage
def slip_damage_effect
    joz3_slip_damage
       if self.hp == 1
      self.hp = 0
     self.add_state(1)
    end
end
end


It's pretty similar to RGSS, so you could even copy RMXP script for slip_damage_effect and paste it into RMVX...

Jens

This post has been edited by Jens of Zanicuud: Jan 5 2012, 12:53 PM


__________________________
"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
   
-dah0rst-
post Jan 5 2012, 12:55 PM
Post #4


Level 11
Group Icon

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




Character will be automatically killed if the hp is below zero, as far as i know wink.gif


__________________________
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 5 2012, 01:01 PM
Post #5


Dark Jentleman
Group Icon

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




I just thought the same thing, but Adrien's request seems to be something like this...
I have although no idea of what the matter could actually be...

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
   
Adrien.
post Jan 5 2012, 02:59 PM
Post #6


Bet Mapper
Group Icon

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




sorry for the confusion but what I was trying to do is make it so the slip damage goes down to 0 instead of 1. thus it would kill you.


__________________________



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


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 #8


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 916
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: 19th June 2013 - 01:06 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker