Chaos Project

RPG Maker => RPG Maker Scripts => Topic started by: Blizzard on August 29, 2008, 10:06:29 am

Title: Walking like they are drunk? O.o;
Post by: Blizzard on August 29, 2008, 10:06:29 am
I accidently discovered this when I was trying to rotate the sight area sprite for a sneak dungeon in my game. The character sprite started "walking weird" since I made a mistake in the scripts. I present you the DRUNKEN ADD-ON!
You can activate it for an event by using the script call "$game_map.events[ID].drunken = true" or for the player "$game_player.drunken = true".

class Game_Character
 
  attr_accessor :drunken
 
end

class Sprite_Character
 
  alias init_drunken_later initialize
  def initialize(viewport, character = nil)
    @drunken_mode = true
    init_drunken_later(viewport, character)
  end
 
  alias upd_drunken_later update
  def update
    upd_drunken_later
    if @character != nil && @character.drunken
      if @character.moving? || self.angle != 0
        if @drunken_mode
          self.angle += 1
          @drunken_mode = (self.angle <= 8)
        else
          self.angle -= 1
          @drunken_mode = (self.angle < -8)
        end
      else
        @drunken_mode, self.angle = true, 0
      end
    end
  end

end


It comes above Blizz-ABS if you use it. I suggest you try this out, it's fun. :D
Title: Re: Walking like they are drunk? O.o;
Post by: DeathLock on August 29, 2008, 10:13:22 am
When I read this, made me laugh so hard. XD
Title: Re: Walking like they are drunk? O.o;
Post by: TheHackMan on August 30, 2008, 05:57:39 pm
XD took me 3 seconds to get here from the time I saw the title. Would be a really interesting add-on for some bars and whatnot :P
I get some undefined method 'angle' error whenever I try this for both the character and other events
Title: Re: Walking like they are drunk? O.o;
Post by: legacyblade on August 30, 2008, 06:25:55 pm
lol, that is the funniest script I have ever seen. I think you should add it to tons of addons, making a "drunk" state possible. That'd be awesome, especially for the blizzABS. It could decrease accuracy, and increase strength and whatnot. Great discovery blizz.
Title: Re: Walking like they are drunk? O.o;
Post by: Pokol DaErran on August 31, 2008, 12:32:27 am
Yes, that's right.  Blizzard is so good at scripting he can make awesome scripts by accident.  XD
This is ROFL worthy.  Great job! :D
Title: Re: Walking like they are drunk? O.o;
Post by: Blizzard on August 31, 2008, 07:37:01 pm
I wasn't going to support that script. xD I just put it up because it was kinda fun. And yeah, it's possible that it doesn't work right with some systems. Heck, it's even possible that it's buggy itself. xD
Title: Re: Walking like they are drunk? O.o;
Post by: TheHackMan on August 31, 2008, 10:01:35 pm
I think this would be an awesome script to add and fix up a bit. It could really be interesting to put with some beer and a character in battle after some city bar hopping >.>
Title: Re: Walking like they are drunk? O.o;
Post by: Blizzard on January 12, 2009, 10:45:52 am
Bump due to awesomeness. :3
Title: Re: Walking like they are drunk? O.o;
Post by: Jackolas on January 13, 2009, 08:16:01 am
I love it :P :)
Title: Re: Walking like they are drunk? O.o;
Post by: Calintz on January 13, 2009, 02:59:20 pm
Could somebody post some screenshots of this please, Lmao...
If not that would be okay, because anything Blizzard is worth the download.

I'm just asking for someone to save me the hassle.
Title: Re: Walking like they are drunk? O.o;
Post by: Starrodkirby86 on January 13, 2009, 07:17:11 pm
It's really hard to post a screenshot of something that changes the animation of a hero unless the screenshot is an animated image. And I never really got to doing or finding out how to do that (I would know how thanks to Google).
Title: Re: Walking like they are drunk? O.o;
Post by: Calintz on January 13, 2009, 07:18:55 pm
Oh...nevermind...
I thought it would be like them staggering and you would be able to get a shot of them kinda diagonal or something...sorry...

I will be less lazy and download the demo
Title: Re: Walking like they are drunk? O.o;
Post by: Shadonking on January 15, 2009, 09:52:38 am
could this script work with moving events, becuase it would be well funny just to have random drunk people walking about.  :haha:
Title: Re: Walking like they are drunk? O.o;
Post by: Blizzard on January 15, 2009, 10:18:04 am
Sure.
Title: Re: Walking like they are drunk? O.o;
Post by: Shadonking on January 15, 2009, 10:37:56 am
that is hellish funny, i just made like 10 random people walking like they were drunk.
Title: Re: Walking like they are drunk? O.o;
Post by: Zeriab on January 18, 2009, 03:23:20 pm
That's so silly Blizz XD
I don't know whether I should say 'Good job' or 'Good mistake' :P
Title: Re: Walking like they are drunk? O.o;
Post by: Blizzard on January 19, 2009, 07:09:42 am
But it's lovable, lol!
Title: Re: Walking like they are drunk? O.o;
Post by: Zeriab on January 19, 2009, 12:14:47 pm
It is indeed XD
How practical it is is another matter.
Title: Re: Walking like they are drunk? O.o;
Post by: Blizzard on January 19, 2009, 12:33:25 pm
It's still nice as an add-on. As a few people here suggested, it can be used to display a drunken status effect when displaying status effects on the map.
Title: Re: Walking like they are drunk? O.o;
Post by: Shadonking on January 19, 2009, 12:35:55 pm
or just place drunk people in a game for the fun of it. most games have easter eggs in them (jokes) and i plan to have a few jokes in mine aswell and this is a perfect joke.
Title: Re: Walking like they are drunk? O.o;
Post by: Aqua on January 19, 2009, 12:45:03 pm
Spoiler: ShowHide
(http://img405.imageshack.us/img405/6047/0001af5.png)


Screenshot for those who wish it :)


