[Resolved] Conditional Gameover

Started by RoseSkye, April 26, 2009, 09:29:08 pm

Previous topic - Next topic

RoseSkye

April 27, 2009, 01:33:35 pm #20 Last Edit: April 27, 2009, 01:36:12 pm by RoseSkye
Quote from: NAMKCOR on April 27, 2009, 01:12:03 pm
Quote from: RoseSkye on April 27, 2009, 12:52:33 pm
Script 'Blizz Thingy' line 4: Name Error occured.

uninitialized constant Scene_Map::ID


thing is...that error is saying that ID is an uninitialized constant, it's trying to use it as a value.
tell me, does your script look like this?

class Scene_Map
  alias judge_rose_later judge
  def judge
    return ($game_party.actors[0].id == 10 && $game_party.actors[0].dead?) || judge_rose_later
  end
end



I'm such an idiot .. no..

class Scene_Map
  alias judge_rose_later judge
  def judge
    return ($game_party.actors[10].id == 0 && $game_party.actors[0].dead?) || judge_rose_later
  end
end

it looked like this.

(Doesn't work)

tSwitch

when he said 'change ID' he really meant it lol


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: tSwitch.us | Twitter | Tumblr

Blizzard

And the last one didn't work either?
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

RoseSkye


Aqua

Haha...
I really shouldn't script off the top of my head :P

Blizzard

The problem is that the dead leader is switched before the game over occurs. Add this code after the one I gave you before in order to prevent that.

class BlizzABS::Controller
 
 alias switch_leader_rose_later switch_leader
 def switch_leader
   return if $game_party.actors[0].id == 10 && $game_party.actors[0].dead?
   switch_leader_rose_later
 end
 
end

$BlizzABS = BlizzABS::Processor.new
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

RoseSkye

April 28, 2009, 02:36:46 pm #26 Last Edit: April 28, 2009, 02:39:58 pm by RoseSkye
Quote from: Cool Trainer Blizzard on April 28, 2009, 03:42:12 am
The problem is that the dead leader is switched before the game over occurs. Add this code after the one I gave you before in order to prevent that.

class BlizzABS::Controller
 
 alias switch_leader_rose_later switch_leader
 def switch_leader
   return if $game_party.actors[0].id == 10 && $game_party.actors[0].dead?
   switch_leader_rose_later
 end
 
end

$BlizzABS = BlizzABS::Processor.new



Blizz your new name is really lame :/

Edit: It works like a charm. I know someone who's getting extra nookie today!
Spoiler: ShowHide
you mom

Blizzard

It wasn't me who gave me the new name. O_o;
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

RoseSkye

Quote from: Rival Blizzard on April 29, 2009, 05:39:55 am
It wasn't me who gave me the new name. O_o;


Ladies and Gentlemen, Cool Trainer Blizzard: ShowHide