Sooo... if I wanted to "be used to display a drunken status effect when displaying status effects on the map", how would I go about it? >.<
Title: Re: Walking like they are drunk? O.o;
Post by: Zeriab on January 19, 2009, 01:59:39 pm
You are quite right Blizz.
I do not believe you made it with a practical purpose in mind though.
Even so it is quite nice XD


Nice screenshot Aqua. It depicts how it works quite nicely.
Title: Re: Walking like they are drunk? O.o;
Post by: Blizzard on January 19, 2009, 02:22:17 pm
As I said, it was an accident after all. xD
Title: Re: Walking like they are drunk? O.o;
Post by: Aqua on January 19, 2009, 02:32:31 pm
Hey, penicillin was an accident! ;)

Sometimes accidents are wonderful :P
Title: Re: Walking like they are drunk? O.o;
Post by: Cid on January 21, 2009, 01:09:09 pm
Well, not all scripts need to be pivotal to the game. Little ones like this mount up and add to the overall presentation. You could use this to simply place a drunken NPC outside a bar or something.

Nice accidental script you've made here. 8)
Title: Re: Walking like they are drunk? O.o;
Post by: AliveDrive on March 22, 2011, 05:43:37 pm
Necro due to overwhelming amount of awesome. I may just have to use this. xD
Title: Re: Walking like they are drunk? O.o;
Post by: ForeverZer0 on March 22, 2011, 06:44:51 pm
I approve your decision to necro-bump.  :haha:
Title: Re: Walking like they are drunk? O.o;
Post by: tech williams on March 23, 2011, 09:30:23 am
Made an entire event system based off of this script. Now you get can buy beer at the bar and if you drink more than 4 (Lightweight) the colors start messing up and the drunken state is on. May not be entirely practical considering the beer has no other effects yet, but I really want to work on it more so who knows. Thanks for posting your mistake.  :haha:
Title: Re: Walking like they are drunk? O.o;
Post by: AliveDrive on March 23, 2011, 11:10:48 am
Polish it up and post it :P
Title: Re: Walking like they are drunk? O.o;
Post by: JellalFerd on July 02, 2011, 11:34:47 pm
Quote from: Hellfire Dragon on August 29, 2008, 10:23:15 am
lol that's awesome :haha:Is there a way for them to keep 'wobbling' when they are standing still?

class Game_Character
 
 attr_accessor :drunken
 
end

class Sprite_Character
 
 alias init_drunken_later initialize
 def initialize(viewport, character = nil)
   @drunken_mode = true
   init_drunken_later(viewport, character)
 end
 
 alias upd_drunken_later update
 def update
   upd_drunken_later
   if @character != nil && @character.drunken
     if @character.moving? || self.angle != 0 || !@character.moving?
       if @drunken_mode
         self.angle += 1
         @drunken_mode = (self.angle <= 8)
       else
         self.angle -= 1
         @drunken_mode = (self.angle < -8)
       end
     else
       @drunken_mode, self.angle = true, 0
     end
   end
 end

end

EDIT:
Sorry, didn't notice the post date.
Title: Re: Walking like they are drunk? O.o;
Post by: G_G on July 03, 2011, 01:50:57 am
Its fine this time. The last date wasn't 90 days ago. Necro posting is when you post in a topic that hasn't been replied to in over 90 days. Its only allowed if you're relating to the thread as in helping, asking for help, etc... In this case you didn't necro and if you did, its helpful to the topic.
Title: Re: Walking like they are drunk? O.o;
Post by: Neo el feo on March 11, 2013, 10:30:33 pm
I'm sorry for necroposting.
Did anyone know how to deactivate this script?

because once you activate it, it works all the time.
So, how to do the character get sober again?

PS: my english sucks.  :^_^':
Title: Re: Walking like they are drunk? O.o;
Post by: LiTTleDRAgo on March 12, 2013, 01:03:35 am
$game_map.events[ID].drunken = false
$game_player.drunken = false
Title: Re: Walking like they are drunk? O.o;
Post by: Neo el feo on March 13, 2013, 12:30:31 pm
Quote from: LiTTleDRAgo on March 12, 2013, 01:03:35 am
$game_map.events[ID].drunken = false
$game_player.drunken = false


I tried this: $game_player.drunken = false , but then the whole game stop.
sorry, just the player stop, and no matter what, he doesn´t move.
Title: Re: Walking like they are drunk? O.o;
Post by: KK20 on March 13, 2013, 01:29:08 pm
http://forum.chaos-project.com/index.php/topic,938.0.html

I should just add this to my siggy, seeing as I've posted this link over 5 or 6 times now.